From b617c8988b6d7cf272fbee16a535acb6fe7486f8 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:54:27 +0000 Subject: [PATCH 001/529] Setup of module ruby --- .cvsignore | 0 Makefile | 6 ++++++ sources | 0 3 files changed, 6 insertions(+) create mode 100644 .cvsignore create mode 100644 Makefile create mode 100644 sources diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a48d560 --- /dev/null +++ b/Makefile @@ -0,0 +1,6 @@ +# Makefile for source rpm: ruby +# $Id$ +NAME := ruby +SPECFILE = $(firstword $(wildcard *.spec)) + +include ../common/Makefile.common diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From 1c4905a20ed28a9776e3963ae1dbfc9ea25d5c0b Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:54:29 +0000 Subject: [PATCH 002/529] auto-import changelog data from ruby-1.4.6-2.src.rpm Tue Aug 29 2000 akira yamada - Updated to version 1.4.6. - removed ruby-dev.10123.patch(included into ruby-1.4.6). - Added ruby_cvs.2000082901.patch(upgraded ruby to latest cvs version). Tue Jun 27 2000 akira yamada - Updated manuals to version 1.4.5. Sun Jun 25 2000 akira yamada - Added ruby-dev.10123.patch. Sat Jun 24 2000 akira yamada - Updated to version 1.4.5. - Removed ruby_cvs.2000062401.patch(included into ruby-1.4.5). Thu Jun 22 2000 akira yamada - Updated to version 1.4.4(06/22/2000 CVS). - Removed ruby-dev.10054.patch(included into ruby_cvs.patch). Thu Jun 22 2000 akira yamada - Renamed to ruby_cvs20000620.patch from ruby_cvs.patch. Tue Jun 20 2000 akira yamada - Updated to version 1.4.4(06/20/2000 CVS). - Removed ruby-list.23190.patch(included into ruby_cvs.patch). - Added ruby-dev.10054.patch. Thu Jun 15 2000 akira yamada - Updated to version 1.4.4(06/12/2000 CVS). - Added manuals and FAQs. - Split into ruby, ruby-devel, ruby-tcltk, ruby-docs, irb. Tue Jun 13 2000 Mitsuo Hamada - Updated to version 1.4.4 Wed Dec 08 1999 Atsushi Yamagata - Updated to version 1.4.3 Mon Sep 20 1999 Atsushi Yamagata - Updated to version 1.4.2 (Sep 18) Fri Sep 17 1999 Atsushi Yamagata - Updated to version 1.4.2 Tue Aug 17 1999 Atsushi Yamagata - Updated to version 1.4.0 Fri Jul 23 1999 Atsushi Yamagata - 2nd release - Updated to version 1.2.6(15 Jul 1999) - striped /usr/bin/ruby Mon Jun 28 1999 Atsushi Yamagata - Updated to version 1.2.6(21 Jun 1999) Wed Apr 14 1999 Atsushi Yamagata - Updated to version 1.2.5 Fri Apr 09 1999 Atsushi Yamagata - Updated to version 1.2.4 Fri Dec 25 1998 Toru Hoshina - Version up to 1.2 stable. Fri Nov 27 1998 Toru Hoshina - Version up to 1.1c9. Thu Nov 19 1998 Toru Hoshina - Version up to 1.1c8, however it appear short life :-P Fri Nov 13 1998 Toru Hoshina - Version up. Tue Sep 22 1998 Toru Hoshina - To make a libruby.so. Mon Sep 21 1998 Toru Hoshina - Modified SPEC in order to install libruby.a so that it should be used by another ruby entention. - 2nd release. Mon Mar 09 1998 Shoichi OZAWA - Added a powerPC arch part. Thanks, MURATA Nobuhiro --- .cvsignore | 5 + ruby.spec | 355 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 5 + 3 files changed, 365 insertions(+) create mode 100644 ruby.spec diff --git a/.cvsignore b/.cvsignore index e69de29..14e83ed 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1,5 @@ +ruby-1.4.6.tar.gz +ruby-man-1.4.6-jp.tar.gz +ruby-man-1.4.6.tar.gz +rubyfaq-990927.tar.gz +rubyfaq-jp-990927.tar.gz diff --git a/ruby.spec b/ruby.spec new file mode 100644 index 0000000..f823d2f --- /dev/null +++ b/ruby.spec @@ -0,0 +1,355 @@ +%define rubyver 1.4.6 +%define manver %{rubyver} +%define rpmrel 2 +Summary: An interpeter of object-oriented scripting language +Name: ruby +Version: %{rubyver} +Release: %{rpmrel} +#Distribution: +Copyright: distributable +Group: Development/Languages +Source0: ftp://ftp.netlab.co.jp/pub/lang/%{name}/%{name}-%{version}.tar.gz +Source1: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/%{name}-man-%{manver}.tar.gz +Source2: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/%{name}-man-%{manver}-jp.tar.gz +Source3: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/rubyfaq-990927.tar.gz +Source4: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/rubyfaq-jp-990927.tar.gz +Patch1: ruby-jcode.rb-utf8.patch +Patch2: ruby_cvs.2000082917.patch +URL: http://www.ruby-lang.org/ +Prefix: /usr +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk +Vendor: Red Hat, Inc. +Packager: akira yamada +Summary(ja): オブジェクト指向言語Rubyインタプリタ + +%description +Ruby is the interpreted scripting language for quick and +easy object-oriented programming. It has many features to +process text files and to do system management tasks (as in +Perl). It is simple, straight-forward, and extensible. + +%description -l ja +Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です. +Rubyは最初から純粋なオブジェクト指向言語として設計されていま +すから,オブジェクト指向プログラミングを手軽に行う事が出来ま +す.もちろん通常の手続き型のプログラミングも可能です. + +Rubyはテキスト処理関係の能力などに優れ,Perlと同じくらい強力 +です.さらにシンプルな文法と,例外処理やイテレータなどの機構 +によって,より分かりやすいプログラミングが出来ます. + +%package -n ruby-devel +Summary: A Ruby development environment. +Group: Development/Languages +Requires: ruby = %{PACKAGE_VERSION} +URL: http://www.ruby-lang.org/ + +%description -n ruby-devel +Header files and libraries for building a extension library for the +Ruby or an application embedded Ruby. + +%description -n ruby-devel -l ja +Rubyのための拡張ライブラリやRubyを組み込んだアプリケーションを作るため +に必要となるへッダファイルやライブラリです. + +%package -n ruby-tcltk +Summary: Tcl/Tk interface for scripting language Ruby. +Group: Development/Languages +Requires: ruby = %{PACKAGE_VERSION} +URL: http://www.ruby-lang.org/ + +%description -n ruby-tcltk +Tcl/Tk interface for the object-oriented scripting language Ruby. + +%description -n ruby-tcltk -l ja +RubyにTcl/Tkライブラリへのインタフェースを提供する拡張ライブラリです. + +%package -n irb +Summary: The Intaractive Ruby. +Group: Development/Languages +Requires: ruby = %{PACKAGE_VERSION} +URL: http://www.ruby-lang.org/ + +%description -n irb +The irb is acronym for Interactive RuBy. It evaluates ruby expression +from the terminal. + +%description -n irb -l ja +irbとはInteractive RuByの略で,対話的にRubyの式を入力し,評価させるこ +とが可能です. + +%package -n ruby-docs +Summary: Manuals and FAQs for scripting language Ruby. +Group: Documentation +URL: http://www.ruby-lang.org/ + +%description -n ruby-docs +Manuals and FAQs for the object-oriented scripting language Ruby. + +%description -n ruby-docs -l ja +オブジェクト指向スクリプト言語Rubyについてのマ二ュアルとFAQです. + +%prep + +%setup -q -c -a 1 -a 2 -a 3 -a 4 + +cd %{name}-%{version} +#%patch0 -p1 +%patch1 -p1 +%patch2 -p1 + +#%patch10 -p1 + +cd ../../.. + + +%build + +cd %{name}-%{version} +#CFLAGS="${RPM_OPT_FLAGS}" ./configure \ +# --prefix=%{prefix} \ +# --mandir=%{prefix}/man \ +# --with-default-kcode=none \ +# --with-dbm-include=/usr/include/db1 \ +# --enable-shared \ +# --enable-ipv6 \ +# --with-lookup-order-hack=INET +# ${RPM_ARCH}-linux +%configure \ + --prefix=%{prefix} \ + --mandir=%{prefix}/share/man \ + --with-default-kcode=none \ + --with-dbm-include=/usr/include/db1 \ + --enable-shared \ + --enable-ipv6 \ + --with-lookup-order-hack=INET + +make +make test + +cd .. + + +%install + +rm -rf ${RPM_BUILD_ROOT} + +# installing documents and exapmles... +mkdir tmp-ruby-docs +cd tmp-ruby-docs + +# for ruby.rpm +mkdir ruby +cd ruby +(cd ../../%{name}-%{version} && + tar cf - misc sample lib/README*) | tar xvf - +(cd ../../%{name}-%{version} && + tar cf - `find ext + -mindepth 1 + \( -path '*/sample/*' -o -path '*/demo/*' \) -o + \( -name '*.rb' -not -path '*/lib/*' -not -name extconf.rb \) -o + \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \)`) | tar xvf - + +# fixing `#!' paths +for f in `find . -type f` +do + sed -e 's,^#![ ]*\([^ ]*\)/\(ruby\|with\|perl\|env\),#!/usr/bin/\2,' < $f > $f.n + mv -f $f.n $f +done + +cd .. +# for ruby-devel.rpm +mkdir ruby-devel +cd ruby-devel + +cd .. +# for ruby-tcltk.rpm +mkdir ruby-tcltk +cd ruby-tcltk +for target in tcltklib tk +do + (cd ../ruby && + tar cf - `find . -path "*/$target/*"`) | tar xvf - + (cd ../ruby && + rm -rf `find . -name "$target" -type d`) +done + +cd .. +# for ruby-docs.rpm +mkdir ruby-docs +cd ruby-docs +mkdir doc-en doc-ja faq-en faq-ja +(cd ../../ruby-man-`echo %{manver} | sed -e 's/\.[0-9]*$//'` && tar cf - .) | (cd doc-en && tar xvf -) +(cd ../../ruby-man-`echo %{manver} | sed -e 's/\.[0-9]*$//'`-jp && tar cf - .) | (cd doc-ja && tar xvf -) +(cd ../../rubyfaq && tar cf - .) | (cd faq-en && tar xvf -) +(cd ../../rubyfaq-jp && tar cf - .) | (cd faq-ja && tar xvf -) + +(cd faq-ja && + for f in rubyfaq-jp*.html + do + sed -e 's/\( ruby-all.files +egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files + +# for ruby-tcltk.rpm +cp /dev/null ruby-tcltk.files +for f in `cd %{name}-%{version}/ext/tk && find lib -type f; echo *.so` +do + grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files +done +for f in `cd %{name}-%{version}/ext/tcltklib && find lib -type f; echo *.so` +do + grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files +done + +# for irb.rpm +egrep 'irb' ruby-all.files > irb.files + +# for ruby.rpm +sort ruby-all.files \ + ruby-devel.files ruby-tcltk.files irb.files | + uniq -u > ruby.files + +strip ${RPM_BUILD_ROOT}%{prefix}/bin/%{name} + +%clean +rm -rf ${RPM_BUILD_ROOT} +rm -f *.files +rm -rf tmp-ruby-docs + +%post -p /sbin/ldconfig -n ruby + +%postun -p /sbin/ldconfig -n ruby + +%files -f ruby.files -n ruby +%defattr(-, root, root) +%doc %{name}-%{version}/README +%doc %{name}-%{version}/README.jp +%doc %{name}-%{version}/COPYING* +%doc %{name}-%{version}/ChangeLog +%doc %{name}-%{version}/ToDo +%doc tmp-ruby-docs/ruby/* + +%files -f ruby-devel.files -n ruby-devel +%defattr(-, root, root) +%doc %{name}-%{version}/README.EXT +%doc %{name}-%{version}/README.EXT.jp + +%files -f ruby-tcltk.files -n ruby-tcltk +%defattr(-, root, root) +%doc tmp-ruby-docs/ruby-tcltk/ext/* + +%files -f irb.files -n irb +%defattr(-, root, root) + +%files -n ruby-docs +%defattr(-, root, root) +%doc tmp-ruby-docs/ruby-docs/* + +%changelog +* Tue Aug 29 2000 akira yamada +- Updated to version 1.4.6. +- removed ruby-dev.10123.patch(included into ruby-1.4.6). +- Added ruby_cvs.2000082901.patch(upgraded ruby to latest cvs version). + +* Tue Jun 27 2000 akira yamada +- Updated manuals to version 1.4.5. + +* Sun Jun 25 2000 akira yamada +- Added ruby-dev.10123.patch. + +* Sat Jun 24 2000 akira yamada +- Updated to version 1.4.5. +- Removed ruby_cvs.2000062401.patch(included into ruby-1.4.5). + +* Thu Jun 22 2000 akira yamada +- Updated to version 1.4.4(06/22/2000 CVS). +- Removed ruby-dev.10054.patch(included into ruby_cvs.patch). + +* Thu Jun 22 2000 akira yamada +- Renamed to ruby_cvs20000620.patch from ruby_cvs.patch. + +* Tue Jun 20 2000 akira yamada +- Updated to version 1.4.4(06/20/2000 CVS). +- Removed ruby-list.23190.patch(included into ruby_cvs.patch). +- Added ruby-dev.10054.patch. + +* Tue Jun 15 2000 akira yamada +- Updated to version 1.4.4(06/12/2000 CVS). +- Added manuals and FAQs. +- Split into ruby, ruby-devel, ruby-tcltk, ruby-docs, irb. + +* Tue Jun 13 2000 Mitsuo Hamada +- Updated to version 1.4.4 + +* Wed Dec 08 1999 Atsushi Yamagata +- Updated to version 1.4.3 + +* Mon Sep 20 1999 Atsushi Yamagata +- Updated to version 1.4.2 (Sep 18) + +* Fri Sep 17 1999 Atsushi Yamagata +- Updated to version 1.4.2 + +* Tue Aug 17 1999 Atsushi Yamagata +- Updated to version 1.4.0 + +* Fri Jul 23 1999 Atsushi Yamagata +- 2nd release +- Updated to version 1.2.6(15 Jul 1999) +- striped %{prefix}/bin/ruby + +* Mon Jun 28 1999 Atsushi Yamagata +- Updated to version 1.2.6(21 Jun 1999) + +* Wed Apr 14 1999 Atsushi Yamagata +- Updated to version 1.2.5 + +* Fri Apr 09 1999 Atsushi Yamagata +- Updated to version 1.2.4 + +* Fri Dec 25 1998 Toru Hoshina +- Version up to 1.2 stable. + +* Fri Nov 27 1998 Toru Hoshina +- Version up to 1.1c9. + +* Thu Nov 19 1998 Toru Hoshina +- Version up to 1.1c8, however it appear short life :-P + +* Fri Nov 13 1998 Toru Hoshina +- Version up. + +* Mon Sep 22 1998 Toru Hoshina +- To make a libruby.so. + +* Mon Sep 21 1998 Toru Hoshina +- Modified SPEC in order to install libruby.a so that it should be used by + another ruby entention. +- 2nd release. + +* Mon Mar 9 1998 Shoichi OZAWA +- Added a powerPC arch part. Thanks, MURATA Nobuhiro diff --git a/sources b/sources index e69de29..f51813e 100644 --- a/sources +++ b/sources @@ -0,0 +1,5 @@ +3c910657b164749d9b98d7448df17f9a ruby-1.4.6.tar.gz +d529768c828c930c49b3766d13dc1f2c ruby-man-1.4.6-jp.tar.gz +8eed63fec14a719df26247fb8384db5e ruby-man-1.4.6.tar.gz +634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz +4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz From b27f861db052c7c4944643b7bbb256f1c240988c Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:54:49 +0000 Subject: [PATCH 003/529] auto-import changelog data from ruby-1.6.4-2.src.rpm Thu Jul 19 2001 Bernhard Rosenkraenzer 1.6.4-2 - Remove Japanese description and summaries; they belong in specspo and break rpm - Clean up specfile - Mark language specific files (README.jp) as such - bzip2 sources - rename the libruby package to ruby-libs for consistency - Exclude ia64 (doesn't build - the code doesn't seem to be 64-bit clean [has been excluded on alpha forever]) Tue Jul 17 2001 Akira TAGOH 1.6.4-1 - rebuild for Red Hat 7.2 Mon Jun 04 2001 akira yamada - upgrade to nwe upstream version 1.6.4. Mon Apr 02 2001 akira yamada - applied patch: - fixed method cache bug. etc. (Patch103, Patch104) Tue Mar 27 2001 akira yamada - applied patch: - fixed marshal for bignum bug. - fixed scope of constant variables bug. Tue Mar 20 2001 akira yamada - upgraded to new upstream version 1.6.3. Fri Feb 09 2001 akira yamada - fixed bad group for libruby. - Applied patch: upgraded to cvs version (2001-02-08): fixed minor bugs. Thu Jan 18 2001 akira yamada - Applied patch: upgraded to cvs version (2001-01-15): fixed minor bugs(e.g. ruby makes extention librares too large...). Wed Jan 10 2001 akira yamada - Applied patch: upgraded to cvs version (2001-01-09): fixed minor bugs. Sat Dec 30 2000 akira yamada - Applied bug fix patch. Mon Dec 25 2000 akira yamada - Updated to new upstream version 1.6.2. Fri Dec 22 2000 akira yamada - Removed ruby_cvs.2000122019.patch, added ruby_cvs.2000122215.patch (upgraded ruby to latest cvs version, 1.6.2-preview4). Wed Dec 20 2000 akira yamada - Removed ruby_cvs.2000121413.patch, added ruby_cvs.2000122019.patch (upgraded ruby to latest cvs version). - new package: libruby Thu Dec 14 2000 akira yamada - Removed ruby_cvs.2000101901.patch, added ruby_cvs.2000121413.patch (upgraded ruby to latest cvs version). - Removed ruby-dev.11262.patch, ruby-dev.11265.patch, and ruby-dev.11268.patch (included into above patch). Sun Nov 12 2000 MACHINO, Satoshi 1.6.1-0vl9 - build on gcc-2.95.3 Thu Oct 19 2000 akira yamada - Added ruby-dev.11268.patch. Thu Oct 19 2000 akira yamada - Removed ruby_cvs.2000101117.patch and added ruby_cvs.2000101901.patch (upgraded ruby to latest cvs version). - Added ruby-dev.11262.patch. - Added ruby-dev.11265.patch. Wed Oct 11 2000 akira yamada - Removed ruby_cvs.2000100313.patch and added ruby_cvs.2000101117.patch (upgraded ruby to latest cvs version). Mon Oct 09 2000 akira yamada - Removed ruby_cvs.2000100313.patch and added ruby_cvs.2000100313.patch (upgraded ruby to latest cvs version). Tue Oct 03 2000 akira yamada - Removed ruby_cvs.2000100218.patch and added ruby_cvs.2000100313.patch (upgraded ruby to latest cvs version). Mon Oct 02 2000 akira yamada - Removed ruby_cvs.2000092718.patch and added ruby_cvs.2000100218.patch (upgraded ruby to latest cvs version). Wed Sep 27 2000 akira yamada - Updated to upstream version 1.6.1. - Removed ruby_cvs.2000082901.patch and added ruby_cvs.2000092718.patch (upgraded ruby to latest cvs version). --- .cvsignore | 10 +- irb.1 | 488 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ruby.spec | 276 ++++++++++++++++++------------ sources | 10 +- 4 files changed, 670 insertions(+), 114 deletions(-) create mode 100644 irb.1 diff --git a/.cvsignore b/.cvsignore index 14e83ed..4c733b6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,5 +1,5 @@ -ruby-1.4.6.tar.gz -ruby-man-1.4.6-jp.tar.gz -ruby-man-1.4.6.tar.gz -rubyfaq-990927.tar.gz -rubyfaq-jp-990927.tar.gz +ruby-1.6.4.tar.bz2 +ruby-man-1.4.6-jp.tar.bz2 +ruby-man-1.4.6.tar.bz2 +rubyfaq-990927.tar.bz2 +rubyfaq-jp-990927.tar.bz2 diff --git a/irb.1 b/irb.1 new file mode 100644 index 0000000..7fc9828 --- /dev/null +++ b/irb.1 @@ -0,0 +1,488 @@ +.\" DO NOT MODIFY THIS FILE! it was generated by rd2 +.TH irb-beta 1 "May 2001" +.SH What is irb? +.PP +irb stands for `interactive ruby'. irb is a tool to execute interactively +ruby expressions read from stdin. +.SH Invoking +.PP +.nf +\& % ruby \-r irb \-e0 +\& % irb +.fi +Either of the aboves. In the former style, options can be specified +as follows: +.nf +\& % ruby \-r irb \-e0 \-\- \-v +.fi +.SH Usage +.PP +Use of irb is easy if you know ruby. Executing irb, prompts are +displayed as follows. Then, enter expression of ruby. A input is +executed when it is syntacticaly completed. +.nf +\& dim% irb +\& irb(main):001:0> 1+2 +\& 3 +\& irb(main):002:0> class Foo +\& irb(main):003:1> def foo +\& irb(main):004:2> print 1 +\& irb(main):005:2> end +\& irb(main):006:1> end +\& nil +\& irb(main):007:0> +.fi +And, Readline extesion module can be used with irb. Using Readline +is the standard default action if Readline is installed. +.SH Command line option +.PP +.nf +\& irb.rb [options] file_name opts +\& options: +\& \-f suppress read ~/.irbrc +\& \-m bc mode (fraction or matrix are available) +\& \-d set $DEBUG to true (same as `ruby \-d') +\& \-r load\-module same as `ruby \-r' +\& \-\-inspect uses `inspect' for output (the default except bc mode) +\& \-\-noinspect doesn't uses inspect for output +\& \-\-readline uses Readline extension module +\& \-\-noreadline doesn't use Readline extension module +\& \-\-prompt prompt\-mode +\& \-\-prompt\-mode prompt\-mode +.fi +.nf +\& switches prompt mode. Pre\-defined prompt modes are +\& `defalut', `simple', `xmp' and `inf\-ruby' +.fi +.nf +\& \-\-inf\-ruby\-mode uses prompt appreciate for inf\-ruby\-mode on emacs. +.fi +.nf +\& Suppresses \-\-readline. +.fi +.nf +\& \-\-simple\-prompt simple prompt mode +\& \-\-noprompt no prompt +\& \-\-tracer display trace for each execution of commands. +\& \-\-back\-trace\-limit n +.fi +.nf +\& displayes backtrace top n and tail n. The default +\& value is 16. +.fi +.nf +\& \-\-irb_debug n sets internal debug level to n (It shouldn't be used) +\& \-v, \-\-version prints the version of irb +.fi +.SH Configurations +.PP +irb reads `~/.irbrc' when it is invoked. If `~/.irbrb' doesn't exist +irb try to read in the order `.irbrc', `irb.rc', `_irbrc' then `$irbrc'. +The following is altanative to the command line option. To use them +type as follows in an irb session. +.nf +\& IRB.conf[:IRB_NAME]="irb" +\& IRB.conf[:MATH_MODE]=false +\& IRB.conf[:USE_TRACER]=false +\& IRB.conf[:USE_LOADER]=false +\& IRB.conf[:IGNORE_SIGINT]=true +\& IRB.conf[:IGNORE_EOF]=false +\& IRB.conf[:INSPECT_MODE]=nil +\& IRB.conf[:IRB_RC] = nil +\& IRB.conf[:BACK_TRACE_LIMIT]=16 +\& IRB.conf[:USE_LOADER] = false +\& IRB.conf[:USE_READLINE] = nil +\& IRB.conf[:USE_TRACER] = false +\& IRB.conf[:IGNORE_SIGINT] = true +\& IRB.conf[:IGNORE_EOF] = false +\& IRB.conf[:PROMPT_MODE] = :DEFALUT +\& IRB.conf[:PROMPT] = {...} +\& IRB.conf[:DEBUG_LEVEL]=0 +\& IRB.conf[:VERBOSE]=true +.fi +.SH Customizing prompt +.PP +To costomize the prompt you set a variable +.nf +\& IRB.conf[:PROMPT] +.fi +For example, describe as follows in `.irbrc'. +.nf +\& IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode +\& :PROMPT_I => nil, # normal prompt +\& :PROMPT_S => nil, # prompt for continuated strings +\& :PROMPT_C => nil, # prompt for continuated statement +\& :RETURN => " ==>%s\\n" # format to return value +\& } +.fi +Then, invoke irb with the above prompt mode by +.nf +\& % irb \-\-prompt my\-prompt +.fi +Or add the following in `.irbrc'. +.nf +\& IRB.conf[:PROMPT_MODE] = :MY_PROMPT +.fi +Constants PROMPT_I, PROMPT_S and PROMPT_C specifies the format. +In the prompt specification, some special strings are available. +.nf +\& %N command name which is running +\& %m to_s of main object (self) +\& %M inspect of main object (self) +\& %l type of string(", ', /, ]), `]' is inner %w[...] +\& %NNi indent level. NN is degits and means as same as printf("%NNd"). +\& It can be ommited +\& %NNn line number. +\& %% % +.fi +For instance, the default prompt mode is defined as follows: +IRB.conf[:PROMPT_MODE][:DEFAULT] = { + +.TP +.fi +.B +PROMPT_I => "%N(%m):%03n:%i> ", + + +.TP +.fi +.B +PROMPT_S => "%N(%m):%03n:%i%l ", + + +.TP +.fi +.B +PROMPT_C => "%N(%m):%03n:%i* ", + + +.TP +.fi +.B +RETURN => "%s\\n" +} +RETURN is used to printf. +.SH Configurating subirb +.PP +The command line option or IRB.conf specify the default behavior of +(sub)irb. On the other hand, each conf of in the next sction `6. Command' +is used to individually configurate (sub)irb. +If proc is set to IRB.conf[:IRB_RC], its subirb will be invoked after +execution of that proc under giving the context of irb as its +aregument. By this mechanism each subirb can be configurated. +.SH Command +.PP +For irb commands, both simple name and `irb_'\-prefixed name are prepared. + +.TP +.fi +.B +exit, quit, irb_exit +Quits (sub)irb. +if you've done cb (see below), exit from the binding mode. + + +.TP +.fi +.B +conf, irb_context +Displays current configuration. Modifing the configuration is +achieved by sending message to `conf'. + + +.TP +.fi +.B +conf.back_trace_limit +Sets display lines of backtrace as top n and tail n. +The default value is 16. + + +.TP +.fi +.B +conf.debug_level = N +Sets debug level of irb. + + +.TP +.fi +.B +conf.ignore_eof = true/false +Whether ^D (control\-d) will be ignored or not. +If false is set, ^D means quit. + + +.TP +.fi +.B +conf.ignore_sigint= true/false +Whether ^C (control\-c) will be ignored or not. +If false is set, ^D means quit. If true, + +.nf +\& during input: cancel inputing then return to top level. +\& during execute: abondon current execution. +.fi + + +.TP +.fi +.B +conf.inf_ruby_mode = true/false +Whether inf\-ruby\-mode or not. The default value is false. + + +.TP +.fi +.B +conf.inspect_mode = true/false/nil +Specifies inspect mode. +true: display inspect +false: display to_s +nil: inspect mode in non math mode, + +.nf +\& non inspect mode in math mode. +.fi + + +.TP +.fi +.B +conf.irb_level +The level of cb. + + +.TP +.fi +.B +conf.math_mode +Whether bc mode or not. + + +.TP +.fi +.B +conf.use_loader = true/false +Whether irb's own file reader method is used when load/require or not. +This mode is globaly affected (irb wide). + + +.TP +.fi +.B +conf.prompt_c +prompt for a continuating statement (e.g, immediately after of `if') + + +.TP +.fi +.B +conf.prompt_i +standard prompt + + +.TP +.fi +.B +conf.prompt_s +prompt for a continuating string + + +.TP +.fi +.B +conf.rc +Whether ~/.irbrc is read or not. + + +.TP +.fi +.B +conf.use_prompt = true/false +Prompting or not. + + +.TP +.fi +.B +conf.use_readline = true/false/nil +Whether readline is used or not. +true: uses +false: doen't use +nil: intends to use readline except for inf\-reuby\-mode (default) + + +.TP +.fi +.B +conf.verbose=T/F +Whether verbose messages are display or not. + + +.TP +.fi +.B +cb, irb_change_binding [obj] +Enter new binding which has a distinct scope of local variables. +If obj is given, obj will be self. + + +.TP +.fi +.B +irb [obj] +Invoke subirb. If obj is given, obj will be self. + + +.TP +.fi +.B +jobs, irb_jobs +List of subirb + + +.TP +.fi +.B +fg n, irb_fg n +Switch into specified subirb. The following is candidates of n: + +.nf +\& irb number +\& thhread +\& irb object +\& self(obj which is specified of irb obj) +.fi + + +.TP +.fi +.B +kill n, irb_kill n +Kill subirb. The means of n is as same as the case of irb_fg. +.SH System variable +.PP +.nf +\& _ The latest value of evaluation (it is local) +.fi +.SH Session Example +.PP +.nf +\& dim% ruby irb.rb +\& irb(main):001:0> irb # invoke subirb +\& irb#1(main):001:0> jobs # list of subirbs +\& #0\->irb on main (# : stop) +\& #1\->irb#1 on main (# : running) +\& nil +\& irb#1(main):002:0> fg 0 # switch job +\& nil +\& irb(main):002:0> class Foo;end +\& nil +\& irb(main):003:0> irb Foo # invoke subirb which has the +.fi +.nf +\& # context of Foo +.fi +.nf +\& irb#2(Foo):001:0> def foo # define Foo#foo +\& irb#2(Foo):002:1> print 1 +\& irb#2(Foo):003:1> end +\& nil +\& irb#2(Foo):004:0> fg 0 # switch job +\& nil +\& irb(main):004:0> jobs # list of job +\& #0\->irb on main (# : running) +\& #1\->irb#1 on main (# : stop) +\& #2\->irb#2 on Foo (# : stop) +\& nil +\& irb(main):005:0> Foo.instance_methods # Foo#foo is defined asurely +\& ["foo"] +\& irb(main):006:0> fg 2 # switch job +\& nil +\& irb#2(Foo):005:0> def bar # define Foo#bar +\& irb#2(Foo):006:1> print "bar" +\& irb#2(Foo):007:1> end +\& nil +\& irb#2(Foo):010:0> Foo.instance_methods +\& ["bar", "foo"] +\& irb#2(Foo):011:0> fg 0 +\& nil +\& irb(main):007:0> f = Foo.new +\& # +\& irb(main):008:0> irb f # invoke subirb which has the +.fi +.nf +\& # context of f (instance of Foo) +.fi +.nf +\& irb#3(#):001:0> jobs +\& #0\->irb on main (# : stop) +\& #1\->irb#1 on main (# : stop) +\& #2\->irb#2 on Foo (# : stop) +\& #3\->irb#3 on # (# : running) +\& nil +\& irb#3(#):002:0> foo # evaluate f.foo +\& 1nil +\& irb#3(#):003:0> bar # evaluate f.bar +\& barnil +\& irb#3(#):004:0> kill 1, 2, 3# kill job +\& nil +\& irb(main):009:0> jobs +\& #0\->irb on main (# : running) +\& nil +\& irb(main):010:0> exit # exit +\& dim% +.fi +.SH Restrictions +.PP +Because irb evaluates the inputs immediately after the imput is +syntactically completed, irb gives slight different result than +directly use ruby. Known difference is pointed out here. +.SH Declaration of the local variable +.PP +The following causes an error in ruby: +.nf +\& eval "foo = 0" +\& foo +\& \-\- +\& \-:2: undefined local variable or method `foo' for # (NameError) +\& \-\-\- +\& NameError +.fi +Though, the above will successfully done by irb. +.nf +\& >> eval "foo = 0" +.fi +.nf +\& => 0 +\& >> foo +\& => 0 +.fi +Ruby evaluates a code after reading entire of code and determination +of the scope of local variables. On the other hand, irb do +immediately. More precisely, irb evaluate at first +.nf +\& evel "foo = 0" +.fi +then foo is defined on this timing. It is because of this +incompatibility. +If you'd like to detect those differences, begin...end can be used: +.nf +\& >> begin +\& ?> eval "foo = 0" +\& >> foo +\& >> end +\& NameError: undefined local variable or method `foo' for # +\& (irb):3 +\& (irb_local_binding):1:in `eval' +.fi +.SH Here\-document +.PP +Implementation of Here\-document is incomplete. +.SH Symbol +.PP +Irb can not always recognize a symbol as to be Symbol. Concretely, an +expression have completed, however Irb regard it as continuation line. + diff --git a/ruby.spec b/ruby.spec index f823d2f..40ba73d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,124 +1,86 @@ -%define rubyver 1.4.6 -%define manver %{rubyver} -%define rpmrel 2 -Summary: An interpeter of object-oriented scripting language +%define manver 1.4.6 +Summary: An interpreter of object-oriented scripting language Name: ruby -Version: %{rubyver} -Release: %{rpmrel} -#Distribution: -Copyright: distributable +Version: 1.6.4 +Release: 2 +License: Dual-licensed GPL/Artistic-like Group: Development/Languages -Source0: ftp://ftp.netlab.co.jp/pub/lang/%{name}/%{name}-%{version}.tar.gz -Source1: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/%{name}-man-%{manver}.tar.gz -Source2: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/%{name}-man-%{manver}-jp.tar.gz -Source3: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/rubyfaq-990927.tar.gz -Source4: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/rubyfaq-jp-990927.tar.gz -Patch1: ruby-jcode.rb-utf8.patch -Patch2: ruby_cvs.2000082917.patch +Source0: ftp://ftp.ruby-lang.org/pub/lang/%{name}/%{name}-%{version}.tar.bz2 +Source1: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/%{name}-man-%{manver}.tar.bz2 +Source2: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/%{name}-man-%{manver}-jp.tar.bz2 +Source3: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/rubyfaq-990927.tar.bz2 +Source4: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/rubyfaq-jp-990927.tar.bz2 +Source5: irb.1 URL: http://www.ruby-lang.org/ -Prefix: /usr BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk -Vendor: Red Hat, Inc. -Packager: akira yamada -Summary(ja): オブジェクト指向言語Rubyインタプリタ +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk autoconf gcc +Requires: %{name}-libs = %{version}-%{release} +ExcludeArch: alpha ia64 %description -Ruby is the interpreted scripting language for quick and -easy object-oriented programming. It has many features to -process text files and to do system management tasks (as in -Perl). It is simple, straight-forward, and extensible. +Ruby is the interpreted scripting language for quick and easy +object-oriented programming. It has many features to process text +files and to do system management tasks (as in Perl). It is simple, +straight-forward, and extensible. -%description -l ja -Rubyはシンプルかつ強力なオブジェクト指向スクリプト言語です. -Rubyは最初から純粋なオブジェクト指向言語として設計されていま -すから,オブジェクト指向プログラミングを手軽に行う事が出来ま -す.もちろん通常の手続き型のプログラミングも可能です. +%package libs +Summary: Libraries necessary to run Ruby. +Group: Development/Libraries +URL: http://www.ruby-lang.org/ +Provides: libruby +Obsoletes: libruby -Rubyはテキスト処理関係の能力などに優れ,Perlと同じくらい強力 -です.さらにシンプルな文法と,例外処理やイテレータなどの機構 -によって,より分かりやすいプログラミングが出来ます. +%description libs +This package includes the libruby, necessary to run Ruby. -%package -n ruby-devel +%package devel Summary: A Ruby development environment. Group: Development/Languages -Requires: ruby = %{PACKAGE_VERSION} +Requires: %{name} = %{version}-%{release} URL: http://www.ruby-lang.org/ -%description -n ruby-devel +%description devel Header files and libraries for building a extension library for the Ruby or an application embedded Ruby. -%description -n ruby-devel -l ja -Rubyのための拡張ライブラリやRubyを組み込んだアプリケーションを作るため -に必要となるへッダファイルやライブラリです. - -%package -n ruby-tcltk +%package tcltk Summary: Tcl/Tk interface for scripting language Ruby. Group: Development/Languages -Requires: ruby = %{PACKAGE_VERSION} +Requires: %{name}-libs = %{version}-%{release} URL: http://www.ruby-lang.org/ -%description -n ruby-tcltk +%description tcltk Tcl/Tk interface for the object-oriented scripting language Ruby. -%description -n ruby-tcltk -l ja -RubyにTcl/Tkライブラリへのインタフェースを提供する拡張ライブラリです. - %package -n irb Summary: The Intaractive Ruby. Group: Development/Languages -Requires: ruby = %{PACKAGE_VERSION} +Requires: %{name}-libs = %{version}-%{release} URL: http://www.ruby-lang.org/ %description -n irb The irb is acronym for Interactive RuBy. It evaluates ruby expression from the terminal. -%description -n irb -l ja -irbとはInteractive RuByの略で,対話的にRubyの式を入力し,評価させるこ -とが可能です. - -%package -n ruby-docs +%package docs Summary: Manuals and FAQs for scripting language Ruby. Group: Documentation URL: http://www.ruby-lang.org/ -%description -n ruby-docs +%description docs Manuals and FAQs for the object-oriented scripting language Ruby. -%description -n ruby-docs -l ja -オブジェクト指向スクリプト言語Rubyについてのマ二ュアルとFAQです. - %prep - %setup -q -c -a 1 -a 2 -a 3 -a 4 -cd %{name}-%{version} -#%patch0 -p1 -%patch1 -p1 -%patch2 -p1 - -#%patch10 -p1 - -cd ../../.. - - %build - cd %{name}-%{version} -#CFLAGS="${RPM_OPT_FLAGS}" ./configure \ -# --prefix=%{prefix} \ -# --mandir=%{prefix}/man \ -# --with-default-kcode=none \ -# --with-dbm-include=/usr/include/db1 \ -# --enable-shared \ -# --enable-ipv6 \ -# --with-lookup-order-hack=INET -# ${RPM_ARCH}-linux +%ifarch alpha +autoconf +CFLAGS="-O0" CXXFLAGS="-O0" ./configure \ +%else %configure \ - --prefix=%{prefix} \ - --mandir=%{prefix}/share/man \ +%endif --with-default-kcode=none \ --with-dbm-include=/usr/include/db1 \ --enable-shared \ @@ -128,11 +90,7 @@ cd %{name}-%{version} make make test -cd .. - - %install - rm -rf ${RPM_BUILD_ROOT} # installing documents and exapmles... @@ -145,10 +103,10 @@ cd ruby (cd ../../%{name}-%{version} && tar cf - misc sample lib/README*) | tar xvf - (cd ../../%{name}-%{version} && - tar cf - `find ext - -mindepth 1 - \( -path '*/sample/*' -o -path '*/demo/*' \) -o - \( -name '*.rb' -not -path '*/lib/*' -not -name extconf.rb \) -o + tar cf - `find ext \ + -mindepth 1 \ + \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ + \( -name '*.rb' -not -path '*/lib/*' -not -name extconf.rb \) -o \ \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \)`) | tar xvf - # fixing `#!' paths @@ -203,15 +161,17 @@ make DESTDIR=${RPM_BUILD_ROOT} install cd .. # XXX: installing irb -mv tmp-ruby-docs/ruby/sample/irb.rb $RPM_BUILD_ROOT%{prefix}/bin/irb -chmod 555 $RPM_BUILD_ROOT%{prefix}/bin/irb +#mv tmp-ruby-docs/ruby/sample/irb.rb $RPM_BUILD_ROOT%{_bindir}/irb +chmod 555 $RPM_BUILD_ROOT%{_bindir}/irb +install ${RPM_SOURCE_DIR}/irb.1 $RPM_BUILD_ROOT%{_mandir}/man1/ # listing all files in ruby-all.files -(find $RPM_BUILD_ROOT%{prefix}/bin \ - $RPM_BUILD_ROOT%{prefix}/lib \ - $RPM_BUILD_ROOT%{prefix}/man \ +(find $RPM_BUILD_ROOT%{_bindir} \ + $RPM_BUILD_ROOT%{_libdir} \ + $RPM_BUILD_ROOT%{_mandir} \ -type f -o -type l) | - sort | sed -e "s,^$RPM_BUILD_ROOT,," > ruby-all.files + sort | sed -e "s,^$RPM_BUILD_ROOT,," \ + -e "s,\(/man/man./.*\)$,\1*," > ruby-all.files egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files # for ruby-tcltk.rpm @@ -226,50 +186,158 @@ do done # for irb.rpm -egrep 'irb' ruby-all.files > irb.files +fgrep 'irb' ruby-all.files > irb.files + +# for ruby-libs +cp /dev/null ruby-libs.files +(fgrep '%{_libdir}' ruby-all.files; + fgrep -h '%{_libdir}' ruby-devel.files ruby-tcltk.files irb.files) | + sort | uniq -u > ruby-libs.files # for ruby.rpm sort ruby-all.files \ - ruby-devel.files ruby-tcltk.files irb.files | + ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files | uniq -u > ruby.files -strip ${RPM_BUILD_ROOT}%{prefix}/bin/%{name} +strip ${RPM_BUILD_ROOT}%{_bindir}/%{name} %clean rm -rf ${RPM_BUILD_ROOT} rm -f *.files rm -rf tmp-ruby-docs -%post -p /sbin/ldconfig -n ruby +%post libs -p /sbin/ldconfig -%postun -p /sbin/ldconfig -n ruby +%postun libs -p /sbin/ldconfig -%files -f ruby.files -n ruby +%files -f ruby.files %defattr(-, root, root) %doc %{name}-%{version}/README -%doc %{name}-%{version}/README.jp +%lang(ja) %doc %{name}-%{version}/README.jp %doc %{name}-%{version}/COPYING* %doc %{name}-%{version}/ChangeLog %doc %{name}-%{version}/ToDo +%doc %{name}-%{version}/doc/NEWS %doc tmp-ruby-docs/ruby/* -%files -f ruby-devel.files -n ruby-devel +%files devel -f ruby-devel.files %defattr(-, root, root) %doc %{name}-%{version}/README.EXT -%doc %{name}-%{version}/README.EXT.jp +%lang(ja) %doc %{name}-%{version}/README.EXT.jp -%files -f ruby-tcltk.files -n ruby-tcltk +%files libs -f ruby-libs.files +%defattr(-, root, root) +%doc %{name}-%{version}/README +%lang(ja) %doc %{name}-%{version}/README.jp +%doc %{name}-%{version}/doc/NEWS + +%files tcltk -f ruby-tcltk.files %defattr(-, root, root) %doc tmp-ruby-docs/ruby-tcltk/ext/* -%files -f irb.files -n irb +%files -n irb -f irb.files %defattr(-, root, root) -%files -n ruby-docs +%files docs %defattr(-, root, root) %doc tmp-ruby-docs/ruby-docs/* %changelog +* Thu Jul 19 2001 Bernhard Rosenkraenzer 1.6.4-2 +- Remove Japanese description and summaries; they belong in specspo and + break rpm +- Clean up specfile +- Mark language specific files (README.jp) as such +- bzip2 sources +- rename the libruby package to ruby-libs for consistency +- Exclude ia64 (doesn't build - the code doesn't seem to be 64-bit clean + [has been excluded on alpha forever]) + +* Tue Jul 17 2001 Akira TAGOH 1.6.4-1 +- rebuild for Red Hat 7.2 + +* Mon Jun 04 2001 akira yamada +- upgrade to nwe upstream version 1.6.4. + +* Mon Apr 02 2001 akira yamada +- applied patch: + - fixed method cache bug. etc. (Patch103, Patch104) + +* Tue Mar 27 2001 akira yamada +- applied patch: + - fixed marshal for bignum bug. + - fixed scope of constant variables bug. + +* Tue Mar 20 2001 akira yamada +- upgraded to new upstream version 1.6.3. + +* Fri Feb 09 2001 akira yamada +- fixed bad group for libruby. +- Applied patch: upgraded to cvs version (2001-02-08): + fixed minor bugs. + +* Thu Jan 18 2001 akira yamada +- Applied patch: upgraded to cvs version (2001-01-15): + fixed minor bugs(e.g. ruby makes extention librares too large...). + +* Wed Jan 10 2001 akira yamada +- Applied patch: upgraded to cvs version (2001-01-09): + fixed minor bugs. + +* Sat Dec 30 2000 akira yamada +- Applied bug fix patch. + +* Mon Dec 25 2000 akira yamada +- Updated to new upstream version 1.6.2. + +* Fri Dec 22 2000 akira yamada +- Removed ruby_cvs.2000122019.patch, added ruby_cvs.2000122215.patch + (upgraded ruby to latest cvs version, 1.6.2-preview4). + +* Wed Dec 20 2000 akira yamada +- Removed ruby_cvs.2000121413.patch, added ruby_cvs.2000122019.patch + (upgraded ruby to latest cvs version). +- new package: libruby + +* Thu Dec 14 2000 akira yamada +- Removed ruby_cvs.2000101901.patch, added ruby_cvs.2000121413.patch + (upgraded ruby to latest cvs version). +- Removed ruby-dev.11262.patch, ruby-dev.11265.patch, + and ruby-dev.11268.patch (included into above patch). + +* Sun Nov 12 2000 MACHINO, Satoshi 1.6.1-0vl9 +- build on gcc-2.95.3 + +* Thu Oct 19 2000 akira yamada +- Added ruby-dev.11268.patch. + +* Thu Oct 19 2000 akira yamada +- Removed ruby_cvs.2000101117.patch and added ruby_cvs.2000101901.patch + (upgraded ruby to latest cvs version). +- Added ruby-dev.11262.patch. +- Added ruby-dev.11265.patch. + +* Wed Oct 11 2000 akira yamada +- Removed ruby_cvs.2000100313.patch and added ruby_cvs.2000101117.patch + (upgraded ruby to latest cvs version). + +* Mon Oct 09 2000 akira yamada +- Removed ruby_cvs.2000100313.patch and added ruby_cvs.2000100313.patch + (upgraded ruby to latest cvs version). + +* Tue Oct 03 2000 akira yamada +- Removed ruby_cvs.2000100218.patch and added ruby_cvs.2000100313.patch + (upgraded ruby to latest cvs version). + +* Mon Oct 02 2000 akira yamada +- Removed ruby_cvs.2000092718.patch and added ruby_cvs.2000100218.patch + (upgraded ruby to latest cvs version). + +* Thu Sep 27 2000 akira yamada +- Updated to upstream version 1.6.1. +- Removed ruby_cvs.2000082901.patch and added ruby_cvs.2000092718.patch + (upgraded ruby to latest cvs version). + * Tue Aug 29 2000 akira yamada - Updated to version 1.4.6. - removed ruby-dev.10123.patch(included into ruby-1.4.6). diff --git a/sources b/sources index f51813e..d5f9aea 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -3c910657b164749d9b98d7448df17f9a ruby-1.4.6.tar.gz -d529768c828c930c49b3766d13dc1f2c ruby-man-1.4.6-jp.tar.gz -8eed63fec14a719df26247fb8384db5e ruby-man-1.4.6.tar.gz -634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz -4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz +5d8d806a11dd4318d8213d43308860c2 ruby-1.6.4.tar.bz2 +4177aba36004e43afb22c983989c9006 ruby-man-1.4.6-jp.tar.bz2 +8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 +7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 +8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 From 1875f02ec0520a9b50f00faa49bf6423e5ecd34d Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:55:14 +0000 Subject: [PATCH 004/529] auto-import changelog data from ruby-1.6.4-4.src.rpm Thu Dec 06 2001 Elliot Lee 1.6.4-4 - Added some patches to make it build on alpha --- ruby.spec | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/ruby.spec b/ruby.spec index 40ba73d..bae82b5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,8 +1,12 @@ +%ifarch alpha +%define optflags -O2 -mieee -g -Wall -pipe -D_GNU_SOURCE +%endif + %define manver 1.4.6 -Summary: An interpreter of object-oriented scripting language +Summary: An interpreter of object-oriented scripting language. Name: ruby Version: 1.6.4 -Release: 2 +Release: 4 License: Dual-licensed GPL/Artistic-like Group: Development/Languages Source0: ftp://ftp.ruby-lang.org/pub/lang/%{name}/%{name}-%{version}.tar.bz2 @@ -15,12 +19,14 @@ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk autoconf gcc Requires: %{name}-libs = %{version}-%{release} -ExcludeArch: alpha ia64 +Patch: ruby-1.6.4-warnings.patch +Patch1: ruby-1.6.4-mowarnings.patch +Patch2: ruby-1.6.4-stacklevel.patch %description Ruby is the interpreted scripting language for quick and easy -object-oriented programming. It has many features to process text -files and to do system management tasks (as in Perl). It is simple, +object-oriented programming. It has many features to process text +files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible. %package libs @@ -33,6 +39,7 @@ Obsoletes: libruby %description libs This package includes the libruby, necessary to run Ruby. + %package devel Summary: A Ruby development environment. Group: Development/Languages @@ -52,6 +59,7 @@ URL: http://www.ruby-lang.org/ %description tcltk Tcl/Tk interface for the object-oriented scripting language Ruby. + %package -n irb Summary: The Intaractive Ruby. Group: Development/Languages @@ -59,8 +67,8 @@ Requires: %{name}-libs = %{version}-%{release} URL: http://www.ruby-lang.org/ %description -n irb -The irb is acronym for Interactive RuBy. It evaluates ruby expression -from the terminal. +IRB, Interactive RuBy, evaluates ruby expressions from the terminal. + %package docs Summary: Manuals and FAQs for scripting language Ruby. @@ -70,25 +78,24 @@ URL: http://www.ruby-lang.org/ %description docs Manuals and FAQs for the object-oriented scripting language Ruby. + %prep %setup -q -c -a 1 -a 2 -a 3 -a 4 +%patch -p1 +%patch1 -p1 +%patch2 -p1 %build cd %{name}-%{version} -%ifarch alpha -autoconf -CFLAGS="-O0" CXXFLAGS="-O0" ./configure \ -%else %configure \ -%endif --with-default-kcode=none \ --with-dbm-include=/usr/include/db1 \ --enable-shared \ --enable-ipv6 \ --with-lookup-order-hack=INET -make -make test +make %{?_smp_mflags} +make %{?_smp_mflags} test %install rm -rf ${RPM_BUILD_ROOT} @@ -243,6 +250,9 @@ rm -rf tmp-ruby-docs %doc tmp-ruby-docs/ruby-docs/* %changelog +* Thu Dec 06 2001 Elliot Lee 1.6.4-4 +- Added some patches to make it build on alpha + * Thu Jul 19 2001 Bernhard Rosenkraenzer 1.6.4-2 - Remove Japanese description and summaries; they belong in specspo and break rpm From 53133ba46342da49d20ebe96b83798183097d83e Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:55:45 +0000 Subject: [PATCH 005/529] auto-import changelog data from ruby-1.6.7-1.src.rpm Fri Mar 08 2002 Akira TAGOH 1.6.7-1 - New upstream release. - ruby-1.6.6-100.patch, ruby-1.6.6-501-ruby-mode.patch: removed. these patches no longer should be needed. - ruby-1.6.7-500-marshal-proc.patch: applied a fix patch. (ruby-dev#16178: Marshal::dump should call Proc#call.) - ruby-1.6.7-501-class-var.patch: applied a fix patch. (ruby-talk#35157: class vars broken in 1.6.7) Wed Feb 27 2002 Akira TAGOH 1.6.6-5 - Disable alpha because nothing is xemacs for alpha now. Tue Feb 05 2002 Akira TAGOH 1.6.6-3 - Fixed the duplicate files. Tue Feb 05 2002 Akira TAGOH 1.6.6-2 - Fixed the missing %defattr Fri Feb 01 2002 Akira TAGOH 1.6.6-1 - New upstream release. - Applied bug fix patches: - ruby-1.6.6-501-ruby-mode.patch: ruby-talk#30479: disables font-lock coloring. - ruby-1.6.6-100.patch: ruby-talk#30203: Ruby 1.6.6 bug and fix ruby-list#33047: regex bug PR#230: problem with -d in 1.6.6 - Added ruby-mode and ruby-mode-xemacs packages. - Ruby works fine for ia64. so re-enable to build with ia64. (probably it should be worked for alpha) Wed Jan 09 2002 Tim Powers - automated rebuild --- .cvsignore | 2 +- ruby-mode-init.el | 20 +++ ruby.spec | 352 +++++++++++++++++++++++++++++++++------------- sources | 2 +- 4 files changed, 278 insertions(+), 98 deletions(-) create mode 100644 ruby-mode-init.el diff --git a/.cvsignore b/.cvsignore index 4c733b6..6fab036 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ -ruby-1.6.4.tar.bz2 +ruby-1.6.7.tar.bz2 ruby-man-1.4.6-jp.tar.bz2 ruby-man-1.4.6.tar.bz2 rubyfaq-990927.tar.bz2 diff --git a/ruby-mode-init.el b/ruby-mode-init.el new file mode 100644 index 0000000..fcd99db --- /dev/null +++ b/ruby-mode-init.el @@ -0,0 +1,20 @@ +;; ruby-mode-init.el +;; Created: 2002-02-01 +;; +(if (featurep 'xemacs) + (setq load-path (cons "/usr/lib/xemacs/xemacs-packages/lisp/ruby-mode" load-path)) + (setq load-path (cons "/usr/share/emacs/site-lisp/ruby-mode" load-path))) + + +(autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files" t) +(setq auto-mode-alist + (cons '("\\.rb$" . ruby-mode) auto-mode-alist)) +(setq interpreter-mode-alist + (cons '("ruby" . ruby-mode) interpreter-mode-alist)) + +(autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process") +(autoload 'inf-ruby-keys "inf-ruby" "Set local key defs for inf-ruby in ruby-mode") + +(add-hook 'ruby-mode-hook + '(lambda () + (inf-ruby-keys))) diff --git a/ruby.spec b/ruby.spec index bae82b5..dc4e2ea 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,148 +1,200 @@ -%ifarch alpha -%define optflags -O2 -mieee -g -Wall -pipe -D_GNU_SOURCE -%endif - %define manver 1.4.6 -Summary: An interpreter of object-oriented scripting language. -Name: ruby -Version: 1.6.4 -Release: 4 -License: Dual-licensed GPL/Artistic-like -Group: Development/Languages -Source0: ftp://ftp.ruby-lang.org/pub/lang/%{name}/%{name}-%{version}.tar.bz2 -Source1: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/%{name}-man-%{manver}.tar.bz2 -Source2: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/%{name}-man-%{manver}-jp.tar.bz2 -Source3: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/rubyfaq-990927.tar.bz2 -Source4: ftp://ftp.netlab.co.jp/pub/lang/%{name}/doc/rubyfaq-jp-990927.tar.bz2 -Source5: irb.1 -URL: http://www.ruby-lang.org/ -BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk autoconf gcc -Requires: %{name}-libs = %{version}-%{release} -Patch: ruby-1.6.4-warnings.patch -Patch1: ruby-1.6.4-mowarnings.patch -Patch2: ruby-1.6.4-stacklevel.patch +%define rubyxver 1.6 +%define sitedir %{_prefix}/local/lib/site_ruby/%{rubyxver} + +Name: ruby +Version: 1.6.7 +Release: 1 +License: Distributable +URL: http://www.ruby-lang.org/ +BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk XFree86-devel autoconf gcc +BuildPreReq: emacs xemacs + + +## all archives are re-compressed with bzip2 instead of gzip +##Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz +Source0: %{name}-%{version}.tar.bz2 +##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz +Source1: %{name}-man-%{manver}.tar.bz2 +##Source2: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}-jp.tar.gz +Source2: %{name}-man-%{manver}-jp.tar.bz2 +##Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz +Source3: rubyfaq-990927.tar.bz2 +##Source4: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz +Source4: rubyfaq-jp-990927.tar.bz2 +Source5: irb.1 +Source10: ruby-mode-init.el + +Patch500: ruby-1.6.7-500-marshal-proc.patch +Patch501: ruby-1.6.7-501-class-var.patch +Patch900: ruby-1.6.6-900-XXX-strtod.patch + + +Summary: An interpreter of object-oriented scripting language +Group: Development/Languages +Requires: %{name}-libs = %{version}-%{release} %description Ruby is the interpreted scripting language for quick and easy -object-oriented programming. It has many features to process text -files and to do system management tasks (as in Perl). It is simple, +object-oriented programming. It has many features to process text +files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible. + %package libs -Summary: Libraries necessary to run Ruby. -Group: Development/Libraries -URL: http://www.ruby-lang.org/ -Provides: libruby -Obsoletes: libruby +Summary: Libraries necessary to run Ruby. +Group: Development/Libraries +Provides: libruby +Obsoletes: libruby %description libs This package includes the libruby, necessary to run Ruby. %package devel -Summary: A Ruby development environment. -Group: Development/Languages -Requires: %{name} = %{version}-%{release} -URL: http://www.ruby-lang.org/ +Summary: A Ruby development environment. +Group: Development/Languages +Requires: %{name}-libs = %{version}-%{release} %description devel Header files and libraries for building a extension library for the Ruby or an application embedded Ruby. + %package tcltk -Summary: Tcl/Tk interface for scripting language Ruby. -Group: Development/Languages -Requires: %{name}-libs = %{version}-%{release} -URL: http://www.ruby-lang.org/ +Summary: Tcl/Tk interface for scripting language Ruby. +Group: Development/Languages +Requires: %{name}-libs = %{version}-%{release} %description tcltk Tcl/Tk interface for the object-oriented scripting language Ruby. %package -n irb -Summary: The Intaractive Ruby. -Group: Development/Languages -Requires: %{name}-libs = %{version}-%{release} -URL: http://www.ruby-lang.org/ +Summary: The Intaractive Ruby. +Group: Development/Languages +Requires: %{name} = %{version}-%{release} %description -n irb -IRB, Interactive RuBy, evaluates ruby expressions from the terminal. +The irb is acronym for Interactive RuBy. It evaluates ruby expression +from the terminal. %package docs -Summary: Manuals and FAQs for scripting language Ruby. -Group: Documentation -URL: http://www.ruby-lang.org/ +Summary: Manuals and FAQs for scripting language Ruby. +Group: Documentation %description docs Manuals and FAQs for the object-oriented scripting language Ruby. +%package mode +Summary: Emacs Lisp ruby-mode for the scripting language Ruby +Group: Applications/Editors +Requires: emacs + +%description mode +Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. + + +%package mode-xemacs +Summary: Emacs Lisp ruby-mode for the scripting language Ruby +Group: Applications/Editors +Requires: xemacs +ExcludeArch: alpha + +%description mode-xemacs +Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. + + %prep %setup -q -c -a 1 -a 2 -a 3 -a 4 -%patch -p1 -%patch1 -p1 -%patch2 -p1 +pushd %{name}-%{version} +%patch500 -p1 +%patch501 -p1 +%patch900 -p1 +popd %build -cd %{name}-%{version} -%configure \ +pushd %{name}-%{version} +autoconf + +%ifarch alpha ia64 +rb_cv_func_strtod=no CFLAGS="-O0" CXXFLAGS="-O0" ./configure \ +%else +rb_cv_func_strtod=no ./configure \ +%endif + --prefix=%{_prefix} \ + --mandir='${prefix}/share/man' \ + --sysconfdir=%{_sysconfdir} \ + --localstatedir=%{_localstatedir} \ + --with-sitedir='${prefix}/local/lib/site_ruby/%{rubyxver}' \ --with-default-kcode=none \ --with-dbm-include=/usr/include/db1 \ --enable-shared \ --enable-ipv6 \ - --with-lookup-order-hack=INET + --with-lookup-order-hack=INET \ + %{_target_cpu}-%{_target_os} -make %{?_smp_mflags} -make %{?_smp_mflags} test +make +make test + +popd %install -rm -rf ${RPM_BUILD_ROOT} +[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT + +%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode +%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d +%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/ruby-mode +%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/site-start.d # installing documents and exapmles... mkdir tmp-ruby-docs cd tmp-ruby-docs # for ruby.rpm -mkdir ruby +mkdir ruby ruby-libs ruby-devel ruby-tcltk ruby-docs irb cd ruby -(cd ../../%{name}-%{version} && - tar cf - misc sample lib/README*) | tar xvf - -(cd ../../%{name}-%{version} && +(cd ../../%{name}-%{version} && tar cf - sample) | tar xvf - +cd .. + +# for ruby-libs +cd ruby-libs +(cd ../../%{name}-%{version} && tar cf - lib/README*) | tar xvf - +(cd ../../%{name}-%{version}/doc && tar cf - .) | tar xvf - +(cd ../../%{name}-%{version} && tar cf - `find ext \ -mindepth 1 \ \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ \( -name '*.rb' -not -path '*/lib/*' -not -name extconf.rb \) -o \ \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \)`) | tar xvf - - -# fixing `#!' paths -for f in `find . -type f` -do - sed -e 's,^#![ ]*\([^ ]*\)/\(ruby\|with\|perl\|env\),#!/usr/bin/\2,' < $f > $f.n - mv -f $f.n $f -done - cd .. -# for ruby-devel.rpm -mkdir ruby-devel + +# for irb +cd irb +mv ../ruby-libs/irb/* . +rmdir ../ruby-libs/irb +cd .. + +# for ruby-devel cd ruby-devel cd .. -# for ruby-tcltk.rpm -mkdir ruby-tcltk + +# for ruby-tcltk cd ruby-tcltk for target in tcltklib tk do - (cd ../ruby && + (cd ../ruby-libs && tar cf - `find . -path "*/$target/*"`) | tar xvf - - (cd ../ruby && + (cd ../ruby-libs && rm -rf `find . -name "$target" -type d`) done - cd .. -# for ruby-docs.rpm -mkdir ruby-docs + +# for ruby-docs cd ruby-docs mkdir doc-en doc-ja faq-en faq-ja (cd ../../ruby-man-`echo %{manver} | sed -e 's/\.[0-9]*$//'` && tar cf - .) | (cd doc-en && tar xvf -) @@ -158,36 +210,78 @@ mkdir doc-en doc-ja faq-en faq-ja rm -f $f; \ done) +cd .. + +# fixing `#!' paths +for f in `find . -type f` +do + sed -e 's,^#![ ]*\([^ ]*\)/\(ruby\|with\|perl\|env\),#!/usr/bin/\2,' < $f > $f.n + if ! cmp $f $f.n + then + mv -f $f.n $f + else + rm -f $f.n + fi +done # done -cd ../.. +cd .. # installing binaries ... cd %{name}-%{version} -make DESTDIR=${RPM_BUILD_ROOT} install +make DESTDIR=$RPM_BUILD_ROOT install cd .. # XXX: installing irb -#mv tmp-ruby-docs/ruby/sample/irb.rb $RPM_BUILD_ROOT%{_bindir}/irb chmod 555 $RPM_BUILD_ROOT%{_bindir}/irb -install ${RPM_SOURCE_DIR}/irb.1 $RPM_BUILD_ROOT%{_mandir}/man1/ +install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ + +# installing ruby-mode +cd %{name}-%{version} +cp misc/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode +cp misc/*.el $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/ruby-mode + +## for ruby-mode +pushd $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode +cat < path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +emacs --no-site-file -q -batch -l path.el -f batch-byte-compile *.el +rm -f path.el* +popd +install -m 644 %{SOURCE10} \ + $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d + +## for ruby-mode-xemacs +pushd $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/ruby-mode +cat < path.el +(setq load-path (cons "." load-path) byte-compile-warnings nil) +EOF +xemacs -no-site-file -q -batch -l path.el -f batch-byte-compile *.el +rm -f path.el* +popd +install -m 644 %{SOURCE10} \ + $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/site-start.d + +cd .. # listing all files in ruby-all.files (find $RPM_BUILD_ROOT%{_bindir} \ + $RPM_BUILD_ROOT%{_datadir} \ $RPM_BUILD_ROOT%{_libdir} \ $RPM_BUILD_ROOT%{_mandir} \ -type f -o -type l) | - sort | sed -e "s,^$RPM_BUILD_ROOT,," \ - -e "s,\(/man/man./.*\)$,\1*," > ruby-all.files + sort | uniq | sed -e "s,^$RPM_BUILD_ROOT,," \ + -e "s,\(/man/man./.*\)$,\1*," > ruby-all.files egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files # for ruby-tcltk.rpm cp /dev/null ruby-tcltk.files -for f in `cd %{name}-%{version}/ext/tk && find lib -type f; echo *.so` +for f in `find %{name}-%{version}/ext/tk/lib -type f; echo %{name}-%{version}/ext/tk/*.so` do grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files done -for f in `cd %{name}-%{version}/ext/tcltklib && find lib -type f; echo *.so` +for f in `find %{name}-%{version}/ext/tcltklib/lib -type f; echo %{name}-%{version}/ext/tcltklib/*.so` do grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files done @@ -198,31 +292,55 @@ fgrep 'irb' ruby-all.files > irb.files # for ruby-libs cp /dev/null ruby-libs.files (fgrep '%{_libdir}' ruby-all.files; - fgrep -h '%{_libdir}' ruby-devel.files ruby-tcltk.files irb.files) | + fgrep -h '%{_libdir}' ruby-devel.files ruby-tcltk.files irb.files) | egrep -v "elc?$" | \ sort | uniq -u > ruby-libs.files +# for ruby-mode +cp /dev/null ruby-mode.files +fgrep '.el' ruby-all.files | grep -v xemacs >> ruby-mode.files + +# for ruby-mode-xemacs +cp /dev/null ruby-mode-xemacs.files +fgrep '.el' ruby-all.files | grep -v share >> ruby-mode-xemacs.files + # for ruby.rpm sort ruby-all.files \ - ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files | + ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files ruby-mode.files ruby-mode-xemacs.files | uniq -u > ruby.files -strip ${RPM_BUILD_ROOT}%{_bindir}/%{name} +strip $RPM_BUILD_ROOT%{_bindir}/%{name} %clean -rm -rf ${RPM_BUILD_ROOT} +[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT rm -f *.files rm -rf tmp-ruby-docs -%post libs -p /sbin/ldconfig +%post libs +/sbin/ldconfig +if [ -w %{_prefix}/local/lib -a ! -e %{sitedir} ]; then + mkdir -p %{sitedir} %{sitedir}/%{_target_cpu}-%{_target_os} + chown root.root %{sitedir} %{sitedir}/%{_target_cpu}-%{_target_os} + chmod 2775 %{sitedir} %{sitedir}/%{_target_cpu}-%{_target_os} +fi -%postun libs -p /sbin/ldconfig +%postun libs +/sbin/ldconfig +if [ "$1" = 0 ]; then + if [ -w %{sitedir} -a -e %{sitedir}/%{_target_cpu}-%{_target_os} ]; then + rmdir %{sitedir}/%{_target_cpu}-%{_target_os} 2>/dev/null || true + fi + if [ -w %{_prefix}/local/lib -a -e %{sitedir} ]; then + rmdir %{sitedir} 2>/dev/null || true + fi +fi %files -f ruby.files %defattr(-, root, root) %doc %{name}-%{version}/README -%lang(ja) %doc %{name}-%{version}/README.jp +%lang(ja) %doc %{name}-%{version}/README.ja %doc %{name}-%{version}/COPYING* %doc %{name}-%{version}/ChangeLog +%doc %{name}-%{version}/LEGAL %doc %{name}-%{version}/ToDo %doc %{name}-%{version}/doc/NEWS %doc tmp-ruby-docs/ruby/* @@ -230,13 +348,16 @@ rm -rf tmp-ruby-docs %files devel -f ruby-devel.files %defattr(-, root, root) %doc %{name}-%{version}/README.EXT -%lang(ja) %doc %{name}-%{version}/README.EXT.jp +%lang(ja) %doc %{name}-%{version}/README.EXT.ja %files libs -f ruby-libs.files %defattr(-, root, root) %doc %{name}-%{version}/README -%lang(ja) %doc %{name}-%{version}/README.jp -%doc %{name}-%{version}/doc/NEWS +%lang(ja) %doc %{name}-%{version}/README.ja +%doc %{name}-%{version}/COPYING* +%doc %{name}-%{version}/ChangeLog +%doc %{name}-%{version}/LEGAL +%doc tmp-ruby-docs/ruby-libs/* %files tcltk -f ruby-tcltk.files %defattr(-, root, root) @@ -244,14 +365,53 @@ rm -rf tmp-ruby-docs %files -n irb -f irb.files %defattr(-, root, root) +%doc tmp-ruby-docs/irb/* %files docs %defattr(-, root, root) %doc tmp-ruby-docs/ruby-docs/* +%files mode -f ruby-mode.files +%defattr(-, root, root) +%doc %{name}-%{version}/misc/README + +%files mode-xemacs -f ruby-mode-xemacs.files +%defattr(-, root, root) +%doc %{name}-%{version}/misc/README + %changelog -* Thu Dec 06 2001 Elliot Lee 1.6.4-4 -- Added some patches to make it build on alpha +* Fri Mar 8 2002 Akira TAGOH 1.6.7-1 +- New upstream release. +- ruby-1.6.6-100.patch, ruby-1.6.6-501-ruby-mode.patch: + removed. these patches no longer should be needed. +- ruby-1.6.7-500-marshal-proc.patch: applied a fix patch. + (ruby-dev#16178: Marshal::dump should call Proc#call.) +- ruby-1.6.7-501-class-var.patch: applied a fix patch. + (ruby-talk#35157: class vars broken in 1.6.7) + +* Wed Feb 27 2002 Akira TAGOH 1.6.6-5 +- Disable alpha because nothing is xemacs for alpha now. + +* Tue Feb 5 2002 Akira TAGOH 1.6.6-3 +- Fixed the duplicate files. + +* Tue Feb 5 2002 Akira TAGOH 1.6.6-2 +- Fixed the missing %%defattr + +* Fri Feb 1 2002 Akira TAGOH 1.6.6-1 +- New upstream release. +- Applied bug fix patches: + - ruby-1.6.6-501-ruby-mode.patch: ruby-talk#30479: disables font-lock + coloring. + - ruby-1.6.6-100.patch: ruby-talk#30203: Ruby 1.6.6 bug and fix + ruby-list#33047: regex bug + PR#230: problem with -d in 1.6.6 +- Added ruby-mode and ruby-mode-xemacs packages. +- Ruby works fine for ia64. so re-enable to build with ia64. + (probably it should be worked for alpha) + +* Wed Jan 09 2002 Tim Powers +- automated rebuild * Thu Jul 19 2001 Bernhard Rosenkraenzer 1.6.4-2 - Remove Japanese description and summaries; they belong in specspo and diff --git a/sources b/sources index d5f9aea..ed03e52 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -5d8d806a11dd4318d8213d43308860c2 ruby-1.6.4.tar.bz2 +024f31f2d4f4ac6ca9c6b524b74568a2 ruby-1.6.7.tar.bz2 4177aba36004e43afb22c983989c9006 ruby-man-1.4.6-jp.tar.bz2 8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 From df80c1c52f1f4a0bdba7647753f0dc3bca9fa600 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:56:10 +0000 Subject: [PATCH 006/529] auto-import changelog data from ruby-1.6.7-2.src.rpm Mon Mar 18 2002 Akira TAGOH 1.6.7-2 - ruby-man-1.4.6-jp.tar.bz2: removed. - ruby-refm-rdp-1.4.7-ja-html.tar.bz2: uses it instead of. - ruby-1.6.7-500-marshal-proc.patch, ruby-1.6.7-501-class-var.patch: removed. - ruby-1.6.7-100.patch: applied a bug fix patch. (ruby-dev#16274: patch for 'wm state') (PR#206ja: SEGV handle EXIT) - ruby-1.6.7-101.patch: applied a bug fix patch. (ruby-list#34313: singleton should not be Marshal.dump'ed) (ruby-dev#16411: block local var) - ruby-1.6.7-102.patch: applied a bug fix patch. (handling multibyte chars is partially broken) - ruby-1.6.7-103.patch: applied a bug fix patch. (ruby-dev#16462: preserve reference for GC, but link should be cut) --- .cvsignore | 2 +- ruby.spec | 38 +++++++++++++++++++++++++++++--------- sources | 2 +- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/.cvsignore b/.cvsignore index 6fab036..96f3c51 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,5 +1,5 @@ ruby-1.6.7.tar.bz2 -ruby-man-1.4.6-jp.tar.bz2 ruby-man-1.4.6.tar.bz2 +ruby-man-1.6.7-ja-html.tar.bz2 rubyfaq-990927.tar.bz2 rubyfaq-jp-990927.tar.bz2 diff --git a/ruby.spec b/ruby.spec index dc4e2ea..6ffc3ff 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.6.7 -Release: 1 +Release: 2 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -17,8 +17,8 @@ BuildPreReq: emacs xemacs Source0: %{name}-%{version}.tar.bz2 ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 -##Source2: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}-jp.tar.gz -Source2: %{name}-man-%{manver}-jp.tar.bz2 +##Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.4.7-ja-html.zip +Source2: %{name}-man-%{version}-ja-html.tar.bz2 ##Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz Source3: rubyfaq-990927.tar.bz2 ##Source4: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz @@ -26,8 +26,10 @@ Source4: rubyfaq-jp-990927.tar.bz2 Source5: irb.1 Source10: ruby-mode-init.el -Patch500: ruby-1.6.7-500-marshal-proc.patch -Patch501: ruby-1.6.7-501-class-var.patch +Patch100: ruby-1.6.7-100.patch +Patch101: ruby-1.6.7-101.patch +Patch102: ruby-1.6.7-102.patch +Patch103: ruby-1.6.7-103.patch Patch900: ruby-1.6.6-900-XXX-strtod.patch @@ -111,8 +113,10 @@ Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. %prep %setup -q -c -a 1 -a 2 -a 3 -a 4 pushd %{name}-%{version} -%patch500 -p1 -%patch501 -p1 +%patch100 -p1 +%patch101 -p1 +%patch102 -p1 +%patch103 -p1 %patch900 -p1 popd @@ -196,9 +200,9 @@ cd .. # for ruby-docs cd ruby-docs -mkdir doc-en doc-ja faq-en faq-ja +mkdir doc-en refm-ja faq-en faq-ja (cd ../../ruby-man-`echo %{manver} | sed -e 's/\.[0-9]*$//'` && tar cf - .) | (cd doc-en && tar xvf -) -(cd ../../ruby-man-`echo %{manver} | sed -e 's/\.[0-9]*$//'`-jp && tar cf - .) | (cd doc-ja && tar xvf -) +(cd ../../ruby-refm-ja && tar cf - .) | (cd refm-ja && tar xvf -) (cd ../../rubyfaq && tar cf - .) | (cd faq-en && tar xvf -) (cd ../../rubyfaq-jp && tar cf - .) | (cd faq-ja && tar xvf -) @@ -380,6 +384,22 @@ fi %doc %{name}-%{version}/misc/README %changelog +* Mon Mar 18 2002 Akira TAGOH 1.6.7-2 +- ruby-man-1.4.6-jp.tar.bz2: removed. +- ruby-refm-rdp-1.4.7-ja-html.tar.bz2: uses it instead of. +- ruby-1.6.7-500-marshal-proc.patch, ruby-1.6.7-501-class-var.patch: + removed. +- ruby-1.6.7-100.patch: applied a bug fix patch. + (ruby-dev#16274: patch for 'wm state') + (PR#206ja: SEGV handle EXIT) +- ruby-1.6.7-101.patch: applied a bug fix patch. + (ruby-list#34313: singleton should not be Marshal.dump'ed) + (ruby-dev#16411: block local var) +- ruby-1.6.7-102.patch: applied a bug fix patch. + (handling multibyte chars is partially broken) +- ruby-1.6.7-103.patch: applied a bug fix patch. + (ruby-dev#16462: preserve reference for GC, but link should be cut) + * Fri Mar 8 2002 Akira TAGOH 1.6.7-1 - New upstream release. - ruby-1.6.6-100.patch, ruby-1.6.6-501-ruby-mode.patch: diff --git a/sources b/sources index ed03e52..84a6e2b 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ 024f31f2d4f4ac6ca9c6b524b74568a2 ruby-1.6.7.tar.bz2 -4177aba36004e43afb22c983989c9006 ruby-man-1.4.6-jp.tar.bz2 8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 +ad4fd6bc08a2601943e2273b0724f0e2 ruby-man-1.6.7-ja-html.tar.bz2 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 From fb62e67edb369e8ca2d203d6295a8cf7edec8a2c Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:56:46 +0000 Subject: [PATCH 007/529] auto-import changelog data from ruby-1.6.7-8.src.rpm Fri Jul 12 2002 Akira TAGOH 1.6.7-8 - fix typo. Thu Jul 04 2002 Akira TAGOH 1.6.7-7 - removed the ruby-mode-xemacs because it's merged to the xemacs sumo. Fri Jun 21 2002 Tim Powers - automated rebuild Wed Jun 19 2002 Akira TAGOH 1.6.7-5 - fix the stripped binary. - use the appropriate macros. Sun May 26 2002 Tim Powers - automated rebuild Thu May 23 2002 Akira TAGOH 1.6.7-3 - ruby-1.6.7-libobj.patch: applied to fix autoconf2.53 error. --- ruby.spec | 74 ++++++++++++++++++++++++------------------------------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/ruby.spec b/ruby.spec index 6ffc3ff..13a4afa 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,12 +4,12 @@ Name: ruby Version: 1.6.7 -Release: 2 +Release: 8 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk XFree86-devel autoconf gcc -BuildPreReq: emacs xemacs +BuildPreReq: emacs ## all archives are re-compressed with bzip2 instead of gzip @@ -26,6 +26,7 @@ Source4: rubyfaq-jp-990927.tar.bz2 Source5: irb.1 Source10: ruby-mode-init.el +Patch1: ruby-1.6.7-libobj.patch Patch100: ruby-1.6.7-100.patch Patch101: ruby-1.6.7-101.patch Patch102: ruby-1.6.7-102.patch @@ -74,12 +75,12 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %package -n irb -Summary: The Intaractive Ruby. +Summary: The Interactive Ruby. Group: Development/Languages Requires: %{name} = %{version}-%{release} %description -n irb -The irb is acronym for Interactive RuBy. It evaluates ruby expression +The irb is acronym for Interactive Ruby. It evaluates ruby expression from the terminal. @@ -100,16 +101,6 @@ Requires: emacs Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. -%package mode-xemacs -Summary: Emacs Lisp ruby-mode for the scripting language Ruby -Group: Applications/Editors -Requires: xemacs -ExcludeArch: alpha - -%description mode-xemacs -Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. - - %prep %setup -q -c -a 1 -a 2 -a 3 -a 4 pushd %{name}-%{version} @@ -119,6 +110,7 @@ pushd %{name}-%{version} %patch103 -p1 %patch900 -p1 popd +%patch1 -p1 %build pushd %{name}-%{version} @@ -130,18 +122,19 @@ rb_cv_func_strtod=no CFLAGS="-O0" CXXFLAGS="-O0" ./configure \ rb_cv_func_strtod=no ./configure \ %endif --prefix=%{_prefix} \ - --mandir='${prefix}/share/man' \ + --mandir='%{_mandir}' \ --sysconfdir=%{_sysconfdir} \ --localstatedir=%{_localstatedir} \ - --with-sitedir='${prefix}/local/lib/site_ruby/%{rubyxver}' \ + --with-sitedir='%{sitedir}' \ --with-default-kcode=none \ --with-dbm-include=/usr/include/db1 \ --enable-shared \ --enable-ipv6 \ --with-lookup-order-hack=INET \ - %{_target_cpu}-%{_target_os} + --host=%{_target_cpu}-%{_target_os} \ + --build=%{_target_cpu}-%{_target_os} -make +make RUBY_INSTALL_NAME=ruby make test popd @@ -243,7 +236,6 @@ install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ # installing ruby-mode cd %{name}-%{version} cp misc/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode -cp misc/*.el $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/ruby-mode ## for ruby-mode pushd $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode @@ -256,17 +248,6 @@ popd install -m 644 %{SOURCE10} \ $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d -## for ruby-mode-xemacs -pushd $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/ruby-mode -cat < path.el -(setq load-path (cons "." load-path) byte-compile-warnings nil) -EOF -xemacs -no-site-file -q -batch -l path.el -f batch-byte-compile *.el -rm -f path.el* -popd -install -m 644 %{SOURCE10} \ - $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/site-start.d - cd .. # listing all files in ruby-all.files @@ -301,19 +282,13 @@ cp /dev/null ruby-libs.files # for ruby-mode cp /dev/null ruby-mode.files -fgrep '.el' ruby-all.files | grep -v xemacs >> ruby-mode.files - -# for ruby-mode-xemacs -cp /dev/null ruby-mode-xemacs.files -fgrep '.el' ruby-all.files | grep -v share >> ruby-mode-xemacs.files +fgrep '.el' ruby-all.files >> ruby-mode.files # for ruby.rpm sort ruby-all.files \ - ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files ruby-mode.files ruby-mode-xemacs.files | + ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files ruby-mode.files | uniq -u > ruby.files -strip $RPM_BUILD_ROOT%{_bindir}/%{name} - %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT rm -f *.files @@ -379,11 +354,26 @@ fi %defattr(-, root, root) %doc %{name}-%{version}/misc/README -%files mode-xemacs -f ruby-mode-xemacs.files -%defattr(-, root, root) -%doc %{name}-%{version}/misc/README - %changelog +* Fri Jul 12 2002 Akira TAGOH 1.6.7-8 +- fix typo. + +* Thu Jul 04 2002 Akira TAGOH 1.6.7-7 +- removed the ruby-mode-xemacs because it's merged to the xemacs sumo. + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Wed Jun 19 2002 Akira TAGOH 1.6.7-5 +- fix the stripped binary. +- use the appropriate macros. + +* Sun May 26 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Akira TAGOH 1.6.7-3 +- ruby-1.6.7-libobj.patch: applied to fix autoconf2.53 error. + * Mon Mar 18 2002 Akira TAGOH 1.6.7-2 - ruby-man-1.4.6-jp.tar.bz2: removed. - ruby-refm-rdp-1.4.7-ja-html.tar.bz2: uses it instead of. From 1a01b05ccf138a75ce8d73239c7a240211a4b9f7 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:57:03 +0000 Subject: [PATCH 008/529] auto-import changelog data from ruby-1.6.7-9.src.rpm Thu Jul 18 2002 Akira TAGOH 1.6.7-9 - add the owned directory. --- ruby.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 13a4afa..fda5e6d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.6.7 -Release: 8 +Release: 9 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -337,6 +337,14 @@ fi %doc %{name}-%{version}/ChangeLog %doc %{name}-%{version}/LEGAL %doc tmp-ruby-docs/ruby-libs/* +%dir %{_libdir}/ruby +%dir %{_libdir}/ruby/%{rubyxver} +%dir %{_libdir}/ruby/%{rubyxver}/cgi +%dir %{_libdir}/ruby/%{rubyxver}/%{_target_cpu}-%{_target_os} +%dir %{_libdir}/ruby/%{rubyxver}/%{_target_cpu}-%{_target_os}/digest +%dir %{_libdir}/ruby/%{rubyxver}/net +%dir %{_libdir}/ruby/%{rubyxver}/shell +%dir %{_libdir}/ruby/%{rubyxver}/uri %files tcltk -f ruby-tcltk.files %defattr(-, root, root) @@ -345,6 +353,9 @@ fi %files -n irb -f irb.files %defattr(-, root, root) %doc tmp-ruby-docs/irb/* +%dir %{_libdir}/ruby/%{rubyxver}/irb +%dir %{_libdir}/ruby/%{rubyxver}/irb/lc +%dir %{_libdir}/ruby/%{rubyxver}/irb/lc/ja %files docs %defattr(-, root, root) @@ -353,8 +364,12 @@ fi %files mode -f ruby-mode.files %defattr(-, root, root) %doc %{name}-%{version}/misc/README +%dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Thu Jul 18 2002 Akira TAGOH 1.6.7-9 +- add the owned directory. + * Fri Jul 12 2002 Akira TAGOH 1.6.7-8 - fix typo. From 610dd0484d44c6ba30106132a5d69c7cd7c176af Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:57:13 +0000 Subject: [PATCH 009/529] auto-import changelog data from ruby-1.6.7-10.src.rpm Tue Aug 27 2002 Akira TAGOH 1.6.7-10 - moved sitedir to /usr/lib/ruby/site_ruby again according as our perl and python. - ruby-1.6.7-resolv1.patch, ruby-1.6.7-resolv2.patch: applied to fix 'Too many open files - "/etc/resolv.conf"' issue. (Bug#64830) --- ruby.spec | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/ruby.spec b/ruby.spec index fda5e6d..590144a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,10 +1,10 @@ %define manver 1.4.6 %define rubyxver 1.6 -%define sitedir %{_prefix}/local/lib/site_ruby/%{rubyxver} +%define sitedir %{_libdir}/site_ruby Name: ruby Version: 1.6.7 -Release: 9 +Release: 10 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -31,6 +31,8 @@ Patch100: ruby-1.6.7-100.patch Patch101: ruby-1.6.7-101.patch Patch102: ruby-1.6.7-102.patch Patch103: ruby-1.6.7-103.patch +Patch110: ruby-1.6.7-resolv1.patch +Patch111: ruby-1.6.7-resolv2.patch Patch900: ruby-1.6.6-900-XXX-strtod.patch @@ -296,22 +298,9 @@ rm -rf tmp-ruby-docs %post libs /sbin/ldconfig -if [ -w %{_prefix}/local/lib -a ! -e %{sitedir} ]; then - mkdir -p %{sitedir} %{sitedir}/%{_target_cpu}-%{_target_os} - chown root.root %{sitedir} %{sitedir}/%{_target_cpu}-%{_target_os} - chmod 2775 %{sitedir} %{sitedir}/%{_target_cpu}-%{_target_os} -fi %postun libs /sbin/ldconfig -if [ "$1" = 0 ]; then - if [ -w %{sitedir} -a -e %{sitedir}/%{_target_cpu}-%{_target_os} ]; then - rmdir %{sitedir}/%{_target_cpu}-%{_target_os} 2>/dev/null || true - fi - if [ -w %{_prefix}/local/lib -a -e %{sitedir} ]; then - rmdir %{sitedir} 2>/dev/null || true - fi -fi %files -f ruby.files %defattr(-, root, root) @@ -345,6 +334,9 @@ fi %dir %{_libdir}/ruby/%{rubyxver}/net %dir %{_libdir}/ruby/%{rubyxver}/shell %dir %{_libdir}/ruby/%{rubyxver}/uri +%dir %{sitedir} +%dir %{sitedir}/%{rubyxver} +%dir %{sitedir}/%{rubyxver}/%{_target_cpu}-%{_target_os} %files tcltk -f ruby-tcltk.files %defattr(-, root, root) @@ -367,6 +359,12 @@ fi %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Aug 27 2002 Akira TAGOH 1.6.7-10 +- moved sitedir to /usr/lib/ruby/site_ruby again according as our perl and + python. +- ruby-1.6.7-resolv1.patch, ruby-1.6.7-resolv2.patch: applied to fix 'Too many + open files - "/etc/resolv.conf"' issue. (Bug#64830) + * Thu Jul 18 2002 Akira TAGOH 1.6.7-9 - add the owned directory. From 2b5705a00e5302a4adab85443147b06a77e112b6 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:57:21 +0000 Subject: [PATCH 010/529] auto-import ruby-1.6.7-10.1p from ruby-1.6.7-10.1p.src.rpm --- ruby.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 590144a..5eecaa9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.6.7 -Release: 10 +Release: 10.1p License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -27,6 +27,7 @@ Source5: irb.1 Source10: ruby-mode-init.el Patch1: ruby-1.6.7-libobj.patch +Patch2: ruby-1.6.7-10.ppc.patch Patch100: ruby-1.6.7-100.patch Patch101: ruby-1.6.7-101.patch Patch102: ruby-1.6.7-102.patch @@ -113,6 +114,7 @@ pushd %{name}-%{version} %patch900 -p1 popd %patch1 -p1 +%patch2 -p1 %build pushd %{name}-%{version} From 91cfb3454d5c819dea7328b463e878018aac1c35 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:57:26 +0000 Subject: [PATCH 011/529] auto-import changelog data from ruby-1.6.8-5.src.rpm Fri Feb 07 2003 Jens Petersen - 1.6.8-5 - rebuild against ucs4 tcltk Wed Jan 22 2003 Tim Powers - rebuilt Wed Jan 22 2003 Akira TAGOH 1.6.8-3 - ruby-1.6.8-multilib.patch: applied to fix the search path issue on x86_64 Tue Jan 21 2003 Akira TAGOH 1.6.8-2 - ruby-1.6.8-require.patch: applied to fix the search bug in require. - don't apply long2int patch to s390 and s390x. it doesn't work. Wed Jan 15 2003 Akira TAGOH 1.6.8-1 - New upstream release. - removed some patches. it's no longer needed. - ruby-1.6.7-100.patch - ruby-1.6.7-101.patch - ruby-1.6.7-102.patch - ruby-1.6.7-103.patch - 801_extmk.rb-shellwords.patch - 801_mkmf.rb-shellwords.patch - 804_parse.y-new-bison.patch - 805_uri-bugfix.patch - ruby-1.6.6-900_XXX_strtod.patch - ruby-1.6.7-sux0rs.patch - ruby-1.6.7-libobj.patch Wed Jan 15 2003 Jens Petersen 1.6.7-14 - rebuild to update tcltk deps Mon Dec 16 2002 Elliot Lee 1.6.7-13 - Remove ExcludeArch: x86_64 - Fix x86_64 ruby with long2int.patch (ruby was assuming that sizeof(long) == sizeof(int). The patch does not fix the source of the problem, just makes it a non-issue.) - _smp_mflags Tue Dec 10 2002 Tim Powers 1.6.7-12 - rebuild to fix broken tcltk deps Tue Oct 22 2002 Akira TAGOH 1.6.7-11 - use %configure macro instead of configure script. - use the latest config.{sub,guess}. - get archname from rbconfig.rb for %dir - applied some patches from Debian: - 801_extmk.rb-shellwords.patch: use Shellwords - 801_mkmf.rb-shellwords.patch: mkmf.rb creates bad Makefile. the Makefile links libruby.a to the target. - 803_sample-fix-shbang.patch: all sample codes should be s|/usr/local/bin|/usr/bin|g - 804_parse.y-new-bison.patch: fix syntax warning. - 805_uri-bugfix.patch: uri.rb could not handle correctly broken mailto-uri. - add ExcludeArch x86_64 temporarily to fix Bug#74581. Right now ruby can't be built on x86_64. --- .cvsignore | 4 +- ruby.spec | 149 +++++++++++++++++++++++++++++++++++++---------------- sources | 4 +- 3 files changed, 110 insertions(+), 47 deletions(-) diff --git a/.cvsignore b/.cvsignore index 96f3c51..bffda0d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,5 +1,5 @@ -ruby-1.6.7.tar.bz2 +ruby-1.6.8.tar.gz ruby-man-1.4.6.tar.bz2 -ruby-man-1.6.7-ja-html.tar.bz2 +ruby-refm-rdp-1.6.8-ja-html.zip rubyfaq-990927.tar.bz2 rubyfaq-jp-990927.tar.bz2 diff --git a/ruby.spec b/ruby.spec index 5eecaa9..e956338 100644 --- a/ruby.spec +++ b/ruby.spec @@ -3,22 +3,18 @@ %define sitedir %{_libdir}/site_ruby Name: ruby -Version: 1.6.7 -Release: 10.1p +Version: 1.6.8 +Release: 5 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk XFree86-devel autoconf gcc +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk XFree86-devel autoconf gcc unzip BuildPreReq: emacs - -## all archives are re-compressed with bzip2 instead of gzip -##Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz -Source0: %{name}-%{version}.tar.bz2 +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 -##Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.4.7-ja-html.zip -Source2: %{name}-man-%{version}-ja-html.tar.bz2 +Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-%{version}-ja-html.zip ##Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz Source3: rubyfaq-990927.tar.bz2 ##Source4: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz @@ -26,16 +22,13 @@ Source4: rubyfaq-jp-990927.tar.bz2 Source5: irb.1 Source10: ruby-mode-init.el -Patch1: ruby-1.6.7-libobj.patch -Patch2: ruby-1.6.7-10.ppc.patch -Patch100: ruby-1.6.7-100.patch -Patch101: ruby-1.6.7-101.patch -Patch102: ruby-1.6.7-102.patch -Patch103: ruby-1.6.7-103.patch +Patch100: ruby-1.6.8-require.patch Patch110: ruby-1.6.7-resolv1.patch Patch111: ruby-1.6.7-resolv2.patch -Patch900: ruby-1.6.6-900-XXX-strtod.patch - +Patch802: 803_sample-fix-shbang.patch +Patch901: ruby-1.6.7-long2int.patch +Patch902: ruby-1.6.7-rubylibdir.patch +Patch903: ruby-1.6.8-multilib.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -105,40 +98,47 @@ Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. %prep -%setup -q -c -a 1 -a 2 -a 3 -a 4 +%setup -q -c -a 1 -a 3 -a 4 +mkdir -p ruby-refm-ja +pushd ruby-refm-ja +unzip %{SOURCE2} +popd pushd %{name}-%{version} %patch100 -p1 -%patch101 -p1 -%patch102 -p1 -%patch103 -p1 -%patch900 -p1 +pushd lib +%patch110 -p0 +%patch111 -p0 +popd +%patch802 -p1 +%ifnarch s390 s390x +%patch901 -p1 +%endif +%patch902 -p2 +%patch903 -p1 popd -%patch1 -p1 -%patch2 -p1 %build pushd %{name}-%{version} +for i in config.sub config.guess; do + test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i . +done autoconf -%ifarch alpha ia64 -rb_cv_func_strtod=no CFLAGS="-O0" CXXFLAGS="-O0" ./configure \ -%else -rb_cv_func_strtod=no ./configure \ -%endif - --prefix=%{_prefix} \ - --mandir='%{_mandir}' \ - --sysconfdir=%{_sysconfdir} \ - --localstatedir=%{_localstatedir} \ +rb_cv_func_strtod=no +export rb_cv_func_strtod +%configure \ --with-sitedir='%{sitedir}' \ --with-default-kcode=none \ - --with-dbm-include=/usr/include/db1 \ --enable-shared \ --enable-ipv6 \ - --with-lookup-order-hack=INET \ - --host=%{_target_cpu}-%{_target_os} \ - --build=%{_target_cpu}-%{_target_os} + --with-lookup-order-hack=INET -make RUBY_INSTALL_NAME=ruby +make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} +%ifarch ia64 +# Miscompilation? Buggy code? +rm -f parse.o +make OPT=-O0 RUBY_INSTALL_NAME=ruby %{?_smp_mflags} +%endif make test popd @@ -268,11 +268,11 @@ egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files cp /dev/null ruby-tcltk.files for f in `find %{name}-%{version}/ext/tk/lib -type f; echo %{name}-%{version}/ext/tk/*.so` do - grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files + grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files || : done for f in `find %{name}-%{version}/ext/tcltklib/lib -type f; echo %{name}-%{version}/ext/tcltklib/*.so` do - grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files + grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files || : done # for irb.rpm @@ -293,6 +293,16 @@ sort ruby-all.files \ ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files ruby-mode.files | uniq -u > ruby.files +# for arch-dependent dir +rbconfig=`find $RPM_BUILD_ROOT -name rbconfig.rb` +export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} +arch=`$RPM_BUILD_ROOT%{_bindir}/ruby -r $rbconfig -e 'printf ("%s\n", Config::CONFIG["arch"])'` +cat <<__EOF__ >> ruby-libs.files +%%dir %%{_libdir}/ruby/%%{rubyxver}/$arch +%%dir %%{_libdir}/ruby/%%{rubyxver}/$arch/digest +%%dir %%{sitedir}/%%{rubyxver}/$arch +__EOF__ + %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT rm -f *.files @@ -331,14 +341,11 @@ rm -rf tmp-ruby-docs %dir %{_libdir}/ruby %dir %{_libdir}/ruby/%{rubyxver} %dir %{_libdir}/ruby/%{rubyxver}/cgi -%dir %{_libdir}/ruby/%{rubyxver}/%{_target_cpu}-%{_target_os} -%dir %{_libdir}/ruby/%{rubyxver}/%{_target_cpu}-%{_target_os}/digest %dir %{_libdir}/ruby/%{rubyxver}/net %dir %{_libdir}/ruby/%{rubyxver}/shell %dir %{_libdir}/ruby/%{rubyxver}/uri %dir %{sitedir} %dir %{sitedir}/%{rubyxver} -%dir %{sitedir}/%{rubyxver}/%{_target_cpu}-%{_target_os} %files tcltk -f ruby-tcltk.files %defattr(-, root, root) @@ -361,6 +368,62 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Fri Feb 7 2003 Jens Petersen - 1.6.8-5 +- rebuild against ucs4 tcltk + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Jan 22 2003 Akira TAGOH 1.6.8-3 +- ruby-1.6.8-multilib.patch: applied to fix the search path issue on x86_64 + +* Tue Jan 21 2003 Akira TAGOH 1.6.8-2 +- ruby-1.6.8-require.patch: applied to fix the search bug in require. +- don't apply long2int patch to s390 and s390x. it doesn't work. + +* Wed Jan 15 2003 Akira TAGOH 1.6.8-1 +- New upstream release. +- removed some patches. it's no longer needed. + - ruby-1.6.7-100.patch + - ruby-1.6.7-101.patch + - ruby-1.6.7-102.patch + - ruby-1.6.7-103.patch + - 801_extmk.rb-shellwords.patch + - 801_mkmf.rb-shellwords.patch + - 804_parse.y-new-bison.patch + - 805_uri-bugfix.patch + - ruby-1.6.6-900_XXX_strtod.patch + - ruby-1.6.7-sux0rs.patch + - ruby-1.6.7-libobj.patch + +* Wed Jan 15 2003 Jens Petersen 1.6.7-14 +- rebuild to update tcltk deps + +* Mon Dec 16 2002 Elliot Lee 1.6.7-13 +- Remove ExcludeArch: x86_64 +- Fix x86_64 ruby with long2int.patch (ruby was assuming that sizeof(long) + == sizeof(int). The patch does not fix the source of the problem, just + makes it a non-issue.) +- _smp_mflags + +* Tue Dec 10 2002 Tim Powers 1.6.7-12 +- rebuild to fix broken tcltk deps + +* Tue Oct 22 2002 Akira TAGOH 1.6.7-11 +- use %%configure macro instead of configure script. +- use the latest config.{sub,guess}. +- get archname from rbconfig.rb for %%dir +- applied some patches from Debian: + - 801_extmk.rb-shellwords.patch: use Shellwords + - 801_mkmf.rb-shellwords.patch: mkmf.rb creates bad Makefile. the Makefile + links libruby.a to the target. + - 803_sample-fix-shbang.patch: all sample codes should be + s|/usr/local/bin|/usr/bin|g + - 804_parse.y-new-bison.patch: fix syntax warning. + - 805_uri-bugfix.patch: uri.rb could not handle correctly broken mailto-uri. +- add ExcludeArch x86_64 temporarily to fix Bug#74581. Right now ruby can't be + built on x86_64. + * Tue Aug 27 2002 Akira TAGOH 1.6.7-10 - moved sitedir to /usr/lib/ruby/site_ruby again according as our perl and python. diff --git a/sources b/sources index 84a6e2b..b2eeeb3 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -024f31f2d4f4ac6ca9c6b524b74568a2 ruby-1.6.7.tar.bz2 +bf48d49dbd94b5c0eda5f75b3bfbac16 ruby-1.6.8.tar.gz 8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 -ad4fd6bc08a2601943e2273b0724f0e2 ruby-man-1.6.7-ja-html.tar.bz2 +5c71bc6e2c51c3f16001aa7b55ba0e2c ruby-refm-rdp-1.6.8-ja-html.zip 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 From 29f468a6460d035073be9f7b29064b16ae296f98 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:58:25 +0000 Subject: [PATCH 012/529] auto-import changelog data from ruby-1.8.0-1.src.rpm Tue Aug 05 2003 Akira TAGOH 1.8.0-1 - New upstream release. Thu Jul 24 2003 Akira TAGOH 1.6.8-9.1 - rebuilt Thu Jul 24 2003 Akira TAGOH 1.6.8-9 - ruby-1.6.8-castnode.patch: handling the nodes with correct cast. use this patch now instead of ruby-1.6.8-fix-x86_64.patch. Fri Jul 04 2003 Akira TAGOH 1.6.8-8 - rebuilt Fri Jul 04 2003 Akira TAGOH 1.6.8-7 - fix the gcc warnings. (#82192) - ruby-1.6.8-fix-x86_64.patch: correct a patch. NOTE: DON'T USE THIS PATCH FOR BIG ENDIAN ARCHITECTURE. - ruby-1.6.7-long2int.patch: removed. Wed Jun 04 2003 Elliot Lee - rebuilt --- .cvsignore | 2 +- ruby.spec | 52 +++++++++++++++++++++++++++++++--------------------- sources | 2 +- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/.cvsignore b/.cvsignore index bffda0d..e10eb5f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ -ruby-1.6.8.tar.gz +ruby-1.8.0.tar.gz ruby-man-1.4.6.tar.bz2 ruby-refm-rdp-1.6.8-ja-html.zip rubyfaq-990927.tar.bz2 diff --git a/ruby.spec b/ruby.spec index e956338..4c87fdc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,10 +1,10 @@ %define manver 1.4.6 -%define rubyxver 1.6 +%define rubyxver 1.8 %define sitedir %{_libdir}/site_ruby Name: ruby -Version: 1.6.8 -Release: 5 +Version: 1.8.0 +Release: 1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -14,7 +14,7 @@ BuildPreReq: emacs Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 -Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-%{version}-ja-html.zip +Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.6.8-ja-html.zip ##Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz Source3: rubyfaq-990927.tar.bz2 ##Source4: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz @@ -22,13 +22,7 @@ Source4: rubyfaq-jp-990927.tar.bz2 Source5: irb.1 Source10: ruby-mode-init.el -Patch100: ruby-1.6.8-require.patch -Patch110: ruby-1.6.7-resolv1.patch -Patch111: ruby-1.6.7-resolv2.patch -Patch802: 803_sample-fix-shbang.patch -Patch901: ruby-1.6.7-long2int.patch -Patch902: ruby-1.6.7-rubylibdir.patch -Patch903: ruby-1.6.8-multilib.patch +Patch903: ruby-1.8.0-multilib.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -104,16 +98,6 @@ pushd ruby-refm-ja unzip %{SOURCE2} popd pushd %{name}-%{version} -%patch100 -p1 -pushd lib -%patch110 -p0 -%patch111 -p0 -popd -%patch802 -p1 -%ifnarch s390 s390x -%patch901 -p1 -%endif -%patch902 -p2 %patch903 -p1 popd @@ -126,6 +110,8 @@ autoconf rb_cv_func_strtod=no export rb_cv_func_strtod +CFLAGS="$RPM_OPT_FLAGS -Wall" +export CFLAGS %configure \ --with-sitedir='%{sitedir}' \ --with-default-kcode=none \ @@ -139,7 +125,9 @@ make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} rm -f parse.o make OPT=-O0 RUBY_INSTALL_NAME=ruby %{?_smp_mflags} %endif +%ifnarch ppc64 make test +%endif popd @@ -368,6 +356,28 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Aug 5 2003 Akira TAGOH 1.8.0-1 +- New upstream release. + +* Thu Jul 24 2003 Akira TAGOH 1.6.8-9.1 +- rebuilt + +* Thu Jul 24 2003 Akira TAGOH 1.6.8-9 +- ruby-1.6.8-castnode.patch: handling the nodes with correct cast. + use this patch now instead of ruby-1.6.8-fix-x86_64.patch. + +* Fri Jul 04 2003 Akira TAGOH 1.6.8-8 +- rebuilt + +* Fri Jul 04 2003 Akira TAGOH 1.6.8-7 +- fix the gcc warnings. (#82192) +- ruby-1.6.8-fix-x86_64.patch: correct a patch. + NOTE: DON'T USE THIS PATCH FOR BIG ENDIAN ARCHITECTURE. +- ruby-1.6.7-long2int.patch: removed. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + * Fri Feb 7 2003 Jens Petersen - 1.6.8-5 - rebuild against ucs4 tcltk diff --git a/sources b/sources index b2eeeb3..329cc24 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -bf48d49dbd94b5c0eda5f75b3bfbac16 ruby-1.6.8.tar.gz +582a65e52598a4a1e9fce523e16e67d6 ruby-1.8.0.tar.gz 8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 5c71bc6e2c51c3f16001aa7b55ba0e2c ruby-refm-rdp-1.6.8-ja-html.zip 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 From 42f1dc646767dfab0311508343507f6a731b7253 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:58:36 +0000 Subject: [PATCH 013/529] auto-import changelog data from ruby-1.8.0-3.src.rpm Sat Dec 13 2003 Jeff Johnson 1.8.0-3 - rebuild against db-4.2.52. Thu Sep 25 2003 Jeff Johnson 1.8.0-2 - rebuild against db-4.2.42. --- ruby.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 4c87fdc..98c3d94 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.0 -Release: 1 +Release: 3 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -356,6 +356,12 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Sat Dec 13 2003 Jeff Johnson 1.8.0-3 +- rebuild against db-4.2.52. + +* Thu Sep 25 2003 Jeff Johnson 1.8.0-2 +- rebuild against db-4.2.42. + * Tue Aug 5 2003 Akira TAGOH 1.8.0-1 - New upstream release. From 461df61bac1d8f32709d893a77b5a3292068f14d Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 11:59:52 +0000 Subject: [PATCH 014/529] auto-import changelog data from ruby-1.8.1-2.1.src.rpm Tue Mar 02 2004 Elliot Lee - rebuilt Fri Feb 13 2004 Elliot Lee - rebuilt Wed Feb 04 2004 Akira TAGOH 1.8.1-1 - New upstream release. - don't use any optimization for ia64 to avoid the build failure. - ruby-1.8.1-ia64-stack-limit.patch: applied to fix SystemStackError when the optimization is disabled. --- .cvsignore | 2 +- ruby.spec | 30 ++++++++++++++++++++++++------ sources | 2 +- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.cvsignore b/.cvsignore index e10eb5f..f755580 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ -ruby-1.8.0.tar.gz +ruby-1.8.1.tar.gz ruby-man-1.4.6.tar.bz2 ruby-refm-rdp-1.6.8-ja-html.zip rubyfaq-990927.tar.bz2 diff --git a/ruby.spec b/ruby.spec index 98c3d94..356d2cc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -3,8 +3,8 @@ %define sitedir %{_libdir}/site_ruby Name: ruby -Version: 1.8.0 -Release: 3 +Version: 1.8.1 +Release: 2.1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -22,7 +22,8 @@ Source4: rubyfaq-jp-990927.tar.bz2 Source5: irb.1 Source10: ruby-mode-init.el -Patch903: ruby-1.8.0-multilib.patch +Patch1: ruby-1.8.0-multilib.patch +Patch2: ruby-1.8.1-ia64-stack-limit.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -98,7 +99,10 @@ pushd ruby-refm-ja unzip %{SOURCE2} popd pushd %{name}-%{version} -%patch903 -p1 +%patch1 -p1 +%if ia64 +%patch2 -p1 +%endif popd %build @@ -110,6 +114,9 @@ autoconf rb_cv_func_strtod=no export rb_cv_func_strtod +%if ia64 +export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's/-O[1-9]/-O0/g'` +%endif CFLAGS="$RPM_OPT_FLAGS -Wall" export CFLAGS %configure \ @@ -254,11 +261,11 @@ egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files # for ruby-tcltk.rpm cp /dev/null ruby-tcltk.files -for f in `find %{name}-%{version}/ext/tk/lib -type f; echo %{name}-%{version}/ext/tk/*.so` +for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/ext/tk -type f -name '*.so'` do grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files || : done -for f in `find %{name}-%{version}/ext/tcltklib/lib -type f; echo %{name}-%{version}/ext/tcltklib/*.so` +for f in `find %{name}-%{version}/ext/tcltklib/lib -type f; find %{name}-%{version}/ext/tcltklib -type f -name '*.so'` do grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files || : done @@ -356,6 +363,17 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Wed Feb 04 2004 Akira TAGOH 1.8.1-1 +- New upstream release. +- don't use any optimization for ia64 to avoid the build failure. +- ruby-1.8.1-ia64-stack-limit.patch: applied to fix SystemStackError when the optimization is disabled. + * Sat Dec 13 2003 Jeff Johnson 1.8.0-3 - rebuild against db-4.2.52. diff --git a/sources b/sources index 329cc24..20de615 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -582a65e52598a4a1e9fce523e16e67d6 ruby-1.8.0.tar.gz +5d52c7d0e6a6eb6e3bc68d77e794898e ruby-1.8.1.tar.gz 8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 5c71bc6e2c51c3f16001aa7b55ba0e2c ruby-refm-rdp-1.6.8-ja-html.zip 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 From c78efb93a26fcb9c624920c89ca32230305c273e Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 12:00:00 +0000 Subject: [PATCH 015/529] auto-import changelog data from ruby-1.8.1-3.src.rpm Tue Jun 15 2004 Elliot Lee - rebuilt --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 356d2cc..cfbebe1 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.1 -Release: 2.1 +Release: 3 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -363,6 +363,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Jun 15 2004 Elliot Lee +- rebuilt + * Tue Mar 02 2004 Elliot Lee - rebuilt From 68281ea7f38b6ede4642c13e3fab277272a63103 Mon Sep 17 00:00:00 2001 From: cvsdist Date: Thu, 9 Sep 2004 12:00:12 +0000 Subject: [PATCH 016/529] auto-import changelog data from ruby-1.8.1-4.src.rpm Wed Jun 23 2004 Akira TAGOH 1.8.1-4 - updated the documentation. --- .cvsignore | 2 +- ruby.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index f755580..3547216 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,5 +1,5 @@ ruby-1.8.1.tar.gz ruby-man-1.4.6.tar.bz2 -ruby-refm-rdp-1.6.8-ja-html.zip +ruby-refm-rdp-1.8.1-ja-html.tar.gz rubyfaq-990927.tar.bz2 rubyfaq-jp-990927.tar.bz2 diff --git a/ruby.spec b/ruby.spec index cfbebe1..e17bff2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.1 -Release: 3 +Release: 4 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -14,7 +14,7 @@ BuildPreReq: emacs Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 -Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.6.8-ja-html.zip +Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz ##Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz Source3: rubyfaq-990927.tar.bz2 ##Source4: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz @@ -96,7 +96,7 @@ Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. %setup -q -c -a 1 -a 3 -a 4 mkdir -p ruby-refm-ja pushd ruby-refm-ja -unzip %{SOURCE2} +tar fxz %{SOURCE2} popd pushd %{name}-%{version} %patch1 -p1 @@ -363,6 +363,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Wed Jun 23 2004 Akira TAGOH 1.8.1-4 +- updated the documentation. + * Tue Jun 15 2004 Elliot Lee - rebuilt diff --git a/sources b/sources index 20de615..bc7d4ce 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ 5d52c7d0e6a6eb6e3bc68d77e794898e ruby-1.8.1.tar.gz 8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 -5c71bc6e2c51c3f16001aa7b55ba0e2c ruby-refm-rdp-1.6.8-ja-html.zip +d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 From 538e6e59b0b9b9c9cdf956c595219ea5e702a3c2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 6 Oct 2004 12:24:41 +0000 Subject: [PATCH 017/529] - require emacs-common instead of emacs. --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e17bff2..4075670 100644 --- a/ruby.spec +++ b/ruby.spec @@ -86,7 +86,7 @@ Manuals and FAQs for the object-oriented scripting language Ruby. %package mode Summary: Emacs Lisp ruby-mode for the scripting language Ruby Group: Applications/Editors -Requires: emacs +Requires: emacs-common %description mode Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. @@ -363,6 +363,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Wed Oct 6 2004 Akira TAGOH - 1.8.1-5 +- require emacs-common instead of emacs. + * Wed Jun 23 2004 Akira TAGOH 1.8.1-4 - updated the documentation. From 379a091ae90ab8c2bb955fad80ae420dfa1c0641 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 6 Oct 2004 12:25:13 +0000 Subject: [PATCH 018/529] bumped release --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 4075670..54d5a29 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.1 -Release: 4 +Release: 5 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root From b3a42833826696df646bf76c003b1ee359bf862a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 6 Oct 2004 12:29:31 +0000 Subject: [PATCH 019/529] bumped release --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 54d5a29..07f43f0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.1 -Release: 5 +Release: 7 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -363,7 +363,7 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog -* Wed Oct 6 2004 Akira TAGOH - 1.8.1-5 +* Wed Oct 6 2004 Akira TAGOH - 1.8.1-7 - require emacs-common instead of emacs. * Wed Jun 23 2004 Akira TAGOH 1.8.1-4 From e8a83aac3a930767213cc5903addc92fa2661107 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 29 Oct 2004 06:15:17 +0000 Subject: [PATCH 020/529] - added openssl-devel and db4-devel into BuildRequires (#137479) --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 07f43f0..4f11a94 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,11 +4,11 @@ Name: ruby Version: 1.8.1 -Release: 7 +Release: 8 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk XFree86-devel autoconf gcc unzip +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk XFree86-devel autoconf gcc unzip openssl-devel db4-devel BuildPreReq: emacs Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz @@ -363,6 +363,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Fri Oct 29 2004 Akira TAGOH - 1.8.1-8 +- added openssl-devel and db4-devel into BuildRequires (#137479) + * Wed Oct 6 2004 Akira TAGOH - 1.8.1-7 - require emacs-common instead of emacs. From e571bc8ec522e3719c65db2f767ac82f2e6e9767 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 10 Nov 2004 07:58:20 +0000 Subject: [PATCH 021/529] - ruby-1.8.1-cgi-dos.patch: security fix [CAN-2004-0983] - ruby-1.8.1-cgi_session_perms.patch: security fix [CAN-2004-0755] --- .cvsignore | 1 + ruby.spec | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.cvsignore b/.cvsignore index 3547216..0887846 100644 --- a/.cvsignore +++ b/.cvsignore @@ -3,3 +3,4 @@ ruby-man-1.4.6.tar.bz2 ruby-refm-rdp-1.8.1-ja-html.tar.gz rubyfaq-990927.tar.bz2 rubyfaq-jp-990927.tar.bz2 +*.rpm diff --git a/ruby.spec b/ruby.spec index 4f11a94..cf7fc11 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.1 -Release: 8 +Release: 9 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -24,6 +24,8 @@ Source10: ruby-mode-init.el Patch1: ruby-1.8.0-multilib.patch Patch2: ruby-1.8.1-ia64-stack-limit.patch +Patch3: ruby-1.8.1-cgi_session_perms.patch +Patch4: ruby-1.8.1-cgi-dos.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -103,6 +105,8 @@ pushd %{name}-%{version} %if ia64 %patch2 -p1 %endif +%patch3 -p1 +%patch4 -p1 popd %build @@ -363,6 +367,10 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Wed Nov 10 2004 Akira TAGOH - 1.8.1-9 +- ruby-1.8.1-cgi-dos.patch: security fix [CAN-2004-0983] +- ruby-1.8.1-cgi_session_perms.patch: security fix [CAN-2004-0755] + * Fri Oct 29 2004 Akira TAGOH - 1.8.1-8 - added openssl-devel and db4-devel into BuildRequires (#137479) From 09f66cf3e99ffe4b6484f13d51d33566967cb35f Mon Sep 17 00:00:00 2001 From: jbj Date: Sat, 13 Nov 2004 01:04:36 +0000 Subject: [PATCH 022/529] - rebuild against db-4.3.21. --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index cf7fc11..6ba0aed 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.1 -Release: 9 +Release: 10 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -367,6 +367,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Thu Nov 11 2004 Jeff Johnson 1.8.1-10 +- rebuild against db-4.3.21. + * Wed Nov 10 2004 Akira TAGOH - 1.8.1-9 - ruby-1.8.1-cgi-dos.patch: security fix [CAN-2004-0983] - ruby-1.8.1-cgi_session_perms.patch: security fix [CAN-2004-0755] From e5e207b77ae2769238088a16c147837d1ca5f123 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 5 Jan 2005 07:28:29 +0000 Subject: [PATCH 023/529] - New upstream release. - ruby-1.8.1-ia64-stack-limit.patch: removed - it's no longer needed. - ruby-1.8.1-cgi_session_perms.patch: likewise. - ruby-1.8.1-cgi-dos.patch: likewise. - generated Ruby interactive documentation - senarated package. it's now provided as ri package. (#141806) --- .cvsignore | 1 + ruby.spec | 49 +++++++++++++++++++++++++++++++++++++------------ sources | 2 +- 3 files changed, 39 insertions(+), 13 deletions(-) diff --git a/.cvsignore b/.cvsignore index 0887846..3269d61 100644 --- a/.cvsignore +++ b/.cvsignore @@ -4,3 +4,4 @@ ruby-refm-rdp-1.8.1-ja-html.tar.gz rubyfaq-990927.tar.bz2 rubyfaq-jp-990927.tar.bz2 *.rpm +ruby-1.8.2.tar.gz diff --git a/ruby.spec b/ruby.spec index 6ba0aed..ccd2e26 100644 --- a/ruby.spec +++ b/ruby.spec @@ -3,8 +3,8 @@ %define sitedir %{_libdir}/site_ruby Name: ruby -Version: 1.8.1 -Release: 10 +Version: 1.8.2 +Release: 1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -23,9 +23,6 @@ Source5: irb.1 Source10: ruby-mode-init.el Patch1: ruby-1.8.0-multilib.patch -Patch2: ruby-1.8.1-ia64-stack-limit.patch -Patch3: ruby-1.8.1-cgi_session_perms.patch -Patch4: ruby-1.8.1-cgi-dos.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -94,6 +91,18 @@ Requires: emacs-common Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. +%package -n ri +Summary: Ruby interactive reference +Group: Documentation +Requires: %{name} = %{version}-%{release} + +%description -n ri +ri is a command line tool that displays descriptions of built-in +Ruby methods, classes and modules. For methods, it shows you the calling +sequence and a description. For classes and modules, it shows a synopsis +along with a list of the methods the class or module implements. + + %prep %setup -q -c -a 1 -a 3 -a 4 mkdir -p ruby-refm-ja @@ -102,11 +111,6 @@ tar fxz %{SOURCE2} popd pushd %{name}-%{version} %patch1 -p1 -%if ia64 -%patch2 -p1 -%endif -%patch3 -p1 -%patch4 -p1 popd %build @@ -128,7 +132,8 @@ export CFLAGS --with-default-kcode=none \ --enable-shared \ --enable-ipv6 \ - --with-lookup-order-hack=INET + --with-lookup-order-hack=INET \ + --disable-rpath make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} %ifarch ia64 @@ -232,6 +237,9 @@ cd %{name}-%{version} make DESTDIR=$RPM_BUILD_ROOT install cd .. +# generate ri doc +DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/ext/syck -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} + # XXX: installing irb chmod 555 $RPM_BUILD_ROOT%{_bindir}/irb install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ @@ -287,9 +295,14 @@ cp /dev/null ruby-libs.files cp /dev/null ruby-mode.files fgrep '.el' ruby-all.files >> ruby-mode.files +# for ri +cp /dev/null ri.files +fgrep '%{_datadir}/ri' ruby-all.files >> ri.files +fgrep '%{_bindir}/ri' ruby-all.files >> ri.files + # for ruby.rpm sort ruby-all.files \ - ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files ruby-mode.files | + ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files ruby-mode.files ri.files | uniq -u > ruby.files # for arch-dependent dir @@ -357,6 +370,10 @@ rm -rf tmp-ruby-docs %dir %{_libdir}/ruby/%{rubyxver}/irb/lc %dir %{_libdir}/ruby/%{rubyxver}/irb/lc/ja +%files -n ri -f ri.files +%defattr(-, root, root) +%dir %{_datadir}/ri + %files docs %defattr(-, root, root) %doc tmp-ruby-docs/ruby-docs/* @@ -367,6 +384,14 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Wed Jan 5 2005 Akira TAGOH - 1.8.2-1 +- New upstream release. +- ruby-1.8.1-ia64-stack-limit.patch: removed - it's no longer needed. +- ruby-1.8.1-cgi_session_perms.patch: likewise. +- ruby-1.8.1-cgi-dos.patch: likewise. +- generated Ruby interactive documentation - senarated package. + it's now provided as ri package. (#141806) + * Thu Nov 11 2004 Jeff Johnson 1.8.1-10 - rebuild against db-4.3.21. diff --git a/sources b/sources index bc7d4ce..5e004ab 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ -5d52c7d0e6a6eb6e3bc68d77e794898e ruby-1.8.1.tar.gz 8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 +8ffc79d96f336b80f2690a17601dea9b ruby-1.8.2.tar.gz From c9af1b7417968db00b28d9824ea89f707752378f Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Wed, 12 Jan 2005 16:31:53 +0000 Subject: [PATCH 024/529] - Rebuilt for new readline. --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index ccd2e26..4fc6f16 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.2 -Release: 1 +Release: 2 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -384,6 +384,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Wed Jan 12 2005 Tim Waugh - 1.8.2-2 +- Rebuilt for new readline. + * Wed Jan 5 2005 Akira TAGOH - 1.8.2-1 - New upstream release. - ruby-1.8.1-ia64-stack-limit.patch: removed - it's no longer needed. From be9eb09456dd94927e7ff305daf7fe3b339f0e34 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 24 Jan 2005 10:21:07 +0000 Subject: [PATCH 025/529] - separated out to rdoc package. - make the dependency of irb for rdoc. (#144708) --- ruby.spec | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/ruby.spec b/ruby.spec index 4fc6f16..55bf9f7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.2 -Release: 2 +Release: 3 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -74,6 +74,17 @@ The irb is acronym for Interactive Ruby. It evaluates ruby expression from the terminal. +%package -n rdoc +Summary: A tool to generate documentation from Ruby source files +Group: Development/Languages +Requires: %{name} = %{version}-%{release} +Requires: irb = %{version}-%{release} + +%description -n rdoc +The rdoc is a tool to generate the documentation from Ruby source files. +It supports some output formats, like HTML, Ruby interactive reference (ri), +XML and Windows Help file (chm). + %package docs Summary: Manuals and FAQs for scripting language Ruby. Group: Documentation @@ -95,6 +106,7 @@ Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. Summary: Ruby interactive reference Group: Documentation Requires: %{name} = %{version}-%{release} +Requires: rdoc = %{version}-%{release} %description -n ri ri is a command line tool that displays descriptions of built-in @@ -285,24 +297,28 @@ done # for irb.rpm fgrep 'irb' ruby-all.files > irb.files +# for ri +cp /dev/null ri.files +fgrep '%{_datadir}/ri' ruby-all.files >> ri.files +fgrep '%{_bindir}/ri' ruby-all.files >> ri.files + +# for rdoc +cp /dev/null rdoc.files +fgrep rdoc ruby-all.files >> rdoc.files + # for ruby-libs cp /dev/null ruby-libs.files (fgrep '%{_libdir}' ruby-all.files; - fgrep -h '%{_libdir}' ruby-devel.files ruby-tcltk.files irb.files) | egrep -v "elc?$" | \ + fgrep -h '%{_libdir}' ruby-devel.files ruby-tcltk.files irb.files ri.files rdoc.files) | egrep -v "elc?$" | \ sort | uniq -u > ruby-libs.files # for ruby-mode cp /dev/null ruby-mode.files fgrep '.el' ruby-all.files >> ruby-mode.files -# for ri -cp /dev/null ri.files -fgrep '%{_datadir}/ri' ruby-all.files >> ri.files -fgrep '%{_bindir}/ri' ruby-all.files >> ri.files - # for ruby.rpm sort ruby-all.files \ - ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files ruby-mode.files ri.files | + ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files ruby-mode.files ri.files rdoc.files | uniq -u > ruby.files # for arch-dependent dir @@ -363,6 +379,13 @@ rm -rf tmp-ruby-docs %defattr(-, root, root) %doc tmp-ruby-docs/ruby-tcltk/ext/* +%files -n rdoc -f rdoc.files +%defattr(-, root, root) +%dir %{_libdir}/ruby +%dir %{_libdir}/ruby/%{rubyxver} +%{_libdir}/ruby/%{rubyxver}/rdoc +%{_bindir}/rdoc + %files -n irb -f irb.files %defattr(-, root, root) %doc tmp-ruby-docs/irb/* @@ -384,6 +407,10 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Mon Jan 24 2005 Akira TAGOH - 1.8.2-3 +- separated out to rdoc package. +- make the dependency of irb for rdoc. (#144708) + * Wed Jan 12 2005 Tim Waugh - 1.8.2-2 - Rebuilt for new readline. From 843544cb044af223987ef8c24da95f4f455f6bfa Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 26 Jan 2005 05:30:35 +0000 Subject: [PATCH 026/529] - fixed the wrong generation of file manifest. (#146055) - spec file clean up. --- ruby.spec | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/ruby.spec b/ruby.spec index 55bf9f7..9446314 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.2 -Release: 3 +Release: 4 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -274,11 +274,7 @@ install -m 644 %{SOURCE10} \ cd .. # listing all files in ruby-all.files -(find $RPM_BUILD_ROOT%{_bindir} \ - $RPM_BUILD_ROOT%{_datadir} \ - $RPM_BUILD_ROOT%{_libdir} \ - $RPM_BUILD_ROOT%{_mandir} \ - -type f -o -type l) | +(find $RPM_BUILD_ROOT -type f -o -type l) | sort | uniq | sed -e "s,^$RPM_BUILD_ROOT,," \ -e "s,\(/man/man./.*\)$,\1*," > ruby-all.files egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files @@ -287,11 +283,11 @@ egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files cp /dev/null ruby-tcltk.files for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/ext/tk -type f -name '*.so'` do - grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files || : + egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : done for f in `find %{name}-%{version}/ext/tcltklib/lib -type f; find %{name}-%{version}/ext/tcltklib -type f -name '*.so'` do - grep "/`basename $f`$" ruby-all.files >> ruby-tcltk.files || : + egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : done # for irb.rpm @@ -383,8 +379,6 @@ rm -rf tmp-ruby-docs %defattr(-, root, root) %dir %{_libdir}/ruby %dir %{_libdir}/ruby/%{rubyxver} -%{_libdir}/ruby/%{rubyxver}/rdoc -%{_bindir}/rdoc %files -n irb -f irb.files %defattr(-, root, root) @@ -407,6 +401,10 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Jan 25 2005 Akira TAGOH - 1.8.2-4 +- fixed the wrong generation of file manifest. (#146055) +- spec file clean up. + * Mon Jan 24 2005 Akira TAGOH - 1.8.2-3 - separated out to rdoc package. - make the dependency of irb for rdoc. (#144708) From 491a2a0530ae618be3d1f7d15d024e908a93f6c4 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 15 Mar 2005 11:00:59 +0000 Subject: [PATCH 027/529] sync --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 9446314..b46e934 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.2 -Release: 4 +Release: 5 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -85,6 +85,7 @@ The rdoc is a tool to generate the documentation from Ruby source files. It supports some output formats, like HTML, Ruby interactive reference (ri), XML and Windows Help file (chm). + %package docs Summary: Manuals and FAQs for scripting language Ruby. Group: Documentation @@ -401,6 +402,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Mar 15 2005 Akira TAGOH - 1.8.2-5 +- rebuilt + * Tue Jan 25 2005 Akira TAGOH - 1.8.2-4 - fixed the wrong generation of file manifest. (#146055) - spec file clean up. From 703f9a33ec94eb07f23aa27d30f8cb2ce7ea9df9 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 22 Mar 2005 10:35:11 +0000 Subject: [PATCH 028/529] - ruby-1.8.2-strscan-memset.patch: fixed an wrong usage of memset(3). --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index b46e934..36a40ba 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.2 -Release: 5 +Release: 6 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -23,6 +23,7 @@ Source5: irb.1 Source10: ruby-mode-init.el Patch1: ruby-1.8.0-multilib.patch +Patch2: ruby-1.8.2-strscan-memset.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -402,6 +403,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Mar 22 2005 Akira TAGOH - 1.8.2-6 +- ruby-1.8.2-strscan-memset.patch: fixed an wrong usage of memset(3). + * Tue Mar 15 2005 Akira TAGOH - 1.8.2-5 - rebuilt From adff149d4c1a60ff2268be65d25eb314f2a29fe6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 22 Mar 2005 10:36:16 +0000 Subject: [PATCH 029/529] *** empty log message *** --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index 36a40ba..f030d7b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -125,6 +125,7 @@ tar fxz %{SOURCE2} popd pushd %{name}-%{version} %patch1 -p1 +%patch2 -p1 popd %build From 6773d6faa2c25de5567b14ed1477583e613edab5 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 6 Apr 2005 18:09:19 +0000 Subject: [PATCH 030/529] - ruby-1.8.2-deadcode.patch: removed the dead code from the source. (#146108) - make sure that all documentation files in ruby-docs are the world- readable. (#147279) --- ruby.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index f030d7b..8ba8544 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.2 -Release: 6 +Release: 7 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -24,6 +24,7 @@ Source10: ruby-mode-init.el Patch1: ruby-1.8.0-multilib.patch Patch2: ruby-1.8.2-strscan-memset.patch +Patch3: ruby-1.8.2-deadcode.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -126,6 +127,7 @@ popd pushd %{name}-%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 popd %build @@ -229,6 +231,8 @@ mkdir doc-en refm-ja faq-en faq-ja < $f > `echo $f | sed -e's/-jp//'` rm -f $f; \ done) +# make sure that all doc files are the world-readable +find -type f | xargs chmod 0644 cd .. @@ -404,6 +408,11 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Thu Apr 7 2005 Akira TAGOH - 1.8.2-7 +- ruby-1.8.2-deadcode.patch: removed the dead code from the source. (#146108) +- make sure that all documentation files in ruby-docs are the world- + readable. (#147279) + * Tue Mar 22 2005 Akira TAGOH - 1.8.2-6 - ruby-1.8.2-strscan-memset.patch: fixed an wrong usage of memset(3). From d1451a5f4b7e5946affdeec8051bed42a18a3822 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 6 Apr 2005 18:29:08 +0000 Subject: [PATCH 031/529] *** empty log message *** --- ruby.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 8ba8544..f672095 100644 --- a/ruby.spec +++ b/ruby.spec @@ -8,8 +8,7 @@ Release: 7 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk XFree86-devel autoconf gcc unzip openssl-devel db4-devel -BuildPreReq: emacs +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk XFree86-devel autoconf gcc unzip openssl-devel db4-devel emacs Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz From 790a28c2d3bb6ace025870912f4d3d54192c6c52 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 16 Jun 2005 12:51:32 +0000 Subject: [PATCH 032/529] - ruby-1.8.2-tcltk-multilib.patch: applied to get tcltklib.so built. (#160194) --- ruby.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ruby.spec b/ruby.spec index f672095..dfb8579 100644 --- a/ruby.spec +++ b/ruby.spec @@ -24,6 +24,7 @@ Source10: ruby-mode-init.el Patch1: ruby-1.8.0-multilib.patch Patch2: ruby-1.8.2-strscan-memset.patch Patch3: ruby-1.8.2-deadcode.patch +Patch4: ruby-1.8.2-tcltk-multilib.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -127,6 +128,9 @@ pushd %{name}-%{version} %patch1 -p1 %patch2 -p1 %patch3 -p1 +%ifarch sparc64 ppc64 s390x x86_64 +%patch4 -p1 +%endif popd %build @@ -407,6 +411,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Thu Jun 16 2005 Akira TAGOH - 1.8.2-8 +- ruby-1.8.2-tcltk-multilib.patch: applied to get tcltklib.so built. (#160194) + * Thu Apr 7 2005 Akira TAGOH - 1.8.2-7 - ruby-1.8.2-deadcode.patch: removed the dead code from the source. (#146108) - make sure that all documentation files in ruby-docs are the world- From 887f2693e3637155446e43d55bfcebe382f9b95f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 16 Jun 2005 12:52:53 +0000 Subject: [PATCH 033/529] bump --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index dfb8579..cd714f4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.2 -Release: 7 +Release: 8 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root From 5a3ed365c1fa5be6b69fca35ddc236ea57dda8c4 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 21 Jun 2005 08:37:58 +0000 Subject: [PATCH 034/529] - ruby-1.8.2-xmlrpc-CAN-2005-1992.patch: fixed the arbitrary command execution on XMLRPC server. (#161096) --- ruby.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruby.spec b/ruby.spec index cd714f4..d915e82 100644 --- a/ruby.spec +++ b/ruby.spec @@ -25,6 +25,7 @@ Patch1: ruby-1.8.0-multilib.patch Patch2: ruby-1.8.2-strscan-memset.patch Patch3: ruby-1.8.2-deadcode.patch Patch4: ruby-1.8.2-tcltk-multilib.patch +Patch5: ruby-1.8.2-xmlrpc-CAN-2005-1992.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -131,6 +132,7 @@ pushd %{name}-%{version} %ifarch sparc64 ppc64 s390x x86_64 %patch4 -p1 %endif +%patch5 -p1 popd %build @@ -411,6 +413,10 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Jun 21 2005 Akira TAGOH - 1.8.2-9 +- ruby-1.8.2-xmlrpc-CAN-2005-1992.patch: fixed the arbitrary command execution + on XMLRPC server. (#161096) + * Thu Jun 16 2005 Akira TAGOH - 1.8.2-8 - ruby-1.8.2-tcltk-multilib.patch: applied to get tcltklib.so built. (#160194) From c4d7ff2e5fad6e3e6302fb2a5885b72e6a036ab5 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 21 Jun 2005 08:38:24 +0000 Subject: [PATCH 035/529] bump --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d915e82..073b54a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.2 -Release: 8 +Release: 9 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root From 714d9f4d4c77b749806e16fb51da475bb6daee46 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 21 Sep 2005 07:29:44 +0000 Subject: [PATCH 036/529] - New upstream release. - Build-Requires xorg-x11-devel instead of XFree86-devel. - ruby-multilib.patch: applied for only 64-bit archs. - ruby-1.8.2-xmlrpc-CAN-2005-1992.patch: removed. it has already been in upstream. --- .cvsignore | 1 + ruby-multilib.patch | 12 ++++++++++++ ruby.spec | 22 ++++++++++++++-------- sources | 2 +- 4 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 ruby-multilib.patch diff --git a/.cvsignore b/.cvsignore index 3269d61..0872dff 100644 --- a/.cvsignore +++ b/.cvsignore @@ -5,3 +5,4 @@ rubyfaq-990927.tar.bz2 rubyfaq-jp-990927.tar.bz2 *.rpm ruby-1.8.2.tar.gz +ruby-1.8.3.tar.gz diff --git a/ruby-multilib.patch b/ruby-multilib.patch new file mode 100644 index 0000000..5f2f75b --- /dev/null +++ b/ruby-multilib.patch @@ -0,0 +1,12 @@ +diff -ruN ruby-1.8.3.orig/mkconfig.rb ruby-1.8.3/mkconfig.rb +--- ruby-1.8.3.orig/mkconfig.rb 2005-09-21 15:10:57.000000000 +0900 ++++ ruby-1.8.3/mkconfig.rb 2005-09-21 15:17:32.000000000 +0900 +@@ -74,7 +74,7 @@ + + drive = File::PATH_SEPARATOR == ';' + +-prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM ++prefix = '/lib64/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM + print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" + print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" + print " CONFIG = {}\n" diff --git a/ruby.spec b/ruby.spec index 073b54a..5aa97f7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -3,12 +3,12 @@ %define sitedir %{_libdir}/site_ruby Name: ruby -Version: 1.8.2 -Release: 9 +Version: 1.8.3 +Release: 1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk XFree86-devel autoconf gcc unzip openssl-devel db4-devel emacs +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk xorg-x11-devel autoconf gcc unzip openssl-devel db4-devel emacs Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz @@ -21,11 +21,10 @@ Source4: rubyfaq-jp-990927.tar.bz2 Source5: irb.1 Source10: ruby-mode-init.el -Patch1: ruby-1.8.0-multilib.patch +Patch1: ruby-multilib.patch Patch2: ruby-1.8.2-strscan-memset.patch Patch3: ruby-1.8.2-deadcode.patch Patch4: ruby-1.8.2-tcltk-multilib.patch -Patch5: ruby-1.8.2-xmlrpc-CAN-2005-1992.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -126,13 +125,14 @@ pushd ruby-refm-ja tar fxz %{SOURCE2} popd pushd %{name}-%{version} +%ifarch ppc64 s390x sparc64 x86_64 %patch1 -p1 +%endif %patch2 -p1 %patch3 -p1 -%ifarch sparc64 ppc64 s390x x86_64 +%ifarch ppc64 s390x sparc64 x86_64 %patch4 -p1 %endif -%patch5 -p1 popd %build @@ -262,7 +262,7 @@ make DESTDIR=$RPM_BUILD_ROOT install cd .. # generate ri doc -DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/ext/syck -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} +DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_target_cpu}-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb chmod 555 $RPM_BUILD_ROOT%{_bindir}/irb @@ -413,6 +413,12 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Wed Sep 21 2005 Akira TAGOH - 1.8.3-1 +- New upstream release. +- Build-Requires xorg-x11-devel instead of XFree86-devel. +- ruby-multilib.patch: applied for only 64-bit archs. +- ruby-1.8.2-xmlrpc-CAN-2005-1992.patch: removed. it has already been in upstream. + * Tue Jun 21 2005 Akira TAGOH - 1.8.2-9 - ruby-1.8.2-xmlrpc-CAN-2005-1992.patch: fixed the arbitrary command execution on XMLRPC server. (#161096) diff --git a/sources b/sources index 5e004ab..64da9dc 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -8ffc79d96f336b80f2690a17601dea9b ruby-1.8.2.tar.gz +63d6c2bddd6af86664e338b31f3189a6 ruby-1.8.3.tar.gz From ab1fd1f1693181a6b8db59b46f02fb7214093d4b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 21 Sep 2005 08:10:50 +0000 Subject: [PATCH 037/529] *** empty log message *** --- ruby.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 5aa97f7..9c7b583 100644 --- a/ruby.spec +++ b/ruby.spec @@ -262,7 +262,15 @@ make DESTDIR=$RPM_BUILD_ROOT install cd .. # generate ri doc -DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_target_cpu}-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} +case %{_target_cpu} in + ppc|ppc64) + _cpu=%{_arch} + ;; + *) + _cpu=%{_target_cpu} + ; +esac +DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_cpu}-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb chmod 555 $RPM_BUILD_ROOT%{_bindir}/irb From 34919b27ef43ec46a2a3be57c99b61870a82ed94 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 21 Sep 2005 08:16:09 +0000 Subject: [PATCH 038/529] *** empty log message *** --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 9c7b583..6501c95 100644 --- a/ruby.spec +++ b/ruby.spec @@ -268,9 +268,9 @@ case %{_target_cpu} in ;; *) _cpu=%{_target_cpu} - ; + ;; esac -DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_cpu}-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} +DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb chmod 555 $RPM_BUILD_ROOT%{_bindir}/irb From 9d9c2e3da75ed025c4d2dbb377d1364953407b52 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 21 Sep 2005 09:11:28 +0000 Subject: [PATCH 039/529] *** empty log message *** --- ruby.spec | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ruby.spec b/ruby.spec index 6501c95..04b87f8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -262,14 +262,7 @@ make DESTDIR=$RPM_BUILD_ROOT install cd .. # generate ri doc -case %{_target_cpu} in - ppc|ppc64) - _cpu=%{_arch} - ;; - *) - _cpu=%{_target_cpu} - ;; -esac +_cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb From 6955a36e59f68c84792f4613ba0d8b3cde2450c1 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 26 Sep 2005 08:58:25 +0000 Subject: [PATCH 040/529] - ruby-multilib.patch: added another chunk for multilib. --- ruby-multilib.patch | 22 ++++++++++++++++++++++ ruby.spec | 5 ++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ruby-multilib.patch b/ruby-multilib.patch index 5f2f75b..1caf23d 100644 --- a/ruby-multilib.patch +++ b/ruby-multilib.patch @@ -10,3 +10,25 @@ diff -ruN ruby-1.8.3.orig/mkconfig.rb ruby-1.8.3/mkconfig.rb print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" print " CONFIG = {}\n" +diff -ruN ruby-1.8.3.orig/configure.in ruby-1.8.3/configure.in +--- ruby-1.8.3.orig/configure.in 2005-09-07 08:22:56.000000000 +0900 ++++ ruby-1.8.3/configure.in 2005-09-26 17:46:53.000000000 +0900 +@@ -1424,15 +1424,15 @@ + RUBY_LIB_PREFIX="/lib/ruby" + ;; + *) +- RUBY_LIB_PREFIX="${prefix}/lib/ruby" ++ RUBY_LIB_PREFIX="${libdir}/ruby" + ;; + esac + RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" + + AC_ARG_WITH(sitedir, +- [ --with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]], ++ [ --with-sitedir=DIR site libraries in DIR [LIBDIR/ruby/site_ruby]], + [sitedir=$withval], +- [sitedir='${prefix}/lib/ruby/site_ruby']) ++ [sitedir='${libdir}/ruby/site_ruby']) + SITE_DIR="`eval \"echo ${sitedir}\"`" + case "$target_os" in + cygwin*|mingw*|*djgpp*|os2-emx*) diff --git a/ruby.spec b/ruby.spec index 04b87f8..0c53517 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.3 -Release: 1 +Release: 2 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -414,6 +414,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Mon Sep 26 2005 Akira TAGOH - 1.8.3-2 +- ruby-multilib.patch: added another chunk for multilib. + * Wed Sep 21 2005 Akira TAGOH - 1.8.3-1 - New upstream release. - Build-Requires xorg-x11-devel instead of XFree86-devel. From 1424a6b963ddf475f397ff897773c26f3d9b5e07 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 26 Sep 2005 08:59:06 +0000 Subject: [PATCH 041/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 0c53517..378fda9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -415,7 +415,7 @@ rm -rf tmp-ruby-docs %changelog * Mon Sep 26 2005 Akira TAGOH - 1.8.3-2 -- ruby-multilib.patch: added another chunk for multilib. +- ruby-multilib.patch: added another chunk for multilib. (#169127) * Wed Sep 21 2005 Akira TAGOH - 1.8.3-1 - New upstream release. From f62bb2380a579004e723c1e032f377ab6e03ead0 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 3 Oct 2005 06:36:25 +0000 Subject: [PATCH 042/529] - fixed the wrong file list. the external library for tcl/tk was included in ruby-libs unexpectedly. --- ruby.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 378fda9..33c9271 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.3 -Release: 2 +Release: 3 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -294,11 +294,11 @@ egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files # for ruby-tcltk.rpm cp /dev/null ruby-tcltk.files -for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/ext/tk -type f -name '*.so'` +for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/.ext/ -type f -name '*.so'` do egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : done -for f in `find %{name}-%{version}/ext/tcltklib/lib -type f; find %{name}-%{version}/ext/tcltklib -type f -name '*.so'` +for f in `find %{name}-%{version}/ext/tcltklib/lib -type f; find %{name}-%{version}/.ext -type f -name '*.so'` do egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : done @@ -414,6 +414,10 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Mon Oct 3 2005 Akira TAGOH - 1.8.3-3 +- fixed the wrong file list. the external library for tcl/tk was included + in ruby-libs unexpectedly. + * Mon Sep 26 2005 Akira TAGOH - 1.8.3-2 - ruby-multilib.patch: added another chunk for multilib. (#169127) From 25947e617c7d03518168fe920ef12494296e4172 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 4 Oct 2005 04:39:32 +0000 Subject: [PATCH 043/529] - moved the documents from ruby-libs to ruby-docs, which contains the arch specific thing and to be multilib support. (#168826) --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 33c9271..d67f1ca 100644 --- a/ruby.spec +++ b/ruby.spec @@ -374,7 +374,6 @@ rm -rf tmp-ruby-docs %doc %{name}-%{version}/COPYING* %doc %{name}-%{version}/ChangeLog %doc %{name}-%{version}/LEGAL -%doc tmp-ruby-docs/ruby-libs/* %dir %{_libdir}/ruby %dir %{_libdir}/ruby/%{rubyxver} %dir %{_libdir}/ruby/%{rubyxver}/cgi @@ -407,6 +406,7 @@ rm -rf tmp-ruby-docs %files docs %defattr(-, root, root) %doc tmp-ruby-docs/ruby-docs/* +%doc tmp-ruby-docs/ruby-libs/* %files mode -f ruby-mode.files %defattr(-, root, root) @@ -414,6 +414,10 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Oct 4 2005 Akira TAGOH - 1.8.3-4 +- moved the documents from ruby-libs to ruby-docs, which contains the arch + specific thing and to be multilib support. (#168826) + * Mon Oct 3 2005 Akira TAGOH - 1.8.3-3 - fixed the wrong file list. the external library for tcl/tk was included in ruby-libs unexpectedly. From 185c12f196d0c8b5d85e588aff16891b75a8b6c9 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 4 Oct 2005 04:40:06 +0000 Subject: [PATCH 044/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d67f1ca..205607c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.3 -Release: 3 +Release: 4 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root From d4bcc3beddc81d5763b831cf708a4d16afb4d16b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 31 Oct 2005 02:56:40 +0000 Subject: [PATCH 045/529] - New upstream release. - ruby-1.8.2-strscan-memset.patch: removed because it's no longer needed. --- .cvsignore | 1 + ruby.spec | 12 +++++++----- sources | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.cvsignore b/.cvsignore index 0872dff..934862e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -6,3 +6,4 @@ rubyfaq-jp-990927.tar.bz2 *.rpm ruby-1.8.2.tar.gz ruby-1.8.3.tar.gz +ruby-1.8.4-preview1.tar.gz diff --git a/ruby.spec b/ruby.spec index 205607c..a1288eb 100644 --- a/ruby.spec +++ b/ruby.spec @@ -3,14 +3,14 @@ %define sitedir %{_libdir}/site_ruby Name: ruby -Version: 1.8.3 -Release: 4 +Version: 1.8.4 +Release: 0.1.preview1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk xorg-x11-devel autoconf gcc unzip openssl-devel db4-devel emacs -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}-preview1.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz @@ -22,7 +22,6 @@ Source5: irb.1 Source10: ruby-mode-init.el Patch1: ruby-multilib.patch -Patch2: ruby-1.8.2-strscan-memset.patch Patch3: ruby-1.8.2-deadcode.patch Patch4: ruby-1.8.2-tcltk-multilib.patch @@ -128,7 +127,6 @@ pushd %{name}-%{version} %ifarch ppc64 s390x sparc64 x86_64 %patch1 -p1 %endif -%patch2 -p1 %patch3 -p1 %ifarch ppc64 s390x sparc64 x86_64 %patch4 -p1 @@ -414,6 +412,10 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Mon Oct 31 2005 Akira TAGOH - 1.8.4-0.1.preview1 +- New upstream release. +- ruby-1.8.2-strscan-memset.patch: removed because it's no longer needed. + * Tue Oct 4 2005 Akira TAGOH - 1.8.3-4 - moved the documents from ruby-libs to ruby-docs, which contains the arch specific thing and to be multilib support. (#168826) diff --git a/sources b/sources index 64da9dc..7fc30fa 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -63d6c2bddd6af86664e338b31f3189a6 ruby-1.8.3.tar.gz +cfb6e4c53369c016ebb4061c240c493d ruby-1.8.4-preview1.tar.gz From 3e607e84455e9a275d6d61329b3067fffb8188c8 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 1 Nov 2005 01:56:57 +0000 Subject: [PATCH 046/529] - build-deps libX11-devel instead of xorg-x11-devel. --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index a1288eb..7527cfe 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,11 +4,11 @@ Name: ruby Version: 1.8.4 -Release: 0.1.preview1 +Release: 0.2.preview1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk xorg-x11-devel autoconf gcc unzip openssl-devel db4-devel emacs +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}-preview1.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz @@ -412,6 +412,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Nov 1 2005 Akira TAGOH - 1.8.4-0.2.preview1 +- build-deps libX11-devel instead of xorg-x11-devel. + * Mon Oct 31 2005 Akira TAGOH - 1.8.4-0.1.preview1 - New upstream release. - ruby-1.8.2-strscan-memset.patch: removed because it's no longer needed. From 9640442201989444bb6253bf965b84a5b4bff410 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 9 Nov 2005 15:42:27 +0000 Subject: [PATCH 047/529] - rebuilt against the latest openssl. --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 7527cfe..092de1b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.4 -Release: 0.2.preview1 +Release: 0.3.preview1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -412,6 +412,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Thu Nov 10 2005 Akira TAGOH - 1.8.4-0.3.preview1 +- rebuilt against the latest openssl. + * Tue Nov 1 2005 Akira TAGOH - 1.8.4-0.2.preview1 - build-deps libX11-devel instead of xorg-x11-devel. From cc384246eed669a79b94ffc80ee8c0241a4a9ca9 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Fri, 9 Dec 2005 22:43:02 +0000 Subject: [PATCH 048/529] gcc update bump --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 092de1b..870f50c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.4 -Release: 0.3.preview1 +Release: 0.3.preview1.1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -412,6 +412,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Fri Dec 09 2005 Jesse Keating +- rebuilt + * Thu Nov 10 2005 Akira TAGOH - 1.8.4-0.3.preview1 - rebuilt against the latest openssl. From b3723722dd8a64e6ea397a495e35739767711c73 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 16 Dec 2005 10:38:22 +0000 Subject: [PATCH 049/529] - updates to 1.8.4-preview2. - renamed the packages to ruby-* (#175765) - irb -> ruby-irb - rdoc -> ruby-rdoc - ri -> ruby-ri - added tcl-devel and tk-devel into BuildRequires. --- .cvsignore | 1 + ruby.spec | 42 ++++++++++++++++++++++++++++-------------- sources | 2 +- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/.cvsignore b/.cvsignore index 934862e..db3afa4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -7,3 +7,4 @@ rubyfaq-jp-990927.tar.bz2 ruby-1.8.2.tar.gz ruby-1.8.3.tar.gz ruby-1.8.4-preview1.tar.gz +ruby-1.8.4-preview2.tar.gz diff --git a/ruby.spec b/ruby.spec index 870f50c..2d5dd67 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,13 +4,13 @@ Name: ruby Version: 1.8.4 -Release: 0.3.preview1.1 +Release: 0.4.preview2 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl tk libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}-preview1.tar.gz +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}-preview2.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz @@ -65,23 +65,27 @@ Requires: %{name}-libs = %{version}-%{release} Tcl/Tk interface for the object-oriented scripting language Ruby. -%package -n irb +%package irb Summary: The Interactive Ruby. Group: Development/Languages Requires: %{name} = %{version}-%{release} +Provides: irb +Obsoletes: irb -%description -n irb +%description irb The irb is acronym for Interactive Ruby. It evaluates ruby expression from the terminal. -%package -n rdoc +%package rdoc Summary: A tool to generate documentation from Ruby source files Group: Development/Languages Requires: %{name} = %{version}-%{release} -Requires: irb = %{version}-%{release} +Requires: %{name}-irb = %{version}-%{release} +Provides: rdoc +Obsoletes: rdoc -%description -n rdoc +%description rdoc The rdoc is a tool to generate the documentation from Ruby source files. It supports some output formats, like HTML, Ruby interactive reference (ri), XML and Windows Help file (chm). @@ -104,13 +108,15 @@ Requires: emacs-common Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. -%package -n ri +%package ri Summary: Ruby interactive reference Group: Documentation Requires: %{name} = %{version}-%{release} -Requires: rdoc = %{version}-%{release} +Requires: %{name}-rdoc = %{version}-%{release} +Provides: ri +Obsoletes: ri -%description -n ri +%description ri ri is a command line tool that displays descriptions of built-in Ruby methods, classes and modules. For methods, it shows you the calling sequence and a description. For classes and modules, it shows a synopsis @@ -385,19 +391,19 @@ rm -rf tmp-ruby-docs %defattr(-, root, root) %doc tmp-ruby-docs/ruby-tcltk/ext/* -%files -n rdoc -f rdoc.files +%files rdoc -f rdoc.files %defattr(-, root, root) %dir %{_libdir}/ruby %dir %{_libdir}/ruby/%{rubyxver} -%files -n irb -f irb.files +%files irb -f irb.files %defattr(-, root, root) %doc tmp-ruby-docs/irb/* %dir %{_libdir}/ruby/%{rubyxver}/irb %dir %{_libdir}/ruby/%{rubyxver}/irb/lc %dir %{_libdir}/ruby/%{rubyxver}/irb/lc/ja -%files -n ri -f ri.files +%files ri -f ri.files %defattr(-, root, root) %dir %{_datadir}/ri @@ -412,6 +418,14 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Fri Dec 16 2005 Akira TAGOH - 1.8.4-0.4.preview2 +- updates to 1.8.4-preview2. +- renamed the packages to ruby-* (#175765) + - irb -> ruby-irb + - rdoc -> ruby-rdoc + - ri -> ruby-ri +- added tcl-devel and tk-devel into BuildRequires. + * Fri Dec 09 2005 Jesse Keating - rebuilt diff --git a/sources b/sources index 7fc30fa..f815bc8 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -cfb6e4c53369c016ebb4061c240c493d ruby-1.8.4-preview1.tar.gz +e5a48054fb34f09da17e8e8f04b8c706 ruby-1.8.4-preview2.tar.gz From 1cfcc9deef844a195886b18e4164949dea5b6de5 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 16 Dec 2005 10:46:41 +0000 Subject: [PATCH 050/529] *** empty log message *** --- ruby-tcltk-multilib.patch | 30 ++++++++++++++++++++++++++++++ ruby.spec | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ruby-tcltk-multilib.patch diff --git a/ruby-tcltk-multilib.patch b/ruby-tcltk-multilib.patch new file mode 100644 index 0000000..a48e767 --- /dev/null +++ b/ruby-tcltk-multilib.patch @@ -0,0 +1,30 @@ +diff -ruN ruby-1.8.4.orig/ext/tk/extconf.rb ruby-1.8.4/ext/tk/extconf.rb +--- ruby-1.8.4.orig/ext/tk/extconf.rb 2005-11-02 20:28:40.000000000 +0900 ++++ ruby-1.8.4/ext/tk/extconf.rb 2005-12-16 19:44:57.000000000 +0900 +@@ -48,7 +48,7 @@ + stubs = enable_config("tcltk_stubs") || with_config("tcltk_stubs") + + def find_tcl(tcllib, stubs) +- paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"] ++ paths = ["/usr/local/lib64", "/usr/local/lib" "/usr/pkg/lib64", "/usr/pkg/lib" "/usr/lib64" "/usr/lib"] + if stubs + func = "Tcl_InitStubs" + lib = "tclstub" +@@ -71,7 +71,7 @@ + end + + def find_tk(tklib, stubs) +- paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"] ++ paths = ["/usr/local/lib64" "/usr/local/lib", "/usr/pkg/lib64" "/usr/pkg/lib", "/usr/lib64" "/usr/lib"] + if stubs + func = "Tk_InitStubs" + lib = "tkstub" +@@ -274,7 +274,7 @@ + if tcltk_framework || + (have_header("tcl.h") && have_header("tk.h") && + (is_win32 || find_library("X11", "XOpenDisplay", +- "/usr/X11/lib", "/usr/lib/X11", "/usr/X11R6/lib", "/usr/openwin/lib")) && ++ "/usr/X11/lib64" "/usr/X11/lib", "/usr/lib64/X11" "/usr/lib/X11", "/usr/X11R6/lib64" "/usr/X11R6/lib", "/usr/openwin/lib64" "/usr/openwin/lib")) && + find_tcl(tcllib, stubs) && + find_tk(tklib, stubs)) + $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs diff --git a/ruby.spec b/ruby.spec index 2d5dd67..3215c9f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -23,7 +23,7 @@ Source10: ruby-mode-init.el Patch1: ruby-multilib.patch Patch3: ruby-1.8.2-deadcode.patch -Patch4: ruby-1.8.2-tcltk-multilib.patch +Patch4: ruby-tcltk-multilib.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages From 9136cfaca1692a992d4e0ab01036629a90a7f846 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 27 Dec 2005 03:49:08 +0000 Subject: [PATCH 051/529] - New upstream release. - fixed a missing return statement. (#140833) - fixed an use of uninitialized variable. (#144890) --- .cvsignore | 1 + ruby.spec | 7 ++++++- sources | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.cvsignore b/.cvsignore index db3afa4..d6ac41a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -8,3 +8,4 @@ ruby-1.8.2.tar.gz ruby-1.8.3.tar.gz ruby-1.8.4-preview1.tar.gz ruby-1.8.4-preview2.tar.gz +ruby-1.8.4.tar.gz diff --git a/ruby.spec b/ruby.spec index 3215c9f..334a117 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.4 -Release: 0.4.preview2 +Release: 1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -418,6 +418,11 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Dec 27 2005 Akira TAGOH - 1.8.4-1 +- New upstream release. + - fixed a missing return statement. (#140833) + - fixed an use of uninitialized variable. (#144890) + * Fri Dec 16 2005 Akira TAGOH - 1.8.4-0.4.preview2 - updates to 1.8.4-preview2. - renamed the packages to ruby-* (#175765) diff --git a/sources b/sources index f815bc8..cc60eef 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -e5a48054fb34f09da17e8e8f04b8c706 ruby-1.8.4-preview2.tar.gz +bd8c2e593e1fa4b01fd98eaf016329bb ruby-1.8.4.tar.gz From c4b94467276305f643d78f3d2b39faee46ee2bc7 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 27 Dec 2005 03:53:40 +0000 Subject: [PATCH 052/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 334a117..8d6bac0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,7 +10,7 @@ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}-preview2.tar.gz +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz From b147747d755dd5487356119fec6f0124d6804cc7 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 4 Jan 2006 09:18:52 +0000 Subject: [PATCH 053/529] - ruby-tcltk-multilib.patch: fixed a typo. --- ruby-tcltk-multilib.patch | 6 +++--- ruby.spec | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ruby-tcltk-multilib.patch b/ruby-tcltk-multilib.patch index a48e767..2b0a250 100644 --- a/ruby-tcltk-multilib.patch +++ b/ruby-tcltk-multilib.patch @@ -6,7 +6,7 @@ diff -ruN ruby-1.8.4.orig/ext/tk/extconf.rb ruby-1.8.4/ext/tk/extconf.rb def find_tcl(tcllib, stubs) - paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"] -+ paths = ["/usr/local/lib64", "/usr/local/lib" "/usr/pkg/lib64", "/usr/pkg/lib" "/usr/lib64" "/usr/lib"] ++ paths = ["/usr/local/lib64", "/usr/local/lib", "/usr/pkg/lib64", "/usr/pkg/lib", "/usr/lib64", "/usr/lib"] if stubs func = "Tcl_InitStubs" lib = "tclstub" @@ -15,7 +15,7 @@ diff -ruN ruby-1.8.4.orig/ext/tk/extconf.rb ruby-1.8.4/ext/tk/extconf.rb def find_tk(tklib, stubs) - paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"] -+ paths = ["/usr/local/lib64" "/usr/local/lib", "/usr/pkg/lib64" "/usr/pkg/lib", "/usr/lib64" "/usr/lib"] ++ paths = ["/usr/local/lib64", "/usr/local/lib", "/usr/pkg/lib64", "/usr/pkg/lib", "/usr/lib64", "/usr/lib"] if stubs func = "Tk_InitStubs" lib = "tkstub" @@ -24,7 +24,7 @@ diff -ruN ruby-1.8.4.orig/ext/tk/extconf.rb ruby-1.8.4/ext/tk/extconf.rb (have_header("tcl.h") && have_header("tk.h") && (is_win32 || find_library("X11", "XOpenDisplay", - "/usr/X11/lib", "/usr/lib/X11", "/usr/X11R6/lib", "/usr/openwin/lib")) && -+ "/usr/X11/lib64" "/usr/X11/lib", "/usr/lib64/X11" "/usr/lib/X11", "/usr/X11R6/lib64" "/usr/X11R6/lib", "/usr/openwin/lib64" "/usr/openwin/lib")) && ++ "/usr/X11/lib64", "/usr/X11/lib", "/usr/lib64/X11", "/usr/lib/X11", "/usr/X11R6/lib64", "/usr/X11R6/lib", "/usr/openwin/lib64", "/usr/openwin/lib")) && find_tcl(tcllib, stubs) && find_tk(tklib, stubs)) $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs diff --git a/ruby.spec b/ruby.spec index 8d6bac0..158d900 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.4 -Release: 1 +Release: 2 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -418,6 +418,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Wed Jan 4 2006 Akira TAGOH - 1.8.4-2 +- ruby-tcltk-multilib.patch: fixed a typo. + * Tue Dec 27 2005 Akira TAGOH - 1.8.4-1 - New upstream release. - fixed a missing return statement. (#140833) From 51bc637a98ee4bdc1299717aab16a8abe7baa21e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 6 Feb 2006 04:21:50 +0000 Subject: [PATCH 054/529] - ruby-1.8.4-no-eaccess.patch: backported from ruby CVS to avoid conflict between newer glibc. (#179835) --- ruby-1.8.4-no-eaccess.patch | 56 +++++++++++++++++++++++++++++++++++++ ruby.spec | 8 +++++- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.4-no-eaccess.patch diff --git a/ruby-1.8.4-no-eaccess.patch b/ruby-1.8.4-no-eaccess.patch new file mode 100644 index 0000000..412d3d7 --- /dev/null +++ b/ruby-1.8.4-no-eaccess.patch @@ -0,0 +1,56 @@ +diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in +--- ruby-1.8.4.orig/configure.in 2005-11-24 21:07:18.000000000 +0900 ++++ ruby-1.8.4/configure.in 2006-02-06 12:51:58.000000000 +0900 +@@ -437,7 +437,7 @@ + AC_REPLACE_FUNCS(dup2 memmove strcasecmp strncasecmp strerror strftime\ + strchr strstr strtoul crypt flock vsnprintf\ + isnan finite isinf hypot acosh erf) +-AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd\ ++AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd eaccess\ + truncate chsize times utimes fcntl lockf lstat symlink link\ + readlink setitimer setruid seteuid setreuid setresuid\ + setproctitle setrgid setegid setregid setresgid issetugid pause\ +diff -ruN ruby-1.8.4.orig/file.c ruby-1.8.4/file.c +--- ruby-1.8.4.orig/file.c 2005-12-21 18:20:15.000000000 +0900 ++++ ruby-1.8.4/file.c 2006-02-06 12:52:48.000000000 +0900 +@@ -849,6 +849,7 @@ + # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) + #endif + ++#ifndef HAVE_EACCESS + int + eaccess(path, mode) + const char *path; +@@ -887,6 +888,7 @@ + return access(path, mode); + #endif + } ++#endif + + + /* +diff -ruN ruby-1.8.4.orig/intern.h ruby-1.8.4/intern.h +--- ruby-1.8.4.orig/intern.h 2005-11-23 11:06:00.000000000 +0900 ++++ ruby-1.8.4/intern.h 2006-02-06 12:52:54.000000000 +0900 +@@ -221,7 +221,6 @@ + void rb_thread_atfork _((void)); + VALUE rb_funcall_rescue __((VALUE, ID, int, ...)); + /* file.c */ +-int eaccess _((const char*, int)); + VALUE rb_file_s_expand_path _((int, VALUE *)); + VALUE rb_file_expand_path _((VALUE, VALUE)); + void rb_file_const _((const char*, VALUE)); +diff -ruN ruby-1.8.4.orig/missing.h ruby-1.8.4/missing.h +--- ruby-1.8.4.orig/missing.h 2005-06-13 01:58:41.000000000 +0900 ++++ ruby-1.8.4/missing.h 2006-02-06 12:53:29.000000000 +0900 +@@ -39,6 +39,10 @@ + extern int dup2 _((int, int)); + #endif + ++#ifndef HAVE_EACCESS ++extern int eaccess(const char*, int); ++#endif ++ + #ifndef HAVE_FINITE + extern int finite _((double)); + #endif diff --git a/ruby.spec b/ruby.spec index 158d900..103ffd6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.4 -Release: 2 +Release: 3 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -24,6 +24,7 @@ Source10: ruby-mode-init.el Patch1: ruby-multilib.patch Patch3: ruby-1.8.2-deadcode.patch Patch4: ruby-tcltk-multilib.patch +Patch5: ruby-1.8.4-no-eaccess.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -137,6 +138,7 @@ pushd %{name}-%{version} %ifarch ppc64 s390x sparc64 x86_64 %patch4 -p1 %endif +%patch5 -p1 popd %build @@ -418,6 +420,10 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Mon Feb 6 2006 Akira TAGOH - 1.8.4-3 +- ruby-1.8.4-no-eaccess.patch: backported from ruby CVS to avoid conflict + between newer glibc. (#179835) + * Wed Jan 4 2006 Akira TAGOH - 1.8.4-2 - ruby-tcltk-multilib.patch: fixed a typo. From a68b401ff3449ae8302e45502bd2e16ac64e5676 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 7 Feb 2006 13:46:07 +0000 Subject: [PATCH 055/529] bump for new gcc/glibc --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 103ffd6..2f1b24e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.4 -Release: 3 +Release: 3.1 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -420,6 +420,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Tue Feb 07 2006 Jesse Keating - 1.8.4-3.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + * Mon Feb 6 2006 Akira TAGOH - 1.8.4-3 - ruby-1.8.4-no-eaccess.patch: backported from ruby CVS to avoid conflict between newer glibc. (#179835) From 66c8f564a66f14b3040f9746d6f4eb288c1e14c2 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 11 Feb 2006 05:36:38 +0000 Subject: [PATCH 056/529] bump for bug in double-long on ppc(64) --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 2f1b24e..5d6ae45 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,7 +4,7 @@ Name: ruby Version: 1.8.4 -Release: 3.1 +Release: 3.2 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -420,6 +420,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Fri Feb 10 2006 Jesse Keating - 1.8.4-3.2 +- bump again for double-long bug on ppc(64) + * Tue Feb 07 2006 Jesse Keating - 1.8.4-3.1 - rebuilt for new gcc4.1 snapshot and glibc changes From b89a099ea9158a85e4faabb5d8f22dfd5e4d5a7f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 17 Apr 2006 05:12:03 +0000 Subject: [PATCH 057/529] - correct sitelibdir. (#184198) --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 5d6ae45..2261897 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,10 +1,10 @@ %define manver 1.4.6 %define rubyxver 1.8 -%define sitedir %{_libdir}/site_ruby +%define sitedir %{_libdir}/ruby/site_ruby Name: ruby Version: 1.8.4 -Release: 3.2 +Release: 4.fc6 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -420,6 +420,9 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Mon Apr 17 2006 Akira TAGOH - 1.8.4-4 +- correct sitelibdir. (#184198) + * Fri Feb 10 2006 Jesse Keating - 1.8.4-3.2 - bump again for double-long bug on ppc(64) From 38b1bf15b29ef1f356ed33d54fdf96efb5dbb235 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 20 Apr 2006 01:08:23 +0000 Subject: [PATCH 058/529] - ruby-rubyprefix.patch: moved all arch-independent modules to /usr/lib/ruby and keep arch-dependent modules in /usr/lib64/ruby for 64bit arch. so 'rubylibdir', 'sitelibdir' and 'sitedir' on Config::CONFIG points to /usr/lib/ruby now. (#184199) --- ruby-multilib.patch | 22 ---------- ruby-rubyprefix.patch | 96 +++++++++++++++++++++++++++++++++++++++++++ ruby.spec | 63 ++++++++++++++++++---------- 3 files changed, 137 insertions(+), 44 deletions(-) create mode 100644 ruby-rubyprefix.patch diff --git a/ruby-multilib.patch b/ruby-multilib.patch index 1caf23d..5f2f75b 100644 --- a/ruby-multilib.patch +++ b/ruby-multilib.patch @@ -10,25 +10,3 @@ diff -ruN ruby-1.8.3.orig/mkconfig.rb ruby-1.8.3/mkconfig.rb print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" print " CONFIG = {}\n" -diff -ruN ruby-1.8.3.orig/configure.in ruby-1.8.3/configure.in ---- ruby-1.8.3.orig/configure.in 2005-09-07 08:22:56.000000000 +0900 -+++ ruby-1.8.3/configure.in 2005-09-26 17:46:53.000000000 +0900 -@@ -1424,15 +1424,15 @@ - RUBY_LIB_PREFIX="/lib/ruby" - ;; - *) -- RUBY_LIB_PREFIX="${prefix}/lib/ruby" -+ RUBY_LIB_PREFIX="${libdir}/ruby" - ;; - esac - RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" - - AC_ARG_WITH(sitedir, -- [ --with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]], -+ [ --with-sitedir=DIR site libraries in DIR [LIBDIR/ruby/site_ruby]], - [sitedir=$withval], -- [sitedir='${prefix}/lib/ruby/site_ruby']) -+ [sitedir='${libdir}/ruby/site_ruby']) - SITE_DIR="`eval \"echo ${sitedir}\"`" - case "$target_os" in - cygwin*|mingw*|*djgpp*|os2-emx*) diff --git a/ruby-rubyprefix.patch b/ruby-rubyprefix.patch new file mode 100644 index 0000000..fc54018 --- /dev/null +++ b/ruby-rubyprefix.patch @@ -0,0 +1,96 @@ +diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in +--- ruby-1.8.4.orig/configure.in 2006-04-19 21:54:44.000000000 +0900 ++++ ruby-1.8.4/configure.in 2006-04-19 21:59:48.000000000 +0900 +@@ -1433,6 +1433,13 @@ + rubyw_install_name="$RUBYW_INSTALL_NAME" + ;; + esac ++ ++AC_ARG_WITH(ruby-prefix, ++ AC_HELP_STRING([--with-ruby-prefix], [build ruby with the special library prefix.]) ++ ,, ++ with_ruby_prefix=no) ++ ++if test "x$with_ruby_prefix" = "x"; then + case "$target_os" in + cygwin*|mingw*|*djgpp*|os2-emx*) + RUBY_LIB_PREFIX="/lib/ruby" +@@ -1441,21 +1448,30 @@ + RUBY_LIB_PREFIX="${prefix}/lib/ruby" + ;; + esac ++else ++ RUBY_LIB_PREFIX="${with_ruby_prefix}/ruby" ++fi + RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" ++RUBY_LIB_PATH2="${libdir}/ruby/${MAJOR}.${MINOR}" + + AC_ARG_WITH(sitedir, + [ --with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]], + [sitedir=$withval], + [sitedir='${prefix}/lib/ruby/site_ruby']) +-SITE_DIR="`eval \"echo ${sitedir}\"`" ++SITE_DIR="`eval \"echo ${sitedir}\" | sed -e s/lib64/lib/`" ++_fc_sitedir=${sitedir} ++SITE_DIR2="`eval \"echo ${_fc_sitedir}\"`" ++sitedir="`eval \"echo ${sitedir}\" | sed -e s/lib64/lib/`" + case "$target_os" in + cygwin*|mingw*|*djgpp*|os2-emx*) + RUBY_SITE_LIB_PATH="`expr "$SITE_DIR" : "$prefix\(/.*\)"`" || + RUBY_SITE_LIB_PATH="$SITE_DIR";; + *) +- RUBY_SITE_LIB_PATH="$SITE_DIR";; ++ RUBY_SITE_LIB_PATH="$SITE_DIR"; ++ RUBY_SITE_LIB_PATH2="$SITE_DIR2";; + esac ++RUBY_SITE_LIB_PATH3="${RUBY_SITE_LIB_PATH2}/${MAJOR}.${MINOR}" + RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}" + + AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") + AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") +@@ -1464,6 +1480,7 @@ + AC_SUBST(arch)dnl + AC_SUBST(sitearch)dnl + AC_SUBST(sitedir)dnl ++AC_SUBST(_fc_sitedir)dnl + + configure_args=$ac_configure_args + AC_SUBST(configure_args)dnl +@@ -1472,7 +1489,7 @@ + arch="fat-${target_os}" + + AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB, +- "${RUBY_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") ++ "${RUBY_LIB_PATH2}/" __ARCHITECTURE__ "-${target_os}") + + AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB, + "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") +@@ -1487,8 +1504,8 @@ + *) sitearch="${arch}" ;; + esac + +-AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}") +-AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${sitearch}") ++AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH2}/${arch}") ++AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH3}/${sitearch}") + + AC_ARG_WITH(search-path, + [ --with-search-path=DIR specify the additional search path], +diff -ruN ruby-1.8.4.orig/mkconfig.rb ruby-1.8.4/mkconfig.rb +--- ruby-1.8.4.orig/mkconfig.rb 2005-11-11 08:22:03.000000000 +0900 ++++ ruby-1.8.4/mkconfig.rb 2006-04-19 21:55:08.000000000 +0900 +@@ -108,10 +108,10 @@ + print v_fast, v_others + print <> rdoc.files # for ruby-libs cp /dev/null ruby-libs.files -(fgrep '%{_libdir}' ruby-all.files; - fgrep -h '%{_libdir}' ruby-devel.files ruby-tcltk.files irb.files ri.files rdoc.files) | egrep -v "elc?$" | \ +(fgrep '%{_prefix}/lib' ruby-all.files; + fgrep -h '%{_prefix}/lib' ruby-devel.files ruby-tcltk.files irb.files ri.files rdoc.files) | egrep -v "elc?$" | \ sort | uniq -u > ruby-libs.files # for ruby-mode @@ -343,7 +353,6 @@ arch=`$RPM_BUILD_ROOT%{_bindir}/ruby -r $rbconfig -e 'printf ("%s\n", Config::CO cat <<__EOF__ >> ruby-libs.files %%dir %%{_libdir}/ruby/%%{rubyxver}/$arch %%dir %%{_libdir}/ruby/%%{rubyxver}/$arch/digest -%%dir %%{sitedir}/%%{rubyxver}/$arch __EOF__ %clean @@ -381,13 +390,17 @@ rm -rf tmp-ruby-docs %doc %{name}-%{version}/ChangeLog %doc %{name}-%{version}/LEGAL %dir %{_libdir}/ruby +%dir %{_prefix}/lib/ruby %dir %{_libdir}/ruby/%{rubyxver} -%dir %{_libdir}/ruby/%{rubyxver}/cgi -%dir %{_libdir}/ruby/%{rubyxver}/net -%dir %{_libdir}/ruby/%{rubyxver}/shell -%dir %{_libdir}/ruby/%{rubyxver}/uri +%dir %{_prefix}/lib/ruby/%{rubyxver} +%dir %{_prefix}/lib/ruby/%{rubyxver}/cgi +%dir %{_prefix}/lib/ruby/%{rubyxver}/net +%dir %{_prefix}/lib/ruby/%{rubyxver}/shell +%dir %{_prefix}/lib/ruby/%{rubyxver}/uri %dir %{sitedir} %dir %{sitedir}/%{rubyxver} +%dir %{sitedir2} +%dir %{sitedir2}/%{rubyxver} %files tcltk -f ruby-tcltk.files %defattr(-, root, root) @@ -401,9 +414,9 @@ rm -rf tmp-ruby-docs %files irb -f irb.files %defattr(-, root, root) %doc tmp-ruby-docs/irb/* -%dir %{_libdir}/ruby/%{rubyxver}/irb -%dir %{_libdir}/ruby/%{rubyxver}/irb/lc -%dir %{_libdir}/ruby/%{rubyxver}/irb/lc/ja +%dir %{_prefix}/lib/ruby/%{rubyxver}/irb +%dir %{_prefix}/lib/ruby/%{rubyxver}/irb/lc +%dir %{_prefix}/lib/ruby/%{rubyxver}/irb/lc/ja %files ri -f ri.files %defattr(-, root, root) @@ -420,6 +433,12 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Wed Apr 19 2006 Akira TAGOH +- ruby-rubyprefix.patch: moved all arch-independent modules to /usr/lib/ruby + and keep arch-dependent modules in /usr/lib64/ruby for 64bit arch. + so 'rubylibdir', 'sitelibdir' and 'sitedir' on Config::CONFIG points to + /usr/lib/ruby now. (#184199) + * Mon Apr 17 2006 Akira TAGOH - 1.8.4-4 - correct sitelibdir. (#184198) From ea33ea129da1f78d836e33d405bc812e320be69f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 20 Apr 2006 04:35:04 +0000 Subject: [PATCH 059/529] - ruby-deprecated-search-path.patch: added the deprecated installation paths to the search path for the backward compatibility. - added a Provides: ruby(abi) to ruby-libs. --- ruby-deprecated-search-path.patch | 45 +++++++++++++++++++++++++++++++ ruby.spec | 14 +++++++--- 2 files changed, 56 insertions(+), 3 deletions(-) create mode 100644 ruby-deprecated-search-path.patch diff --git a/ruby-deprecated-search-path.patch b/ruby-deprecated-search-path.patch new file mode 100644 index 0000000..ab4d919 --- /dev/null +++ b/ruby-deprecated-search-path.patch @@ -0,0 +1,45 @@ +ゃ若祉<ゃruby-1.8.4.orig/.ruby.c.swpruby-1.8.4/.ruby.c.swp障 +diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in +--- ruby-1.8.4.orig/configure.in 2006-04-20 12:53:38.000000000 +0900 ++++ ruby-1.8.4/configure.in 2006-04-20 13:06:07.000000000 +0900 +@@ -1472,10 +1472,14 @@ + esac + RUBY_SITE_LIB_PATH3="${RUBY_SITE_LIB_PATH2}/${MAJOR}.${MINOR}" + RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}" ++RUBY_DEPRECATED_SITE_LIB_PATH="${SITE_DIR2}/${MAJOR}.${MINOR}" + + AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") + AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") + AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}") ++AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_LIB, "${RUBY_LIB_PATH2}") ++AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_SITE_LIB, "${SITE_DIR2}") ++AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_SITE_LIB2, "${RUBY_DEPRECATED_SITE_LIB_PATH}") + + AC_SUBST(arch)dnl + AC_SUBST(sitearch)dnl +diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c +--- ruby-1.8.4.orig/ruby.c 2005-12-12 09:36:52.000000000 +0900 ++++ ruby-1.8.4/ruby.c 2006-04-20 12:59:50.000000000 +0900 +@@ -292,13 +292,22 @@ + #endif + + ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB2)); ++#ifdef RUBY_DEPRECATED_SITE_LIB ++ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB2)); ++#endif + #ifdef RUBY_SITE_THIN_ARCHLIB + ruby_incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB)); + #endif + ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); + ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); ++#ifdef RUBY_DEPRECATED_SITE_LIB ++ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB)); ++#endif + + ruby_incpush(RUBY_RELATIVE(RUBY_LIB)); ++#ifdef RUBY_DEPRECATED_LIB ++ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_LIB)); ++#endif + #ifdef RUBY_THIN_ARCHLIB + ruby_incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB)); + #endif diff --git a/ruby.spec b/ruby.spec index 67db8a5..42796db 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.4 -Release: 4.fc6.1 +Release: 4.fc6.2 License: Distributable URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -25,8 +25,9 @@ Source10: ruby-mode-init.el Patch1: ruby-1.8.2-deadcode.patch Patch2: ruby-1.8.4-no-eaccess.patch Patch3: ruby-rubyprefix.patch -Patch4: ruby-multilib.patch -Patch5: ruby-tcltk-multilib.patch +Patch4: ruby-deprecated-search-path.patch +Patch5: ruby-multilib.patch +Patch6: ruby-tcltk-multilib.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -42,6 +43,7 @@ straight-forward, and extensible. %package libs Summary: Libraries necessary to run Ruby. Group: Development/Libraries +Provides: ruby(abi) = %{rubyxver} Provides: libruby Obsoletes: libruby @@ -139,6 +141,7 @@ pushd %{name}-%{version} %ifarch ppc64 s390x sparc64 x86_64 %patch4 -p1 %patch5 -p1 +%patch6 -p1 %endif popd @@ -433,6 +436,11 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog +* Thu Apr 20 2006 Akira TAGOH +- ruby-deprecated-search-path.patch: added the deprecated installation paths + to the search path for the backward compatibility. +- added a Provides: ruby(abi) to ruby-libs. + * Wed Apr 19 2006 Akira TAGOH - ruby-rubyprefix.patch: moved all arch-independent modules to /usr/lib/ruby and keep arch-dependent modules in /usr/lib64/ruby for 64bit arch. From 63eb84af23740e7a77ef1c430d44465cbbfbf04d Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 20 Apr 2006 09:52:09 +0000 Subject: [PATCH 060/529] - ruby-1.8.4-64bit-pack.patch: backport patch to fix unpack(l) not working on 64bit arch and integer overflow on template w. (#189350) - updated License tag to be more comfortable, and with a pointer to get more details, like Python package does. (#179933) --- ruby-1.8.4-64bit-pack.patch | 26 ++++++++++++++++++++++++++ ruby.spec | 8 +++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.4-64bit-pack.patch diff --git a/ruby-1.8.4-64bit-pack.patch b/ruby-1.8.4-64bit-pack.patch new file mode 100644 index 0000000..a0ccbee --- /dev/null +++ b/ruby-1.8.4-64bit-pack.patch @@ -0,0 +1,26 @@ +diff -ruN ruby-1.8.4.orig/pack.c ruby-1.8.4/pack.c +--- ruby-1.8.4.orig/pack.c 2005-10-13 23:30:49.000000000 +0900 ++++ ruby-1.8.4/pack.c 2006-04-20 13:50:25.000000000 +0900 +@@ -347,11 +347,11 @@ + return 0; /* not reached */ + } + +-#if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32 ++#if SIZEOF_LONG == SIZE32 + # define EXTEND32(x) + #else + /* invariant in modulo 1<<31 */ +-# define EXTEND32(x) do {if (!natint) {(x) = (I32)(((1<<31)-1-(x))^~(~0<<31));}} while(0) ++# define EXTEND32(x) do { if (!natint) {(x) = (((1L<<31)-1-(x))^~(~0L<<31));}} while(0) + #endif + #if SIZEOF_SHORT == SIZE16 + # define EXTEND16(x) +@@ -1951,7 +1951,7 @@ + case 'w': + { + unsigned long ul = 0; +- unsigned long ulmask = 0xfeL << ((sizeof(unsigned long) - 1) * 8); ++ unsigned long ulmask = 0xfeUL << ((sizeof(unsigned long) - 1UL) * 8UL); + + while (len > 0 && s < send) { + ul <<= 7; diff --git a/ruby.spec b/ruby.spec index 42796db..aa577e0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -6,7 +6,7 @@ Name: ruby Version: 1.8.4 Release: 4.fc6.2 -License: Distributable +License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs @@ -28,6 +28,7 @@ Patch3: ruby-rubyprefix.patch Patch4: ruby-deprecated-search-path.patch Patch5: ruby-multilib.patch Patch6: ruby-tcltk-multilib.patch +Patch7: ruby-1.8.4-64bit-pack.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -142,6 +143,7 @@ pushd %{name}-%{version} %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %endif popd @@ -440,6 +442,10 @@ rm -rf tmp-ruby-docs - ruby-deprecated-search-path.patch: added the deprecated installation paths to the search path for the backward compatibility. - added a Provides: ruby(abi) to ruby-libs. +- ruby-1.8.4-64bit-pack.patch: backport patch to fix unpack("l") not working + on 64bit arch and integer overflow on template "w". (#189350) +- updated License tag to be more comfortable, and with a pointer to get more + details, like Python package does. (#179933) * Wed Apr 19 2006 Akira TAGOH - ruby-rubyprefix.patch: moved all arch-independent modules to /usr/lib/ruby From 007a8958e11a67e0b507e9f6b56d3f0a19a5344d Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 27 Apr 2006 06:27:40 +0000 Subject: [PATCH 061/529] *** empty log message *** --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index aa577e0..31f5c84 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.4 -Release: 4.fc6.2 +Release: 5.fc6 License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -438,7 +438,7 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog -* Thu Apr 20 2006 Akira TAGOH +* Thu Apr 27 2006 Akira TAGOH - 1.8.4-5 - ruby-deprecated-search-path.patch: added the deprecated installation paths to the search path for the backward compatibility. - added a Provides: ruby(abi) to ruby-libs. From 3b8c5a210bdf2faceee914e4fd29574837d9c859 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 27 Apr 2006 07:09:31 +0000 Subject: [PATCH 062/529] updated --- ruby.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index 31f5c84..07bbdfc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -289,6 +289,7 @@ rmdir $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os} DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb +install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ # installing ruby-mode cd %{name}-%{version} @@ -442,16 +443,16 @@ rm -rf tmp-ruby-docs - ruby-deprecated-search-path.patch: added the deprecated installation paths to the search path for the backward compatibility. - added a Provides: ruby(abi) to ruby-libs. -- ruby-1.8.4-64bit-pack.patch: backport patch to fix unpack("l") not working - on 64bit arch and integer overflow on template "w". (#189350) +- ruby-1.8.4-64bit-pack.patch: backport patch from upstream to fix unpack("l") + not working on 64bit arch and integer overflow on template "w". (#189350) - updated License tag to be more comfortable, and with a pointer to get more details, like Python package does. (#179933) * Wed Apr 19 2006 Akira TAGOH -- ruby-rubyprefix.patch: moved all arch-independent modules to /usr/lib/ruby - and keep arch-dependent modules in /usr/lib64/ruby for 64bit arch. - so 'rubylibdir', 'sitelibdir' and 'sitedir' on Config::CONFIG points to - /usr/lib/ruby now. (#184199) +- ruby-rubyprefix.patch: moved all arch-independent modules under /usr/lib/ruby + and keep arch-dependent modules under /usr/lib64/ruby for 64bit archs. + so 'rubylibdir', 'sitelibdir' and 'sitedir' in Config::CONFIG points to + the kind of /usr/lib/ruby now. (#184199) * Mon Apr 17 2006 Akira TAGOH - 1.8.4-4 - correct sitelibdir. (#184198) From 0ccc8e24dfdfd4d30c68b8820a084f86aad85a31 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 27 Apr 2006 08:42:21 +0000 Subject: [PATCH 063/529] build with --enable-pthread --- ruby.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 07bbdfc..a240456 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.4 -Release: 5.fc6 +Release: 6.fc6 License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -166,6 +166,7 @@ export CFLAGS --with-default-kcode=none \ --enable-shared \ --enable-ipv6 \ + --enable-pthread \ --with-lookup-order-hack=INET \ --disable-rpath \ --with-ruby-prefix=%{_prefix}/lib @@ -439,7 +440,7 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog -* Thu Apr 27 2006 Akira TAGOH - 1.8.4-5 +* Thu Apr 27 2006 Akira TAGOH - 1.8.4-6 - ruby-deprecated-search-path.patch: added the deprecated installation paths to the search path for the backward compatibility. - added a Provides: ruby(abi) to ruby-libs. @@ -447,6 +448,7 @@ rm -rf tmp-ruby-docs not working on 64bit arch and integer overflow on template "w". (#189350) - updated License tag to be more comfortable, and with a pointer to get more details, like Python package does. (#179933) +- build with --enable-pthread to build Tcl/Tk module against thread enabled Tcl/Tk. * Wed Apr 19 2006 Akira TAGOH - ruby-rubyprefix.patch: moved all arch-independent modules under /usr/lib/ruby From 1e31b28646f3f1de58d16723d58d361274afd32b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 17 May 2006 09:47:31 +0000 Subject: [PATCH 064/529] - clean up. --- ruby.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index a240456..68713b6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -156,9 +156,6 @@ autoconf rb_cv_func_strtod=no export rb_cv_func_strtod -%if ia64 -export RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's/-O[1-9]/-O0/g'` -%endif CFLAGS="$RPM_OPT_FLAGS -Wall" export CFLAGS %configure \ @@ -166,11 +163,13 @@ export CFLAGS --with-default-kcode=none \ --enable-shared \ --enable-ipv6 \ - --enable-pthread \ + --disable-pthread \ --with-lookup-order-hack=INET \ --disable-rpath \ --with-ruby-prefix=%{_prefix}/lib +cp Makefile Makefile.orig +sed -e 's/^EXTMK_ARGS[[:space:]].*=\(.*\) --$/EXTMK_ARGS=\1 --disable-tcl-thread --/' Makefile.orig > Makefile make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} %ifarch ia64 # Miscompilation? Buggy code? @@ -440,7 +439,7 @@ rm -rf tmp-ruby-docs %dir %{_datadir}/emacs/site-lisp/ruby-mode %changelog -* Thu Apr 27 2006 Akira TAGOH - 1.8.4-6 +* Wed May 17 2006 Akira TAGOH - 1.8.4-6 - ruby-deprecated-search-path.patch: added the deprecated installation paths to the search path for the backward compatibility. - added a Provides: ruby(abi) to ruby-libs. @@ -448,7 +447,7 @@ rm -rf tmp-ruby-docs not working on 64bit arch and integer overflow on template "w". (#189350) - updated License tag to be more comfortable, and with a pointer to get more details, like Python package does. (#179933) -- build with --enable-pthread to build Tcl/Tk module against thread enabled Tcl/Tk. +- clean up. * Wed Apr 19 2006 Akira TAGOH - ruby-rubyprefix.patch: moved all arch-independent modules under /usr/lib/ruby From 77ae3842509240fbcdf4aa14d4b98468956d0fc5 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 17 May 2006 10:41:56 +0000 Subject: [PATCH 065/529] *** empty log message *** --- ruby.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index 68713b6..5474ece 100644 --- a/ruby.spec +++ b/ruby.spec @@ -279,12 +279,6 @@ _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir2}/%{rubyxver} %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} -%ifarch ppc64 s390x sparc64 x86_64 -# move the arch-specific files to proper location -mv $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os}/* $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -rmdir $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os} -%endif - # generate ri doc DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} From f8e4dcc1261d3de6fa74b18306c9d010de812e43 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 7 Jun 2006 07:32:39 +0000 Subject: [PATCH 066/529] - exclude ppc64 to make ruby-mode package. right now emacs.ppc64 isn't provided and buildsys became much stricker. - ruby-deprecated-sitelib-search-path.patch: applied to add more search path for backward compatiblity. - added byacc to BuildReq. (#194161) --- ruby-deprecated-search-path.patch | 12 +++++-- ruby-deprecated-sitelib-search-path.patch | 39 +++++++++++++++++++++++ ruby.spec | 39 +++++++++++++++++------ 3 files changed, 78 insertions(+), 12 deletions(-) create mode 100644 ruby-deprecated-sitelib-search-path.patch diff --git a/ruby-deprecated-search-path.patch b/ruby-deprecated-search-path.patch index ab4d919..f89da8c 100644 --- a/ruby-deprecated-search-path.patch +++ b/ruby-deprecated-search-path.patch @@ -1,8 +1,7 @@ -ゃ若祉<ゃruby-1.8.4.orig/.ruby.c.swpruby-1.8.4/.ruby.c.swp障 diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in --- ruby-1.8.4.orig/configure.in 2006-04-20 12:53:38.000000000 +0900 +++ ruby-1.8.4/configure.in 2006-04-20 13:06:07.000000000 +0900 -@@ -1472,10 +1472,14 @@ +@@ -1472,12 +1472,16 @@ esac RUBY_SITE_LIB_PATH3="${RUBY_SITE_LIB_PATH2}/${MAJOR}.${MINOR}" RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}" @@ -11,6 +10,8 @@ diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}") + AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_LIB, "${libdir}/site_ruby") + AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_LIB2, "${libdir}/site_ruby/${MAJOR}.${MINOR}") +AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_LIB, "${RUBY_LIB_PATH2}") +AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_SITE_LIB, "${SITE_DIR2}") +AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_SITE_LIB2, "${RUBY_DEPRECATED_SITE_LIB_PATH}") @@ -20,7 +21,7 @@ diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c --- ruby-1.8.4.orig/ruby.c 2005-12-12 09:36:52.000000000 +0900 +++ ruby-1.8.4/ruby.c 2006-04-20 12:59:50.000000000 +0900 -@@ -292,13 +292,22 @@ +@@ -292,11 +292,17 @@ #endif ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB2)); @@ -35,6 +36,11 @@ diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c +#ifdef RUBY_DEPRECATED_SITE_LIB + ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB)); +#endif + #ifdef RUBY_DEPRECATED_OLD_SITE_ARCHLIB + ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_ARCHLIB)); + #endif +@@ -308,6 +314,9 @@ + #endif ruby_incpush(RUBY_RELATIVE(RUBY_LIB)); +#ifdef RUBY_DEPRECATED_LIB diff --git a/ruby-deprecated-sitelib-search-path.patch b/ruby-deprecated-sitelib-search-path.patch new file mode 100644 index 0000000..32b46de --- /dev/null +++ b/ruby-deprecated-sitelib-search-path.patch @@ -0,0 +1,39 @@ +diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in +--- ruby-1.8.4.orig/configure.in 2006-06-07 13:58:03.000000000 +0900 ++++ ruby-1.8.4/configure.in 2006-06-07 15:54:36.000000000 +0900 +@@ -1476,6 +1476,8 @@ + AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") + AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") + AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}") ++AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_LIB, "${libdir}/site_ruby") ++AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_LIB2, "${libdir}/site_ruby/${MAJOR}.${MINOR}") + + AC_SUBST(arch)dnl + AC_SUBST(sitearch)dnl +@@ -1506,6 +1508,7 @@ + + AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH2}/${arch}") + AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH3}/${sitearch}") ++AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_ARCHLIB, "${libdir}/site_ruby/${MAJOR}.${MINOR}/${sitearch}") + + AC_ARG_WITH(search-path, + [ --with-search-path=DIR specify the additional search path], +diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c +--- ruby-1.8.4.orig/ruby.c 2005-12-12 09:36:52.000000000 +0900 ++++ ruby-1.8.4/ruby.c 2006-06-07 15:56:14.000000000 +0900 +@@ -297,6 +297,15 @@ + #endif + ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); + ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); ++#ifdef RUBY_DEPRECATED_OLD_SITE_ARCHLIB ++ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_ARCHLIB)); ++#endif ++#ifdef RUBY_DEPRECATED_OLD_SITE_LIB ++ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB)); ++#endif ++#ifdef RUBY_DEPRECATED_OLD_SITE_LIB2 ++ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); ++#endif + + ruby_incpush(RUBY_RELATIVE(RUBY_LIB)); + #ifdef RUBY_THIN_ARCHLIB diff --git a/ruby.spec b/ruby.spec index 5474ece..a27c672 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,11 +5,11 @@ Name: ruby Version: 1.8.4 -Release: 6.fc6 +Release: 7.fc6 License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs byacc Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz @@ -25,10 +25,11 @@ Source10: ruby-mode-init.el Patch1: ruby-1.8.2-deadcode.patch Patch2: ruby-1.8.4-no-eaccess.patch Patch3: ruby-rubyprefix.patch -Patch4: ruby-deprecated-search-path.patch -Patch5: ruby-multilib.patch -Patch6: ruby-tcltk-multilib.patch -Patch7: ruby-1.8.4-64bit-pack.patch +Patch4: ruby-deprecated-sitelib-search-path.patch +Patch5: ruby-deprecated-search-path.patch +Patch6: ruby-multilib.patch +Patch7: ruby-tcltk-multilib.patch +Patch8: ruby-1.8.4-64bit-pack.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -105,6 +106,7 @@ Group: Documentation Manuals and FAQs for the object-oriented scripting language Ruby. +%ifnarch ppc64 %package mode Summary: Emacs Lisp ruby-mode for the scripting language Ruby Group: Applications/Editors @@ -112,6 +114,7 @@ Requires: emacs-common %description mode Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. +%endif %package ri @@ -139,11 +142,12 @@ pushd %{name}-%{version} %patch1 -p1 %patch2 -p1 %patch3 -p1 -%ifarch ppc64 s390x sparc64 x86_64 %patch4 -p1 +%ifarch ppc64 s390x sparc64 x86_64 %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 %endif popd @@ -185,10 +189,12 @@ popd %install [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT +%ifnarch ppc64 %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d -%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/ruby-mode -%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/site-start.d +#%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/ruby-mode +#%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/site-start.d +%endif # installing documents and exapmles... mkdir tmp-ruby-docs @@ -285,6 +291,7 @@ DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROO # XXX: installing irb install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ +%ifnarch ppc64 # installing ruby-mode cd %{name}-%{version} cp misc/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode @@ -301,6 +308,7 @@ install -m 644 %{SOURCE10} \ $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d cd .. +%endif # listing all files in ruby-all.files (find $RPM_BUILD_ROOT -type f -o -type l) | @@ -337,9 +345,13 @@ cp /dev/null ruby-libs.files fgrep -h '%{_prefix}/lib' ruby-devel.files ruby-tcltk.files irb.files ri.files rdoc.files) | egrep -v "elc?$" | \ sort | uniq -u > ruby-libs.files +%ifnarch ppc64 # for ruby-mode cp /dev/null ruby-mode.files fgrep '.el' ruby-all.files >> ruby-mode.files +%else +touch ruby-mode.files +%endif # for ruby.rpm sort ruby-all.files \ @@ -427,12 +439,21 @@ rm -rf tmp-ruby-docs %doc tmp-ruby-docs/ruby-docs/* %doc tmp-ruby-docs/ruby-libs/* +%ifnarch ppc64 %files mode -f ruby-mode.files %defattr(-, root, root) %doc %{name}-%{version}/misc/README %dir %{_datadir}/emacs/site-lisp/ruby-mode +%endif %changelog +* Wed Jun 7 2006 Akira TAGOH - 1.8.4-7 +- exclude ppc64 to make ruby-mode package. right now emacs.ppc64 isn't provided + and buildsys became much stricker. +- ruby-deprecated-sitelib-search-path.patch: applied to add more search path + for backward compatiblity. +- added byacc to BuildReq. (#194161) + * Wed May 17 2006 Akira TAGOH - 1.8.4-6 - ruby-deprecated-search-path.patch: added the deprecated installation paths to the search path for the backward compatibility. From ddb078ee023c017a251ff4f540576c3c7e2afc39 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 7 Jun 2006 07:47:23 +0000 Subject: [PATCH 067/529] *** empty log message *** --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index a27c672..3cab42d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -9,7 +9,10 @@ Release: 7.fc6 License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel emacs byacc +BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel byacc +%ifnarch ppc64 +BuildRequires: emacs +%endif Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz From 7ef51c14daba4fce089efaa119c989ac22b431c0 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 8 Jun 2006 07:53:37 +0000 Subject: [PATCH 068/529] - ruby-deprecated-sitelib-search-path.patch: correct the order of search path. --- ruby-deprecated-search-path.patch | 4 ++-- ruby-deprecated-sitelib-search-path.patch | 6 +++--- ruby.spec | 5 ++++- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ruby-deprecated-search-path.patch b/ruby-deprecated-search-path.patch index f89da8c..3b937b2 100644 --- a/ruby-deprecated-search-path.patch +++ b/ruby-deprecated-search-path.patch @@ -36,8 +36,8 @@ diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c +#ifdef RUBY_DEPRECATED_SITE_LIB + ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB)); +#endif - #ifdef RUBY_DEPRECATED_OLD_SITE_ARCHLIB - ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_ARCHLIB)); + #ifdef RUBY_DEPRECATED_OLD_SITE_LIB2 + ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); #endif @@ -308,6 +314,9 @@ #endif diff --git a/ruby-deprecated-sitelib-search-path.patch b/ruby-deprecated-sitelib-search-path.patch index 32b46de..ce5f2ab 100644 --- a/ruby-deprecated-sitelib-search-path.patch +++ b/ruby-deprecated-sitelib-search-path.patch @@ -25,14 +25,14 @@ diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c #endif ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); ++#ifdef RUBY_DEPRECATED_OLD_SITE_LIB2 ++ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); ++#endif +#ifdef RUBY_DEPRECATED_OLD_SITE_ARCHLIB + ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_ARCHLIB)); +#endif +#ifdef RUBY_DEPRECATED_OLD_SITE_LIB + ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB)); -+#endif -+#ifdef RUBY_DEPRECATED_OLD_SITE_LIB2 -+ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); +#endif ruby_incpush(RUBY_RELATIVE(RUBY_LIB)); diff --git a/ruby.spec b/ruby.spec index 3cab42d..e3ab266 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.4 -Release: 7.fc6 +Release: 8.fc6 License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -450,6 +450,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Thu Jun 8 2006 Akira TAGOH - 1.8.4-8 +- ruby-deprecated-sitelib-search-path.patch: correct the order of search path. + * Wed Jun 7 2006 Akira TAGOH - 1.8.4-7 - exclude ppc64 to make ruby-mode package. right now emacs.ppc64 isn't provided and buildsys became much stricker. From 34e0f2caaccdbbfaaf49c3f5026c6c23f5117df7 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 8 Jun 2006 08:02:17 +0000 Subject: [PATCH 069/529] fixed a typo. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e3ab266..c2e83f4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -455,7 +455,7 @@ rm -rf tmp-ruby-docs * Wed Jun 7 2006 Akira TAGOH - 1.8.4-7 - exclude ppc64 to make ruby-mode package. right now emacs.ppc64 isn't provided - and buildsys became much stricker. + and buildsys became much stricter. - ruby-deprecated-sitelib-search-path.patch: applied to add more search path for backward compatiblity. - added byacc to BuildReq. (#194161) From 289c2c88cb3ef30892eddccf4f928040264e5a47 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 19 Jun 2006 07:19:06 +0000 Subject: [PATCH 070/529] - fixed the wrong file list again. moved tcltk library into ruby-tcltk. (#194537) --- ruby.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index c2e83f4..71621b7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.4 -Release: 8.fc6 +Release: 9.fc6 License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -321,11 +321,7 @@ egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files # for ruby-tcltk.rpm cp /dev/null ruby-tcltk.files -for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/.ext/ -type f -name '*.so'` -do - egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : -done -for f in `find %{name}-%{version}/ext/tcltklib/lib -type f; find %{name}-%{version}/.ext -type f -name '*.so'` +for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/ext/tk -type f -name '*.so'` do egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : done @@ -450,6 +446,10 @@ rm -rf tmp-ruby-docs %endif %changelog +* Mon Jun 19 2006 Akira TAGOH - 1.8.4-9 +- fixed the wrong file list again. moved tcltk library into ruby-tcltk. + (#194537) + * Thu Jun 8 2006 Akira TAGOH - 1.8.4-8 - ruby-deprecated-sitelib-search-path.patch: correct the order of search path. From 45072799c026dd2631a74122229874b59b555167 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 19 Jun 2006 08:57:21 +0000 Subject: [PATCH 071/529] correct bug# --- ruby.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 71621b7..2409805 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.4 -Release: 9.fc6 +Release: 10.fc6 License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -446,9 +446,9 @@ rm -rf tmp-ruby-docs %endif %changelog -* Mon Jun 19 2006 Akira TAGOH - 1.8.4-9 +* Mon Jun 19 2006 Akira TAGOH - 1.8.4-10 - fixed the wrong file list again. moved tcltk library into ruby-tcltk. - (#194537) + (#195872) * Thu Jun 8 2006 Akira TAGOH - 1.8.4-8 - ruby-deprecated-sitelib-search-path.patch: correct the order of search path. From f388649560ac65a2425c1136bdcf097224027754 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 12 Jul 2006 08:02:58 +0000 Subject: [PATCH 072/529] bumped for rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 2409805..8387a4c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.4 -Release: 10.fc6 +Release: 10.fc6.1 License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-root @@ -446,6 +446,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Wed Jul 12 2006 Jesse Keating - 1.8.4-10.fc6.1 +- rebuild + * Mon Jun 19 2006 Akira TAGOH - 1.8.4-10 - fixed the wrong file list again. moved tcltk library into ruby-tcltk. (#195872) From f0df5e45d506204e2f550b4825b122429edb1261 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 20 Jul 2006 11:06:45 +0000 Subject: [PATCH 073/529] - security fixes. - ruby-1.8.4-fix-insecure-dir-operation.patch: - ruby-1.8.4-fix-insecure-regexp-modification.patch: fixed the insecure operations in the certain safe-level restrictions. (#199538) - ruby-1.8.4-fix-alias-safe-level.patch: fixed to not bypass the certain safe-level restrictions. (#199543) --- ruby-1.8.4-fix-alias-safe-level.patch | 36 ++++++++++ ruby-1.8.4-fix-insecure-dir-operation.patch | 31 +++++++++ ...8.4-fix-insecure-regexp-modification.patch | 66 +++++++++++++++++++ ruby-fix-autoconf-magic-code.patch | 11 ++++ ruby.spec | 42 ++++++++---- 5 files changed, 173 insertions(+), 13 deletions(-) create mode 100644 ruby-1.8.4-fix-alias-safe-level.patch create mode 100644 ruby-1.8.4-fix-insecure-dir-operation.patch create mode 100644 ruby-1.8.4-fix-insecure-regexp-modification.patch create mode 100644 ruby-fix-autoconf-magic-code.patch diff --git a/ruby-1.8.4-fix-alias-safe-level.patch b/ruby-1.8.4-fix-alias-safe-level.patch new file mode 100644 index 0000000..e95d784 --- /dev/null +++ b/ruby-1.8.4-fix-alias-safe-level.patch @@ -0,0 +1,36 @@ +diff -ruN ruby-1.8.4.orig/eval.c ruby-1.8.4/eval.c +--- ruby-1.8.4.orig/eval.c 2005-12-20 22:41:47.000000000 +0900 ++++ ruby-1.8.4/eval.c 2006-07-20 18:33:50.000000000 +0900 +@@ -2097,7 +2097,8 @@ + } + } + st_insert(RCLASS(klass)->m_tbl, name, +- (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig->nd_noex)); ++ (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), ++ NOEX_WITH_SAFE(orig->nd_noex))); + if (singleton) { + rb_funcall(singleton, singleton_added, 1, ID2SYM(name)); + } +@@ -5638,6 +5639,11 @@ + TMP_PROTECT; + volatile int safe = -1; + ++ if (NOEX_SAFE(flags) > ruby_safe_level && ++ !(flags&NOEX_TAINTED) && ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) { ++ rb_raise(rb_eSecurityError, "calling insecure method: %s", ++ rb_id2name(id)); ++ } + switch (ruby_iter->iter) { + case ITER_PRE: + case ITER_PAS: +@@ -5742,10 +5748,6 @@ + b2 = body = body->nd_next; + + if (NOEX_SAFE(flags) > ruby_safe_level) { +- if (!(flags&NOEX_TAINTED) && ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) { +- rb_raise(rb_eSecurityError, "calling insecure method: %s", +- rb_id2name(id)); +- } + safe = ruby_safe_level; + ruby_safe_level = NOEX_SAFE(flags); + } diff --git a/ruby-1.8.4-fix-insecure-dir-operation.patch b/ruby-1.8.4-fix-insecure-dir-operation.patch new file mode 100644 index 0000000..492aff4 --- /dev/null +++ b/ruby-1.8.4-fix-insecure-dir-operation.patch @@ -0,0 +1,31 @@ +diff -ruN ruby-1.8.4.orig/dir.c ruby-1.8.4/dir.c +--- ruby-1.8.4.orig/dir.c 2005-09-14 22:40:58.000000000 +0900 ++++ ruby-1.8.4/dir.c 2006-07-19 22:14:05.000000000 +0900 +@@ -325,7 +325,17 @@ + rb_raise(rb_eIOError, "closed directory"); + } + ++static void ++dir_check(dir) ++ VALUE dir; ++{ ++ if (!OBJ_TAINTED(dir) && rb_safe_level() >= 4) ++ rb_raise(rb_eSecurityError, "Insecure: operation on untainted Dir"); ++ rb_check_frozen(dir); ++} ++ + #define GetDIR(obj, dirp) do {\ ++ dir_check(dir);\ + Data_Get_Struct(obj, struct dir_data, dirp);\ + if (dirp->dir == NULL) dir_closed();\ + } while (0) +@@ -536,6 +546,9 @@ + { + struct dir_data *dirp; + ++ if (rb_safe_level() >= 4 && !OBJ_TAINTED(dir)) { ++ rb_raise(rb_eSecurityError, "Insecure: can't close"); ++ } + GetDIR(dir, dirp); + closedir(dirp->dir); + dirp->dir = NULL; diff --git a/ruby-1.8.4-fix-insecure-regexp-modification.patch b/ruby-1.8.4-fix-insecure-regexp-modification.patch new file mode 100644 index 0000000..26c24e3 --- /dev/null +++ b/ruby-1.8.4-fix-insecure-regexp-modification.patch @@ -0,0 +1,66 @@ +diff -ruN ruby-1.8.4.orig/re.c ruby-1.8.4/re.c +--- ruby-1.8.4.orig/re.c 2005-12-13 12:27:51.000000000 +0900 ++++ ruby-1.8.4/re.c 2006-07-19 18:07:59.000000000 +0900 +@@ -70,10 +70,11 @@ + #endif + + int +-rb_memcicmp(p1, p2, len) +- char *p1, *p2; ++rb_memcicmp(x, y, len) ++ const void *x, *y; + long len; + { ++ const unsigned char *p1 = x, *p2 = y; + int tmp; + + while (len--) { +@@ -85,7 +86,7 @@ + + int + rb_memcmp(p1, p2, len) +- char *p1, *p2; ++ const void *p1, *p2; + long len; + { + if (!ruby_ignorecase) { +@@ -96,11 +97,11 @@ + + long + rb_memsearch(x0, m, y0, n) +- char *x0, *y0; ++ const void *x0, *y0; + long m, n; + { +- unsigned char *x = (unsigned char *)x0, *y = (unsigned char *)y0; +- unsigned char *s, *e; ++ const unsigned char *x = (unsigned char *)x0, *y = (unsigned char *)y0; ++ const unsigned char *s, *e; + long i; + int d; + unsigned long hx, hy; +@@ -1332,6 +1333,8 @@ + { + struct RRegexp *re = RREGEXP(obj); + ++ if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4) ++ rb_raise(rb_eSecurityError, "Insecure: can't modify regexp"); + if (re->ptr) re_free_pattern(re->ptr); + if (re->str) free(re->str); + re->ptr = 0; +diff -ruN ruby-1.8.4.orig/intern.h ruby-1.8.4/intern.h +--- ruby-1.8.4.orig/intern.h 2006-07-19 18:13:49.000000000 +0900 ++++ ruby-1.8.4/intern.h 2006-07-19 18:20:34.000000000 +0900 +@@ -353,9 +353,9 @@ + VALUE rb_range_beg_len _((VALUE, long*, long*, long, int)); + VALUE rb_length_by_each _((VALUE)); + /* re.c */ +-int rb_memcmp _((char*,char*,long)); +-int rb_memcicmp _((char*,char*,long)); +-long rb_memsearch _((char*,long,char*,long)); ++int rb_memcmp _((const void*,const void*,long)); ++int rb_memcicmp _((const void*,const void*,long)); ++long rb_memsearch _((const void*,long,const void*,long)); + VALUE rb_reg_nth_defined _((int, VALUE)); + VALUE rb_reg_nth_match _((int, VALUE)); + VALUE rb_reg_last_match _((VALUE)); diff --git a/ruby-fix-autoconf-magic-code.patch b/ruby-fix-autoconf-magic-code.patch new file mode 100644 index 0000000..58ac75f --- /dev/null +++ b/ruby-fix-autoconf-magic-code.patch @@ -0,0 +1,11 @@ +diff -ruN ruby-1.8.4.orig/mkconfig.rb ruby-1.8.4/mkconfig.rb +--- ruby-1.8.4.orig/mkconfig.rb 2006-07-19 20:39:48.000000000 +0900 ++++ ruby-1.8.4/mkconfig.rb 2006-07-19 20:40:12.000000000 +0900 +@@ -37,6 +37,7 @@ + has_version = false + File.foreach "config.status" do |line| + next if /^#/ =~ line ++ line.gsub!(/\|#_!!_#\|/, '') + if /^s[%,]@program_transform_name@[%,]s,(.*)/ =~ line + next if $install_name + ptn = $1.sub(/\$\$/, '$').split(/,/) #' diff --git a/ruby.spec b/ruby.spec index 8387a4c..4f6bfb5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,10 +5,10 @@ Name: ruby Version: 1.8.4 -Release: 10.fc6.1 +Release: 11%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ -BuildRoot: %{_tmppath}/%{name}-%{version}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel byacc %ifnarch ppc64 BuildRequires: emacs @@ -27,12 +27,16 @@ Source10: ruby-mode-init.el Patch1: ruby-1.8.2-deadcode.patch Patch2: ruby-1.8.4-no-eaccess.patch -Patch3: ruby-rubyprefix.patch -Patch4: ruby-deprecated-sitelib-search-path.patch -Patch5: ruby-deprecated-search-path.patch -Patch6: ruby-multilib.patch -Patch7: ruby-tcltk-multilib.patch -Patch8: ruby-1.8.4-64bit-pack.patch +Patch3: ruby-1.8.4-64bit-pack.patch +Patch4: ruby-1.8.4-fix-insecure-dir-operation.patch +Patch5: ruby-1.8.4-fix-insecure-regexp-modification.patch +Patch6: ruby-1.8.4-fix-alias-safe-level.patch +Patch20: ruby-rubyprefix.patch +Patch21: ruby-deprecated-sitelib-search-path.patch +Patch22: ruby-deprecated-search-path.patch +Patch23: ruby-multilib.patch +Patch24: ruby-tcltk-multilib.patch +Patch25: ruby-fix-autoconf-magic-code.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -146,12 +150,16 @@ pushd %{name}-%{version} %patch2 -p1 %patch3 -p1 %patch4 -p1 -%ifarch ppc64 s390x sparc64 x86_64 %patch5 -p1 %patch6 -p1 -%patch7 -p1 -%patch8 -p1 +%patch20 -p1 +%patch21 -p1 +%ifarch ppc64 s390x sparc64 x86_64 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 %endif +%patch25 -p1 popd %build @@ -190,7 +198,7 @@ make test popd %install -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT +rm -rf $RPM_BUILD_ROOT %ifnarch ppc64 %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode @@ -367,7 +375,7 @@ cat <<__EOF__ >> ruby-libs.files __EOF__ %clean -[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT +rm -rf $RPM_BUILD_ROOT rm -f *.files rm -rf tmp-ruby-docs @@ -446,6 +454,14 @@ rm -rf tmp-ruby-docs %endif %changelog +* Thu Jul 20 2006 Akira TAGOH - 1.8.4-11 +- security fixes. + - ruby-1.8.4-fix-insecure-dir-operation.patch: + - ruby-1.8.4-fix-insecure-regexp-modification.patch: fixed the insecure + operations in the certain safe-level restrictions. (#199538) + - ruby-1.8.4-fix-alias-safe-level.patch: fixed to not bypass the certain + safe-level restrictions. (#199543) + * Wed Jul 12 2006 Jesse Keating - 1.8.4-10.fc6.1 - rebuild From ee34bfa2d4718f9052a3ebc8f1cf29d5e9e9c77b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 21 Jul 2006 11:15:22 +0000 Subject: [PATCH 074/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 4f6bfb5..b727b94 100644 --- a/ruby.spec +++ b/ruby.spec @@ -455,7 +455,7 @@ rm -rf tmp-ruby-docs %changelog * Thu Jul 20 2006 Akira TAGOH - 1.8.4-11 -- security fixes. +- security fixes [CVE-2006-3694] - ruby-1.8.4-fix-insecure-dir-operation.patch: - ruby-1.8.4-fix-insecure-regexp-modification.patch: fixed the insecure operations in the certain safe-level restrictions. (#199538) From 00982fe89218a21315354573ce0c68fc8cac3375 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 7 Aug 2006 09:29:13 +0000 Subject: [PATCH 075/529] - owns sitearchdir. (#201208) --- ruby.spec | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ruby.spec b/ruby.spec index b727b94..c07911b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.4 -Release: 11%{?dist} +Release: 12%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -416,10 +416,8 @@ rm -rf tmp-ruby-docs %dir %{_prefix}/lib/ruby/%{rubyxver}/net %dir %{_prefix}/lib/ruby/%{rubyxver}/shell %dir %{_prefix}/lib/ruby/%{rubyxver}/uri -%dir %{sitedir} -%dir %{sitedir}/%{rubyxver} -%dir %{sitedir2} -%dir %{sitedir2}/%{rubyxver} +%{sitedir} +%{sitedir2} %files tcltk -f ruby-tcltk.files %defattr(-, root, root) @@ -454,6 +452,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Mon Aug 7 2006 Akira TAGOH - 1.8.4-12 +- owns sitearchdir. (#201208) + * Thu Jul 20 2006 Akira TAGOH - 1.8.4-11 - security fixes [CVE-2006-3694] - ruby-1.8.4-fix-insecure-dir-operation.patch: From f3840b136acd3a35a7a92e0340a8b0406d0ef247 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Aug 2006 08:50:07 +0000 Subject: [PATCH 076/529] - New upstream release. - removed the unnecessary patches: - ruby-1.8.4-no-eaccess.patch - ruby-1.8.4-64bit-pack.patch - ruby-1.8.4-fix-insecure-dir-operation.patch - ruby-1.8.4-fix-insecure-regexp-modification.patch - ruby-1.8.4-fix-alias-safe-level.patch --- .cvsignore | 1 + ruby.spec | 37 +++++++++++++++++++------------------ sources | 2 +- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/.cvsignore b/.cvsignore index d6ac41a..715106e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -9,3 +9,4 @@ ruby-1.8.3.tar.gz ruby-1.8.4-preview1.tar.gz ruby-1.8.4-preview2.tar.gz ruby-1.8.4.tar.gz +ruby-1.8.5.tar.gz diff --git a/ruby.spec b/ruby.spec index c07911b..d5da35c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,8 +4,8 @@ %define sitedir2 %{_prefix}/lib/ruby/site_ruby Name: ruby -Version: 1.8.4 -Release: 12%{?dist} +Version: 1.8.5 +Release: 1%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -26,11 +26,6 @@ Source5: irb.1 Source10: ruby-mode-init.el Patch1: ruby-1.8.2-deadcode.patch -Patch2: ruby-1.8.4-no-eaccess.patch -Patch3: ruby-1.8.4-64bit-pack.patch -Patch4: ruby-1.8.4-fix-insecure-dir-operation.patch -Patch5: ruby-1.8.4-fix-insecure-regexp-modification.patch -Patch6: ruby-1.8.4-fix-alias-safe-level.patch Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch @@ -147,11 +142,6 @@ tar fxz %{SOURCE2} popd pushd %{name}-%{version} %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 %patch20 -p1 %patch21 -p1 %ifarch ppc64 s390x sparc64 x86_64 @@ -159,7 +149,7 @@ pushd %{name}-%{version} %patch23 -p1 %patch24 -p1 %endif -%patch25 -p1 +#%%patch25 -p1 popd %build @@ -174,17 +164,18 @@ export rb_cv_func_strtod CFLAGS="$RPM_OPT_FLAGS -Wall" export CFLAGS %configure \ + --datarootdir='$(DESTDIR)/%{_datadir}' \ --with-sitedir='%{sitedir}' \ --with-default-kcode=none \ --enable-shared \ --enable-ipv6 \ - --disable-pthread \ + --enable-pthread \ --with-lookup-order-hack=INET \ --disable-rpath \ --with-ruby-prefix=%{_prefix}/lib -cp Makefile Makefile.orig -sed -e 's/^EXTMK_ARGS[[:space:]].*=\(.*\) --$/EXTMK_ARGS=\1 --disable-tcl-thread --/' Makefile.orig > Makefile +#cp Makefile Makefile.orig +#sed -e 's/^EXTMK_ARGS[[:space:]].*=\(.*\) --$/EXTMK_ARGS=\1 --disable-tcl-thread --/' Makefile.orig > Makefile make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} %ifarch ia64 # Miscompilation? Buggy code? @@ -297,7 +288,8 @@ _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} # generate ri doc -DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} +make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} DESTDIR=$RPM_BUILD_ROOT install-doc +#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ @@ -329,7 +321,7 @@ egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files # for ruby-tcltk.rpm cp /dev/null ruby-tcltk.files -for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/ext/tk -type f -name '*.so'` +for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/.ext -type f -name '*.so'` do egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : done @@ -452,6 +444,15 @@ rm -rf tmp-ruby-docs %endif %changelog +* Mon Aug 28 2006 Akira TAGOH - 1.8.5-1 +- New upstream release. +- removed the unnecessary patches: + - ruby-1.8.4-no-eaccess.patch + - ruby-1.8.4-64bit-pack.patch + - ruby-1.8.4-fix-insecure-dir-operation.patch + - ruby-1.8.4-fix-insecure-regexp-modification.patch + - ruby-1.8.4-fix-alias-safe-level.patch + * Mon Aug 7 2006 Akira TAGOH - 1.8.4-12 - owns sitearchdir. (#201208) diff --git a/sources b/sources index cc60eef..53c52a9 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -bd8c2e593e1fa4b01fd98eaf016329bb ruby-1.8.4.tar.gz +3fbb02294a8ca33d4684055adba5ed6f ruby-1.8.5.tar.gz From fdc551e3d94b23757baceeb0a9e6632525757939 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Aug 2006 08:51:29 +0000 Subject: [PATCH 077/529] *** empty log message *** --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index d5da35c..6782214 100644 --- a/ruby.spec +++ b/ruby.spec @@ -452,6 +452,7 @@ rm -rf tmp-ruby-docs - ruby-1.8.4-fix-insecure-dir-operation.patch - ruby-1.8.4-fix-insecure-regexp-modification.patch - ruby-1.8.4-fix-alias-safe-level.patch +- build with --enable-pthread. (#201452) * Mon Aug 7 2006 Akira TAGOH - 1.8.4-12 - owns sitearchdir. (#201208) From 868af58cd2655651edc37ac9daf7cc7b1ad3d63c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Aug 2006 09:04:06 +0000 Subject: [PATCH 078/529] *** empty log message *** --- ruby.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 6782214..264fe28 100644 --- a/ruby.spec +++ b/ruby.spec @@ -164,7 +164,6 @@ export rb_cv_func_strtod CFLAGS="$RPM_OPT_FLAGS -Wall" export CFLAGS %configure \ - --datarootdir='$(DESTDIR)/%{_datadir}' \ --with-sitedir='%{sitedir}' \ --with-default-kcode=none \ --enable-shared \ From e7cc3ee268083b84ecfafa095b7f7cd15842bb1f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Aug 2006 11:08:12 +0000 Subject: [PATCH 079/529] *** empty log message *** --- ruby.spec | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ruby.spec b/ruby.spec index 264fe28..0d73eb3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -161,20 +161,29 @@ autoconf rb_cv_func_strtod=no export rb_cv_func_strtod -CFLAGS="$RPM_OPT_FLAGS -Wall" +CFLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing" export CFLAGS %configure \ --with-sitedir='%{sitedir}' \ --with-default-kcode=none \ + --with-bundled-sha1 \ + --with-bundled-md5 \ + --with-bundled-rmd160 \ --enable-shared \ --enable-ipv6 \ +%ifarch ppc + --disable-pthread \ +%else --enable-pthread \ +%endif --with-lookup-order-hack=INET \ --disable-rpath \ --with-ruby-prefix=%{_prefix}/lib -#cp Makefile Makefile.orig -#sed -e 's/^EXTMK_ARGS[[:space:]].*=\(.*\) --$/EXTMK_ARGS=\1 --disable-tcl-thread --/' Makefile.orig > Makefile +%ifarch ppc +cp Makefile Makefile.orig +sed -e 's/^EXTMK_ARGS[[:space:]].*=\(.*\) --$/EXTMK_ARGS=\1 --disable-tcl-thread --/' Makefile.orig > Makefile +%endif make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} %ifarch ia64 # Miscompilation? Buggy code? @@ -320,7 +329,7 @@ egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files # for ruby-tcltk.rpm cp /dev/null ruby-tcltk.files -for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/.ext -type f -name '*.so'` +for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/.ext -type f -name '*.so'; find %{name}-%{version}/ext/tk -type f -name '*.so'` do egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : done @@ -451,7 +460,7 @@ rm -rf tmp-ruby-docs - ruby-1.8.4-fix-insecure-dir-operation.patch - ruby-1.8.4-fix-insecure-regexp-modification.patch - ruby-1.8.4-fix-alias-safe-level.patch -- build with --enable-pthread. (#201452) +- build with --enable-pthread except on ppc. * Mon Aug 7 2006 Akira TAGOH - 1.8.4-12 - owns sitearchdir. (#201208) From 96db45ddea6426362a757c869f15892514132a23 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Aug 2006 12:19:07 +0000 Subject: [PATCH 080/529] trivial fix to build successfully --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 0d73eb3..c6c8fe8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -296,7 +296,7 @@ _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} # generate ri doc -make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} DESTDIR=$RPM_BUILD_ROOT install-doc +make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="\$(MINIRUBY) -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc #DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb From 45d9b3a63b793e51a2b0fb4c0ad2ba77f0a30a89 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Aug 2006 13:47:56 +0000 Subject: [PATCH 081/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index c6c8fe8..6ab7c67 100644 --- a/ruby.spec +++ b/ruby.spec @@ -296,7 +296,7 @@ _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} # generate ri doc -make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="\$(MINIRUBY) -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc +make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="\$(MINIRUBY) -I $RPM_BUILD_ROOT%{_libdir}/ruby//%{rubyxver} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc #DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb From c968017a947feea7f2bec7b446013bdc6ce87e35 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Aug 2006 14:15:32 +0000 Subject: [PATCH 082/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 6ab7c67..e03ebb4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -296,7 +296,7 @@ _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} # generate ri doc -make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="\$(MINIRUBY) -I $RPM_BUILD_ROOT%{_libdir}/ruby//%{rubyxver} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc +make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="\$(MINIRUBY) -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc #DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb From e323e9233994eb6ca7e0d6957bf8f34cdce5707f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Aug 2006 14:29:49 +0000 Subject: [PATCH 083/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e03ebb4..e664a68 100644 --- a/ruby.spec +++ b/ruby.spec @@ -296,7 +296,7 @@ _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} # generate ri doc -make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="\$(MINIRUBY) -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc +make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="$RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc #DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} # XXX: installing irb From 8f19dd2c8849a646a3ec937f8af6ca67f87f5fd6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 28 Aug 2006 14:55:58 +0000 Subject: [PATCH 084/529] *** empty log message *** --- ruby.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ruby.spec b/ruby.spec index e664a68..98c848a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -285,20 +285,18 @@ done # done cd .. +# generate ri doc +make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="\$(MINIRUBY) \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc +#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} + # installing binaries ... -cd %{name}-%{version} -make DESTDIR=$RPM_BUILD_ROOT install -cd .. +make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} DESTDIR=$RPM_BUILD_ROOT install _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir2}/%{rubyxver} %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} -# generate ri doc -make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="$RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc -#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} - # XXX: installing irb install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ From 65c9d6e045cc7c63683a3dc079f33608584d456d Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 29 Aug 2006 12:53:41 +0000 Subject: [PATCH 085/529] *** empty log message *** --- ruby.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruby.spec b/ruby.spec index 98c848a..8627f25 100644 --- a/ruby.spec +++ b/ruby.spec @@ -297,6 +297,12 @@ _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir2}/%{rubyxver} %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} +%ifarch ppc64 s390x sparc64 x86_64 +# correct archdir +mv $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os}/* $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ +rmdir $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os} +%endif + # XXX: installing irb install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ From 25b45e3e66d80f30bb6ca24414d73f261c8d7830 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 5 Sep 2006 07:37:24 +0000 Subject: [PATCH 086/529] - ruby-1.8.5-hash-memory-leak.patch: backported from CVS to fix a memory leak on Hash. [ruby-talk:211233] --- ruby-1.8.5-hash-memory-leak.patch | 48 +++++++++++++++++++++++++++++++ ruby.spec | 15 ++++++---- 2 files changed, 58 insertions(+), 5 deletions(-) create mode 100644 ruby-1.8.5-hash-memory-leak.patch diff --git a/ruby-1.8.5-hash-memory-leak.patch b/ruby-1.8.5-hash-memory-leak.patch new file mode 100644 index 0000000..331ab34 --- /dev/null +++ b/ruby-1.8.5-hash-memory-leak.patch @@ -0,0 +1,48 @@ +diff -ruN ruby-1.8.5.orig/hash.c ruby-1.8.5/hash.c +--- ruby-1.8.5.orig/hash.c 2006-07-07 00:44:26.000000000 +0900 ++++ ruby-1.8.5/hash.c 2006-08-30 15:50:31.000000000 +0900 +@@ -223,20 +223,31 @@ + rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash); + } + ++static VALUE hash_alloc0 _((VALUE)); + static VALUE hash_alloc _((VALUE)); + static VALUE +-hash_alloc(klass) ++hash_alloc0(klass) + VALUE klass; + { + NEWOBJ(hash, struct RHash); + OBJSETUP(hash, klass, T_HASH); + + hash->ifnone = Qnil; +- hash->tbl = st_init_table(&objhash); + + return (VALUE)hash; + } + ++static VALUE ++hash_alloc(klass) ++ VALUE klass; ++{ ++ VALUE hash = hash_alloc0(klass); ++ ++ RHASH(hash)->tbl = st_init_table(&objhash); ++ ++ return hash; ++} ++ + VALUE + rb_hash_new() + { +@@ -325,9 +336,7 @@ + int i; + + if (argc == 1 && TYPE(argv[0]) == T_HASH) { +- hash = hash_alloc(klass); +- +- RHASH(hash)->ifnone = Qnil; ++ hash = hash_alloc0(klass); + RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl); + + return hash; diff --git a/ruby.spec b/ruby.spec index 8627f25..82c5884 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,6 +26,7 @@ Source5: irb.1 Source10: ruby-mode-init.el Patch1: ruby-1.8.2-deadcode.patch +Patch2: ruby-1.8.5-hash-memory-leak.patch Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch @@ -142,6 +143,7 @@ tar fxz %{SOURCE2} popd pushd %{name}-%{version} %patch1 -p1 +%patch2 -p1 %patch20 -p1 %patch21 -p1 %ifarch ppc64 s390x sparc64 x86_64 @@ -161,7 +163,7 @@ autoconf rb_cv_func_strtod=no export rb_cv_func_strtod -CFLAGS="$RPM_OPT_FLAGS -Wall -fno-strict-aliasing" +CFLAGS="$RPM_OPT_FLAGS -Wall" export CFLAGS %configure \ --with-sitedir='%{sitedir}' \ @@ -285,15 +287,16 @@ done # done cd .. -# generate ri doc -make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} RUNRUBY="\$(MINIRUBY) \$(srcdir)/runruby.rb --extout=\$(EXTOUT) --" DESTDIR=$RPM_BUILD_ROOT install-doc -#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} - # installing binaries ... make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} DESTDIR=$RPM_BUILD_ROOT install _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` +# generate ri doc +rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} +LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} RUBYLIB=$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}:$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} make -C $rubybuilddir DESTDIR=$RPM_BUILD_ROOT install-doc +#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} + %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir2}/%{rubyxver} %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} @@ -465,6 +468,8 @@ rm -rf tmp-ruby-docs - ruby-1.8.4-fix-insecure-regexp-modification.patch - ruby-1.8.4-fix-alias-safe-level.patch - build with --enable-pthread except on ppc. +- ruby-1.8.5-hash-memory-leak.patch: backported from CVS to fix a memory leak + on Hash. [ruby-talk:211233] * Mon Aug 7 2006 Akira TAGOH - 1.8.4-12 - owns sitearchdir. (#201208) From 3feca6f65355bad9dc010457ecd81adf2e85fd31 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 26 Sep 2006 09:39:59 +0000 Subject: [PATCH 087/529] - fixed rbconfig.rb to refer to DESTDIR for sitearchdir. (#207311) --- ruby-rubyprefix.patch | 7 +++---- ruby.spec | 7 +++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ruby-rubyprefix.patch b/ruby-rubyprefix.patch index fc54018..452ef2f 100644 --- a/ruby-rubyprefix.patch +++ b/ruby-rubyprefix.patch @@ -31,7 +31,7 @@ diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in [sitedir='${prefix}/lib/ruby/site_ruby']) -SITE_DIR="`eval \"echo ${sitedir}\"`" +SITE_DIR="`eval \"echo ${sitedir}\" | sed -e s/lib64/lib/`" -+_fc_sitedir=${sitedir} ++_fc_sitedir="\$(DESTDIR)${sitedir}" +SITE_DIR2="`eval \"echo ${_fc_sitedir}\"`" +sitedir="`eval \"echo ${sitedir}\" | sed -e s/lib64/lib/`" case "$target_os" in @@ -85,11 +85,10 @@ diff -ruN ruby-1.8.4.orig/mkconfig.rb ruby-1.8.4/mkconfig.rb CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)" - CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)" - CONFIG["archdir"] = "$(rubylibdir)/$(arch)" -- CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)" -- CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)" + CONFIG["rubylibdir"] = "$(prefix)/lib/ruby/$(ruby_version)" + CONFIG["archdir"] = "$(libdir)/ruby/$(ruby_version)/$(arch)" -+ CONFIG["sitelibdir"] = "$(prefix)/lib/ruby/site_ruby/$(ruby_version)" + CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)" +- CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)" + CONFIG["sitearchdir"] = "$(_fc_sitedir)/$(ruby_version)/$(sitearch)" CONFIG["topdir"] = File.dirname(__FILE__) MAKEFILE_CONFIG = {} diff --git a/ruby.spec b/ruby.spec index 82c5884..3bce9eb 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.5 -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -295,7 +295,7 @@ _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` # generate ri doc rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} RUBYLIB=$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}:$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} make -C $rubybuilddir DESTDIR=$RPM_BUILD_ROOT install-doc -#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} +#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $rubybuilddir -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $rubybuilddir/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $rubybuilddir %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir2}/%{rubyxver} %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} @@ -459,6 +459,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Tue Sep 26 2006 Akira TAGOH - 1.8.5-2 +- fixed rbconfig.rb to refer to DESTDIR for sitearchdir. (#207311) + * Mon Aug 28 2006 Akira TAGOH - 1.8.5-1 - New upstream release. - removed the unnecessary patches: From 978382f446d07b10917d9e8629446a1146f49f4d Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sun, 1 Oct 2006 21:18:33 +0000 Subject: [PATCH 088/529] bump for gcc bug --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 3bce9eb..26a0a1a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.5 -Release: 2%{?dist} +Release: 3%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -459,6 +459,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Sun Oct 01 2006 Jesse Keating - 1.8.5-3 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + * Tue Sep 26 2006 Akira TAGOH - 1.8.5-2 - fixed rbconfig.rb to refer to DESTDIR for sitearchdir. (#207311) From 44c8f2bd54961d0c15ab9d164d979f663f2f4c33 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 27 Oct 2006 13:51:47 +0000 Subject: [PATCH 089/529] - security fix release. - ruby-1.8.5-cgi-CVE-2006-5467.patch: fix a CGI multipart parsing bug that causes the denial of service. (#212396) --- ruby.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 26a0a1a..df32bc0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -5,7 +5,7 @@ Name: ruby Version: 1.8.5 -Release: 3%{?dist} +Release: 4%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -27,6 +27,7 @@ Source10: ruby-mode-init.el Patch1: ruby-1.8.2-deadcode.patch Patch2: ruby-1.8.5-hash-memory-leak.patch +Patch3: ruby-1.8.5-cgi-CVE-2006-5467.patch Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch @@ -144,6 +145,7 @@ popd pushd %{name}-%{version} %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch20 -p1 %patch21 -p1 %ifarch ppc64 s390x sparc64 x86_64 @@ -459,6 +461,11 @@ rm -rf tmp-ruby-docs %endif %changelog +* Fri Oct 27 2006 Akira TAGOH - 1.8.5-4 +- security fix release. +- ruby-1.8.5-cgi-CVE-2006-5467.patch: fix a CGI multipart parsing bug that + causes the denial of service. (#212396) + * Sun Oct 01 2006 Jesse Keating - 1.8.5-3 - rebuilt for unwind info generation, broken in gcc-4.1.1-21 From f069eea3e8783031d81d904d43aabef02a711936 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 11 Dec 2006 04:23:10 +0000 Subject: [PATCH 090/529] - security fix release. --- .cvsignore | 1 + ruby.spec | 65 +++++++++++++++++++++++++++++------------------------- sources | 2 +- 3 files changed, 37 insertions(+), 31 deletions(-) diff --git a/.cvsignore b/.cvsignore index 715106e..ded56df 100644 --- a/.cvsignore +++ b/.cvsignore @@ -10,3 +10,4 @@ ruby-1.8.4-preview1.tar.gz ruby-1.8.4-preview2.tar.gz ruby-1.8.4.tar.gz ruby-1.8.5.tar.gz +ruby-1.8.5-p2.tar.gz diff --git a/ruby.spec b/ruby.spec index df32bc0..b163042 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,11 +1,15 @@ %define manver 1.4.6 %define rubyxver 1.8 +%define rubyver 1.8.5 +%define _patchlevel 2 +%define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} +%define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define sitedir %{_libdir}/ruby/site_ruby %define sitedir2 %{_prefix}/lib/ruby/site_ruby Name: ruby -Version: 1.8.5 -Release: 4%{?dist} +Version: %{rubyver}%{?dotpatchlevel} +Release: 1%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -14,7 +18,7 @@ BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel gli BuildRequires: emacs %endif -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{version}.tar.gz +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{rubyver}%{?patchlevel}.tar.gz ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz @@ -27,7 +31,6 @@ Source10: ruby-mode-init.el Patch1: ruby-1.8.2-deadcode.patch Patch2: ruby-1.8.5-hash-memory-leak.patch -Patch3: ruby-1.8.5-cgi-CVE-2006-5467.patch Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch @@ -142,10 +145,9 @@ mkdir -p ruby-refm-ja pushd ruby-refm-ja tar fxz %{SOURCE2} popd -pushd %{name}-%{version} +pushd %{name}-%{rubyver}%{?patchlevel} %patch1 -p1 %patch2 -p1 -%patch3 -p1 %patch20 -p1 %patch21 -p1 %ifarch ppc64 s390x sparc64 x86_64 @@ -157,7 +159,7 @@ pushd %{name}-%{version} popd %build -pushd %{name}-%{version} +pushd %{name}-%{rubyver}%{?patchlevel} for i in config.sub config.guess; do test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i . done @@ -217,14 +219,14 @@ cd tmp-ruby-docs # for ruby.rpm mkdir ruby ruby-libs ruby-devel ruby-tcltk ruby-docs irb cd ruby -(cd ../../%{name}-%{version} && tar cf - sample) | tar xvf - +(cd ../../%{name}-%{rubyver}%{?patchlevel} && tar cf - sample) | tar xvf - cd .. # for ruby-libs cd ruby-libs -(cd ../../%{name}-%{version} && tar cf - lib/README*) | tar xvf - -(cd ../../%{name}-%{version}/doc && tar cf - .) | tar xvf - -(cd ../../%{name}-%{version} && +(cd ../../%{name}-%{rubyver}%{?patchlevel} && tar cf - lib/README*) | tar xvf - +(cd ../../%{name}-%{rubyver}%{?patchlevel}/doc && tar cf - .) | tar xvf - +(cd ../../%{name}-%{rubyver}%{?patchlevel} && tar cf - `find ext \ -mindepth 1 \ \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ @@ -290,12 +292,12 @@ done cd .. # installing binaries ... -make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} DESTDIR=$RPM_BUILD_ROOT install +make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{rubyver}%{?patchlevel} DESTDIR=$RPM_BUILD_ROOT install _cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` # generate ri doc -rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} +rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{rubyver}%{?patchlevel} LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} RUBYLIB=$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}:$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} make -C $rubybuilddir DESTDIR=$RPM_BUILD_ROOT install-doc #DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $rubybuilddir -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $rubybuilddir/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $rubybuilddir @@ -313,7 +315,7 @@ install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ %ifnarch ppc64 # installing ruby-mode -cd %{name}-%{version} +cd %{name}-%{rubyver}%{?patchlevel} cp misc/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode ## for ruby-mode @@ -338,7 +340,7 @@ egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files # for ruby-tcltk.rpm cp /dev/null ruby-tcltk.files -for f in `find %{name}-%{version}/ext/tk/lib -type f; find %{name}-%{version}/.ext -type f -name '*.so'; find %{name}-%{version}/ext/tk -type f -name '*.so'` +for f in `find %{name}-%{rubyver}%{?patchlevel}/ext/tk/lib -type f; find %{name}-%{rubyver}%{?patchlevel}/.ext -type f -name '*.so'; find %{name}-%{rubyver}%{?patchlevel}/ext/tk -type f -name '*.so'` do egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : done @@ -396,27 +398,27 @@ rm -rf tmp-ruby-docs %files -f ruby.files %defattr(-, root, root) -%doc %{name}-%{version}/README -%lang(ja) %doc %{name}-%{version}/README.ja -%doc %{name}-%{version}/COPYING* -%doc %{name}-%{version}/ChangeLog -%doc %{name}-%{version}/LEGAL -%doc %{name}-%{version}/ToDo -%doc %{name}-%{version}/doc/NEWS +%doc %{name}-%{rubyver}%{?patchlevel}/README +%lang(ja) %doc %{name}-%{rubyver}%{?patchlevel}/README.ja +%doc %{name}-%{rubyver}%{?patchlevel}/COPYING* +%doc %{name}-%{rubyver}%{?patchlevel}/ChangeLog +%doc %{name}-%{rubyver}%{?patchlevel}/LEGAL +%doc %{name}-%{rubyver}%{?patchlevel}/ToDo +%doc %{name}-%{rubyver}%{?patchlevel}/doc/NEWS %doc tmp-ruby-docs/ruby/* %files devel -f ruby-devel.files %defattr(-, root, root) -%doc %{name}-%{version}/README.EXT -%lang(ja) %doc %{name}-%{version}/README.EXT.ja +%doc %{name}-%{rubyver}%{?patchlevel}/README.EXT +%lang(ja) %doc %{name}-%{rubyver}%{?patchlevel}/README.EXT.ja %files libs -f ruby-libs.files %defattr(-, root, root) -%doc %{name}-%{version}/README -%lang(ja) %doc %{name}-%{version}/README.ja -%doc %{name}-%{version}/COPYING* -%doc %{name}-%{version}/ChangeLog -%doc %{name}-%{version}/LEGAL +%doc %{name}-%{rubyver}%{?patchlevel}/README +%lang(ja) %doc %{name}-%{rubyver}%{?patchlevel}/README.ja +%doc %{name}-%{rubyver}%{?patchlevel}/COPYING* +%doc %{name}-%{rubyver}%{?patchlevel}/ChangeLog +%doc %{name}-%{rubyver}%{?patchlevel}/LEGAL %dir %{_libdir}/ruby %dir %{_prefix}/lib/ruby %dir %{_libdir}/ruby/%{rubyxver} @@ -456,11 +458,14 @@ rm -rf tmp-ruby-docs %ifnarch ppc64 %files mode -f ruby-mode.files %defattr(-, root, root) -%doc %{name}-%{version}/misc/README +%doc %{name}-%{rubyver}%{?patchlevel}/misc/README %dir %{_datadir}/emacs/site-lisp/ruby-mode %endif %changelog +* Mon Dec 11 2006 Akira TAGOH - 1.8.5.2-1 +- security fix release. + * Fri Oct 27 2006 Akira TAGOH - 1.8.5-4 - security fix release. - ruby-1.8.5-cgi-CVE-2006-5467.patch: fix a CGI multipart parsing bug that diff --git a/sources b/sources index 53c52a9..cd8fe8f 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -3fbb02294a8ca33d4684055adba5ed6f ruby-1.8.5.tar.gz +a3517a224716f79b14196adda3e88057 ruby-1.8.5-p2.tar.gz From 33bfb390b9f5bd79e163215ab0334684428c32b0 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 5 Feb 2007 04:59:56 +0000 Subject: [PATCH 091/529] - rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index b163042..21dd129 100644 --- a/ruby.spec +++ b/ruby.spec @@ -9,7 +9,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -463,6 +463,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Mon Feb 5 2007 Akira TAGOH - 1.8.5.2-2 +- rebuild + * Mon Dec 11 2006 Akira TAGOH - 1.8.5.2-1 - security fix release. From 5e0f0e1ccd1c8cee0364f3b86cb4fbe52d82818b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 5 Feb 2007 10:36:36 +0000 Subject: [PATCH 092/529] - New upstream release. sources 5 Feb 2007 10:36:34 -0000 d7d12dd9124c9b7d55cdbbee313e3931 ruby-1.8.5-p12.tar.gz --- .cvsignore | 1 + ruby-rubyprefix.patch | 31 +++++++++++++++---------------- ruby.spec | 10 ++++------ sources | 2 +- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/.cvsignore b/.cvsignore index ded56df..e796d3f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -11,3 +11,4 @@ ruby-1.8.4-preview2.tar.gz ruby-1.8.4.tar.gz ruby-1.8.5.tar.gz ruby-1.8.5-p2.tar.gz +ruby-1.8.5-p12.tar.gz diff --git a/ruby-rubyprefix.patch b/ruby-rubyprefix.patch index 452ef2f..1b01f3a 100644 --- a/ruby-rubyprefix.patch +++ b/ruby-rubyprefix.patch @@ -1,7 +1,7 @@ -diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in ---- ruby-1.8.4.orig/configure.in 2006-04-19 21:54:44.000000000 +0900 -+++ ruby-1.8.4/configure.in 2006-04-19 21:59:48.000000000 +0900 -@@ -1433,6 +1433,13 @@ +diff -ruN ruby-1.8.5-p12.orig/configure.in ruby-1.8.5-p12/configure.in +--- ruby-1.8.5-p12.orig/configure.in 2006-12-06 19:58:08.000000000 +0900 ++++ ruby-1.8.5-p12/configure.in 2007-02-05 17:02:43.000000000 +0900 +@@ -1505,6 +1505,13 @@ rubyw_install_name="$RUBYW_INSTALL_NAME" ;; esac @@ -15,7 +15,7 @@ diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in case "$target_os" in cygwin*|mingw*|*djgpp*|os2-emx*) RUBY_LIB_PREFIX="/lib/ruby" -@@ -1441,21 +1448,30 @@ +@@ -1513,20 +1520,29 @@ RUBY_LIB_PREFIX="${prefix}/lib/ruby" ;; esac @@ -29,11 +29,11 @@ diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in [ --with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]], [sitedir=$withval], [sitedir='${prefix}/lib/ruby/site_ruby']) --SITE_DIR="`eval \"echo ${sitedir}\"`" -+SITE_DIR="`eval \"echo ${sitedir}\" | sed -e s/lib64/lib/`" +-SITE_DIR=`eval echo \\"${sitedir}\\"` ++SITE_DIR=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` +_fc_sitedir="\$(DESTDIR)${sitedir}" -+SITE_DIR2="`eval \"echo ${_fc_sitedir}\"`" -+sitedir="`eval \"echo ${sitedir}\" | sed -e s/lib64/lib/`" ++SITE_DIR2=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` ++sitedir=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` case "$target_os" in cygwin*|mingw*|*djgpp*|os2-emx*) RUBY_SITE_LIB_PATH="`expr "$SITE_DIR" : "$prefix\(/.*\)"`" || @@ -47,8 +47,7 @@ diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}" AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") - AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") -@@ -1464,6 +1480,7 @@ +@@ -1536,6 +1552,7 @@ AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(sitedir)dnl @@ -56,7 +55,7 @@ diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in configure_args=$ac_configure_args AC_SUBST(configure_args)dnl -@@ -1472,7 +1489,7 @@ +@@ -1544,7 +1561,7 @@ arch="fat-${target_os}" AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB, @@ -65,7 +64,7 @@ diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB, "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") -@@ -1487,8 +1504,8 @@ +@@ -1559,8 +1576,8 @@ *) sitearch="${arch}" ;; esac @@ -76,9 +75,9 @@ diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in AC_ARG_WITH(search-path, [ --with-search-path=DIR specify the additional search path], -diff -ruN ruby-1.8.4.orig/mkconfig.rb ruby-1.8.4/mkconfig.rb ---- ruby-1.8.4.orig/mkconfig.rb 2005-11-11 08:22:03.000000000 +0900 -+++ ruby-1.8.4/mkconfig.rb 2006-04-19 21:55:08.000000000 +0900 +diff -ruN ruby-1.8.5-p12.orig/mkconfig.rb ruby-1.8.5-p12/mkconfig.rb +--- ruby-1.8.5-p12.orig/mkconfig.rb 2006-06-25 23:03:10.000000000 +0900 ++++ ruby-1.8.5-p12/mkconfig.rb 2007-02-05 16:54:32.000000000 +0900 @@ -108,10 +108,10 @@ print v_fast, v_others print < - 1.8.5.2-2 -- rebuild +* Mon Feb 5 2007 Akira TAGOH - 1.8.5.12-1 +- New upstream release. * Mon Dec 11 2006 Akira TAGOH - 1.8.5.2-1 - security fix release. diff --git a/sources b/sources index cd8fe8f..423844b 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -a3517a224716f79b14196adda3e88057 ruby-1.8.5-p2.tar.gz +d7d12dd9124c9b7d55cdbbee313e3931 ruby-1.8.5-p12.tar.gz From 6b5254289b0d2ba5f0c688b6727a7e98b295d75c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 13 Feb 2007 10:37:16 +0000 Subject: [PATCH 093/529] Fue Feb 13 2007 Akira TAGOH - 1.8.5.12-2 - Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 0460b17..3edb926 100644 --- a/ruby.spec +++ b/ruby.spec @@ -9,7 +9,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -461,6 +461,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Fue Feb 13 2007 Akira TAGOH - 1.8.5.12-2 +- Rebuild + * Mon Feb 5 2007 Akira TAGOH - 1.8.5.12-1 - New upstream release. From 18a656782ce5b93880df3c280b3921ed2ac630b3 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 13 Feb 2007 10:37:48 +0000 Subject: [PATCH 094/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 3edb926..70a1a63 100644 --- a/ruby.spec +++ b/ruby.spec @@ -461,7 +461,7 @@ rm -rf tmp-ruby-docs %endif %changelog -* Fue Feb 13 2007 Akira TAGOH - 1.8.5.12-2 +* Tue Feb 13 2007 Akira TAGOH - 1.8.5.12-2 - Rebuild * Mon Feb 5 2007 Akira TAGOH - 1.8.5.12-1 From 0ccd24ad4805b8800fcd60dd30bc4f32b07f7596 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 15 Mar 2007 13:26:32 +0000 Subject: [PATCH 095/529] - New upstream release. - clean up a spec file. --- .cvsignore | 1 + ruby-deadcode.patch | 72 ++++++++++++++++++++++++++++++++++++++++ ruby.spec | 80 ++++++++++++++++++++++++++------------------- sources | 2 +- 4 files changed, 120 insertions(+), 35 deletions(-) create mode 100644 ruby-deadcode.patch diff --git a/.cvsignore b/.cvsignore index e796d3f..2de721d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -12,3 +12,4 @@ ruby-1.8.4.tar.gz ruby-1.8.5.tar.gz ruby-1.8.5-p2.tar.gz ruby-1.8.5-p12.tar.gz +ruby-1.8.6.tar.bz2 diff --git a/ruby-deadcode.patch b/ruby-deadcode.patch new file mode 100644 index 0000000..2cc3654 --- /dev/null +++ b/ruby-deadcode.patch @@ -0,0 +1,72 @@ +diff -pruN ruby-1.8.6.orig/ext/bigdecimal/bigdecimal.c ruby-1.8.6/ext/bigdecimal/bigdecimal.c +--- ruby-1.8.6.orig/ext/bigdecimal/bigdecimal.c 2007-02-27 20:51:55.000000000 +0900 ++++ ruby-1.8.6/ext/bigdecimal/bigdecimal.c 2007-03-15 21:14:32.000000000 +0900 +@@ -2167,12 +2167,14 @@ VpGetDoubleNegZero(void) /* Returns the + return nzero; + } + ++#if 0 + VP_EXPORT int + VpIsNegDoubleZero(double v) + { + double z = VpGetDoubleNegZero(); + return MemCmp(&v,&z,sizeof(v))==0; + } ++#endif + + VP_EXPORT int + VpException(unsigned short f, const char *str,int always) +diff -pruN ruby-1.8.6.orig/parse.y ruby-1.8.6/parse.y +--- ruby-1.8.6.orig/parse.y 2007-03-03 16:30:46.000000000 +0900 ++++ ruby-1.8.6/parse.y 2007-03-15 21:15:58.000000000 +0900 +@@ -4511,6 +4511,7 @@ rb_node_newnode(type, a0, a1, a2) + return n; + } + ++#if 0 + static enum node_type + nodetype(node) /* for debug */ + NODE *node; +@@ -4524,6 +4525,7 @@ nodeline(node) + { + return nd_line(node); + } ++#endif + + static NODE* + newline_node(node) +diff -pruN ruby-1.8.6.orig/regex.c ruby-1.8.6/regex.c +--- ruby-1.8.6.orig/regex.c 2007-02-27 20:51:55.000000000 +0900 ++++ ruby-1.8.6/regex.c 2007-03-15 21:16:52.000000000 +0900 +@@ -998,6 +998,7 @@ print_partial_compiled_pattern(start, en + } + + ++#if 0 + static void + print_compiled_pattern(bufp) + struct re_pattern_buffer *bufp; +@@ -1006,6 +1007,7 @@ print_compiled_pattern(bufp) + + print_partial_compiled_pattern(buffer, buffer + bufp->used); + } ++#endif + + static char* + calculate_must_string(start, end) +@@ -2586,6 +2588,7 @@ insert_jump_n(op, from, to, current_end, + + If you call this function, you must zero out pending_exact. */ + ++#if 0 + static void + insert_op(op, there, current_end) + int op; +@@ -2599,6 +2602,7 @@ insert_op(op, there, current_end) + + there[0] = (char)op; + } ++#endif + + + /* Open up space at location THERE, and insert operation OP followed by diff --git a/ruby.spec b/ruby.spec index 70a1a63..780d43c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,15 +1,17 @@ %define manver 1.4.6 %define rubyxver 1.8 -%define rubyver 1.8.5 -%define _patchlevel 12 +%define rubyver 1.8.6 +#%%define _patchlevel 12 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define sitedir %{_libdir}/ruby/site_ruby +# This is required to ensure that noarch files puts under /usr/lib/... for +# multilib because ruby library is installed under /usr/{lib,lib64}/ruby anyway. %define sitedir2 %{_prefix}/lib/ruby/site_ruby Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 1%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -18,7 +20,7 @@ BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel gli BuildRequires: emacs %endif -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{rubyver}%{?patchlevel}.tar.gz +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{rubyver}%{?patchlevel}.tar.bz2 ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz @@ -29,13 +31,11 @@ Source4: rubyfaq-jp-990927.tar.bz2 Source5: irb.1 Source10: ruby-mode-init.el -Patch1: ruby-1.8.2-deadcode.patch +Patch1: ruby-deadcode.patch Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch -Patch24: ruby-tcltk-multilib.patch -Patch25: ruby-fix-autoconf-magic-code.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -49,18 +49,18 @@ straight-forward, and extensible. %package libs -Summary: Libraries necessary to run Ruby. +Summary: Libraries necessary to run Ruby Group: Development/Libraries Provides: ruby(abi) = %{rubyxver} -Provides: libruby -Obsoletes: libruby +Provides: libruby = %{version}-%{release} +Obsoletes: libruby <= %{version}-%{release} %description libs This package includes the libruby, necessary to run Ruby. %package devel -Summary: A Ruby development environment. +Summary: A Ruby development environment Group: Development/Languages Requires: %{name}-libs = %{version}-%{release} @@ -70,7 +70,7 @@ Ruby or an application embedded Ruby. %package tcltk -Summary: Tcl/Tk interface for scripting language Ruby. +Summary: Tcl/Tk interface for scripting language Ruby Group: Development/Languages Requires: %{name}-libs = %{version}-%{release} @@ -79,11 +79,11 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %package irb -Summary: The Interactive Ruby. +Summary: The Interactive Ruby Group: Development/Languages Requires: %{name} = %{version}-%{release} -Provides: irb -Obsoletes: irb +Provides: irb = %{version}-%{release} +Obsoletes: irb <= %{version}-%{release} %description irb The irb is acronym for Interactive Ruby. It evaluates ruby expression @@ -95,8 +95,8 @@ Summary: A tool to generate documentation from Ruby source files Group: Development/Languages Requires: %{name} = %{version}-%{release} Requires: %{name}-irb = %{version}-%{release} -Provides: rdoc -Obsoletes: rdoc +Provides: rdoc = %{version}-%{release} +Obsoletes: rdoc <= %{version}-%{release} %description rdoc The rdoc is a tool to generate the documentation from Ruby source files. @@ -105,7 +105,7 @@ XML and Windows Help file (chm). %package docs -Summary: Manuals and FAQs for scripting language Ruby. +Summary: Manuals and FAQs for scripting language Ruby Group: Documentation %description docs @@ -128,8 +128,8 @@ Summary: Ruby interactive reference Group: Documentation Requires: %{name} = %{version}-%{release} Requires: %{name}-rdoc = %{version}-%{release} -Provides: ri -Obsoletes: ri +Provides: ri = %{version}-%{release} +Obsoletes: ri <= %{version}-%{release} %description ri ri is a command line tool that displays descriptions of built-in @@ -151,9 +151,7 @@ pushd %{name}-%{rubyver}%{?patchlevel} %ifarch ppc64 s390x sparc64 x86_64 %patch22 -p1 %patch23 -p1 -%patch24 -p1 %endif -#%%patch25 -p1 popd %build @@ -194,10 +192,14 @@ make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} rm -f parse.o make OPT=-O0 RUBY_INSTALL_NAME=ruby %{?_smp_mflags} %endif + +popd + +%check +pushd %{name}-%{rubyver}%{?patchlevel} %ifnarch ppc64 make test %endif - popd %install @@ -304,12 +306,12 @@ LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} RUBYLIB=$RPM_BUILD_ROOT%{_libdir}/ruby %ifarch ppc64 s390x sparc64 x86_64 # correct archdir -mv $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os}/* $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -rmdir $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os} +#mv $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os}/* $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ +#rmdir $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os} %endif # XXX: installing irb -install %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ +install -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ %ifnarch ppc64 # installing ruby-mode @@ -336,12 +338,14 @@ cd .. -e "s,\(/man/man./.*\)$,\1*," > ruby-all.files egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files +_rubytmpfile=`mktemp -t %{name}-%{version}-%{release}-tmp-%(%{__id_u -n}).XXXXXXXXXX` # for ruby-tcltk.rpm cp /dev/null ruby-tcltk.files for f in `find %{name}-%{rubyver}%{?patchlevel}/ext/tk/lib -type f; find %{name}-%{rubyver}%{?patchlevel}/.ext -type f -name '*.so'; find %{name}-%{rubyver}%{?patchlevel}/ext/tk -type f -name '*.so'` do egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : done +sort ruby-tcltk.files | uniq - $_rubytmpfile && mv $_rubytmpfile ruby-tcltk.files # for irb.rpm fgrep 'irb' ruby-all.files > irb.files @@ -388,21 +392,23 @@ rm -rf $RPM_BUILD_ROOT rm -f *.files rm -rf tmp-ruby-docs -%post libs -/sbin/ldconfig +%post libs -p /sbin/ldconfig -%postun libs -/sbin/ldconfig +%postun libs -p /sbin/ldconfig %files -f ruby.files %defattr(-, root, root) -%doc %{name}-%{rubyver}%{?patchlevel}/README -%lang(ja) %doc %{name}-%{rubyver}%{?patchlevel}/README.ja %doc %{name}-%{rubyver}%{?patchlevel}/COPYING* %doc %{name}-%{rubyver}%{?patchlevel}/ChangeLog +%doc %{name}-%{rubyver}%{?patchlevel}/GPL %doc %{name}-%{rubyver}%{?patchlevel}/LEGAL +%doc %{name}-%{rubyver}%{?patchlevel}/LGPL +%doc %{name}-%{rubyver}%{?patchlevel}/NEWS +%doc %{name}-%{rubyver}%{?patchlevel}/README +%lang(ja) %doc %{name}-%{rubyver}%{?patchlevel}/README.ja %doc %{name}-%{rubyver}%{?patchlevel}/ToDo -%doc %{name}-%{rubyver}%{?patchlevel}/doc/NEWS +%doc %{name}-%{rubyver}%{?patchlevel}/doc/ChangeLog-1.8.0 +%doc %{name}-%{rubyver}%{?patchlevel}/doc/NEWS-1.8.0 %doc tmp-ruby-docs/ruby/* %files devel -f ruby-devel.files @@ -416,7 +422,9 @@ rm -rf tmp-ruby-docs %lang(ja) %doc %{name}-%{rubyver}%{?patchlevel}/README.ja %doc %{name}-%{rubyver}%{?patchlevel}/COPYING* %doc %{name}-%{rubyver}%{?patchlevel}/ChangeLog +%doc %{name}-%{rubyver}%{?patchlevel}/GPL %doc %{name}-%{rubyver}%{?patchlevel}/LEGAL +%doc %{name}-%{rubyver}%{?patchlevel}/LGPL %dir %{_libdir}/ruby %dir %{_prefix}/lib/ruby %dir %{_libdir}/ruby/%{rubyxver} @@ -461,6 +469,10 @@ rm -rf tmp-ruby-docs %endif %changelog +* Thu Mar 15 2007 Akira TAGOH - 1.8.6-1 +- New upstream release. +- clean up a spec file. + * Tue Feb 13 2007 Akira TAGOH - 1.8.5.12-2 - Rebuild @@ -969,7 +981,7 @@ rm -rf tmp-ruby-docs * Fri Jul 23 1999 Atsushi Yamagata - 2nd release - Updated to version 1.2.6(15 Jul 1999) -- striped %{prefix}/bin/ruby +- striped %%{prefix}/bin/ruby * Mon Jun 28 1999 Atsushi Yamagata - Updated to version 1.2.6(21 Jun 1999) diff --git a/sources b/sources index 423844b..6037925 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -d7d12dd9124c9b7d55cdbbee313e3931 ruby-1.8.5-p12.tar.gz +e558a0e00ae318d43bf6ff9af452bad2 ruby-1.8.6.tar.bz2 From 5bb64d01e8e04cf16dbf36f5f763482d4c635b00 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 28 Mar 2007 14:08:33 +0000 Subject: [PATCH 096/529] - Fix search path breakage. (#234029) --- ruby-rubyprefix.patch | 2 +- ruby.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby-rubyprefix.patch b/ruby-rubyprefix.patch index 1b01f3a..79daf90 100644 --- a/ruby-rubyprefix.patch +++ b/ruby-rubyprefix.patch @@ -32,7 +32,7 @@ diff -ruN ruby-1.8.5-p12.orig/configure.in ruby-1.8.5-p12/configure.in -SITE_DIR=`eval echo \\"${sitedir}\\"` +SITE_DIR=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` +_fc_sitedir="\$(DESTDIR)${sitedir}" -+SITE_DIR2=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` ++SITE_DIR2=`eval echo \\"${_fc_sitedir}\\"` +sitedir=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` case "$target_os" in cygwin*|mingw*|*djgpp*|os2-emx*) diff --git a/ruby.spec b/ruby.spec index 780d43c..155dd9d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,7 +11,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -469,6 +469,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Wed Mar 28 2007 Akira TAGOH - 1.8.6-2 +- Fix search path breakage. (#234029) + * Thu Mar 15 2007 Akira TAGOH - 1.8.6-1 - New upstream release. - clean up a spec file. From a479a6b5f99108ef25648cf2eb2228bf6c1fcd1c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 20 Jun 2007 13:14:04 +0000 Subject: [PATCH 097/529] - New upstream release. - Fix Etc::getgrgid to get the correct gid as requested. (#236647) --- .cvsignore | 1 + ruby.spec | 8 ++++++-- sources | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 2de721d..2239a68 100644 --- a/.cvsignore +++ b/.cvsignore @@ -13,3 +13,4 @@ ruby-1.8.5.tar.gz ruby-1.8.5-p2.tar.gz ruby-1.8.5-p12.tar.gz ruby-1.8.6.tar.bz2 +ruby-1.8.6-p36.tar.bz2 diff --git a/ruby.spec b/ruby.spec index 155dd9d..72c5a4b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %define manver 1.4.6 %define rubyxver 1.8 %define rubyver 1.8.6 -#%%define _patchlevel 12 +%define _patchlevel 36 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define sitedir %{_libdir}/ruby/site_ruby @@ -11,7 +11,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 1%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -469,6 +469,10 @@ rm -rf tmp-ruby-docs %endif %changelog +* Thu Jul 20 2007 Akira TAGOH - 1.8.6.36-1 +- New upstream release. + - Fix Etc::getgrgid to get the correct gid as requested. (#236647) + * Wed Mar 28 2007 Akira TAGOH - 1.8.6-2 - Fix search path breakage. (#234029) diff --git a/sources b/sources index 6037925..96dd4cd 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -e558a0e00ae318d43bf6ff9af452bad2 ruby-1.8.6.tar.bz2 +eb7f25818cb6993839b38d1f21bd4ea1 ruby-1.8.6-p36.tar.bz2 From 1d08690b25aab11ba635c6eb1cee10deda71bf7f Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 20 Jun 2007 15:09:24 +0000 Subject: [PATCH 098/529] *** empty log message *** --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 72c5a4b..bc87254 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,7 +11,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -469,7 +469,7 @@ rm -rf tmp-ruby-docs %endif %changelog -* Thu Jul 20 2007 Akira TAGOH - 1.8.6.36-1 +* Wed Jul 20 2007 Akira TAGOH - 1.8.6.36-2 - New upstream release. - Fix Etc::getgrgid to get the correct gid as requested. (#236647) From 9b0a2c686b7ac39f1aa099074bd38cead2dfcd27 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 25 Jun 2007 03:35:51 +0000 Subject: [PATCH 099/529] - ruby-r12567.patch: backport patch from upstream svn to get rid of the unnecessary declarations. (#245446) --- ruby-r12567.patch | 30 ++++++++++++++++++++++++++++++ ruby.spec | 8 +++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 ruby-r12567.patch diff --git a/ruby-r12567.patch b/ruby-r12567.patch new file mode 100644 index 0000000..0a15fc9 --- /dev/null +++ b/ruby-r12567.patch @@ -0,0 +1,30 @@ +Mon Jun 18 11:29:49 2007 Nobuyoshi Nakada + + * intern.h, ext/thread/thread.c: moved prototype of rb_thread_status() + to get rid of error in C++. [ruby-list:43615] + +Index: intern.h +=================================================================== +--- intern.h (吾с 12566) ++++ intern.h (吾с 12567) +@@ -204,7 +204,6 @@ + void rb_thread_polling _((void)); + void rb_thread_sleep _((int)); + void rb_thread_sleep_forever _((void)); +-enum rb_thread_status rb_thread_status _((VALUE)); + VALUE rb_thread_stop _((void)); + VALUE rb_thread_wakeup _((VALUE)); + VALUE rb_thread_wakeup_alive _((VALUE)); +Index: ext/thread/thread.c +=================================================================== +--- ext/thread/thread.c (吾с 12566) ++++ ext/thread/thread.c (吾с 12567) +@@ -14,6 +14,8 @@ + #include + #include + ++enum rb_thread_status rb_thread_status _((VALUE)); ++ + static VALUE rb_cMutex; + static VALUE rb_cConditionVariable; + static VALUE rb_cQueue; diff --git a/ruby.spec b/ruby.spec index bc87254..56aaa09 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,7 +11,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Ruby License/GPL - see COPYING URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -36,6 +36,7 @@ Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch +Patch24: ruby-r12567.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -152,6 +153,7 @@ pushd %{name}-%{rubyver}%{?patchlevel} %patch22 -p1 %patch23 -p1 %endif +%patch24 -p0 popd %build @@ -469,6 +471,10 @@ rm -rf tmp-ruby-docs %endif %changelog +* Mon Jul 25 2007 Akira TAGOH - 1.8.6.36-3 +- ruby-r12567.patch: backport patch from upstream svn to get rid of + the unnecessary declarations. (#245446) + * Wed Jul 20 2007 Akira TAGOH - 1.8.6.36-2 - New upstream release. - Fix Etc::getgrgid to get the correct gid as requested. (#236647) From d90f4cb1682c80631e3413fdb12d17df815e59d0 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 10 Aug 2007 06:23:11 +0000 Subject: [PATCH 100/529] - Update License tag. --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 56aaa09..229b908 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} Release: 3%{?dist} -License: Ruby License/GPL - see COPYING +License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel byacc @@ -471,6 +471,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Fri Aug 10 2007 Akira TAGOH +- Update License tag. + * Mon Jul 25 2007 Akira TAGOH - 1.8.6.36-3 - ruby-r12567.patch: backport patch from upstream svn to get rid of the unnecessary declarations. (#245446) From 443bb961d5a4126f0d6ed8c342a9f9b8783ca65b Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Thu, 23 Aug 2007 13:22:32 +0000 Subject: [PATCH 101/529] - Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 229b908..1b97c49 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,7 +11,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 4%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -471,6 +471,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Thu Aug 23 2007 Akira TAGOH - 1.8.6.36-4 +- Rebuild + * Fri Aug 10 2007 Akira TAGOH - Update License tag. From 0ce3eec117f3dc9f402d94b7e1fe4fe294be4fc5 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 10 Oct 2007 01:05:17 +0000 Subject: [PATCH 102/529] - New upstream release. - ruby-r12567.patch: removed. - ruby-1.8.6-CVE-2007-5162.patch: security fix for Net::HTTP that is insufficient verification of SSL certificate. --- .cvsignore | 1 + ruby-1.8.6-CVE-2007-5162.patch | 99 ++++++++++++++++++++++++++++++++++ ruby-r12567.patch | 30 ----------- ruby.spec | 14 +++-- sources | 1 + 5 files changed, 111 insertions(+), 34 deletions(-) create mode 100644 ruby-1.8.6-CVE-2007-5162.patch delete mode 100644 ruby-r12567.patch diff --git a/.cvsignore b/.cvsignore index 2239a68..99e711a 100644 --- a/.cvsignore +++ b/.cvsignore @@ -14,3 +14,4 @@ ruby-1.8.5-p2.tar.gz ruby-1.8.5-p12.tar.gz ruby-1.8.6.tar.bz2 ruby-1.8.6-p36.tar.bz2 +ruby-1.8.6-p110.tar.bz2 diff --git a/ruby-1.8.6-CVE-2007-5162.patch b/ruby-1.8.6-CVE-2007-5162.patch new file mode 100644 index 0000000..d4e4d68 --- /dev/null +++ b/ruby-1.8.6-CVE-2007-5162.patch @@ -0,0 +1,99 @@ +diff -ruN ruby-1.8.6-p110.orig/ext/openssl/lib/openssl/ssl.rb ruby-1.8.6-p110/ext/openssl/lib/openssl/ssl.rb +--- ruby-1.8.6-p110.orig/ext/openssl/lib/openssl/ssl.rb 2007-02-13 08:01:19.000000000 +0900 ++++ ruby-1.8.6-p110/ext/openssl/lib/openssl/ssl.rb 2007-10-04 22:38:48.000000000 +0900 +@@ -88,7 +88,7 @@ + end + } + end +- raise SSLError, "hostname not match" ++ raise SSLError, "hostname not match with the server certificate" + end + end + +diff -ruN ruby-1.8.6-p110.orig/lib/net/http.rb ruby-1.8.6-p110/lib/net/http.rb +--- ruby-1.8.6-p110.orig/lib/net/http.rb 2007-02-13 08:01:19.000000000 +0900 ++++ ruby-1.8.6-p110/lib/net/http.rb 2007-10-04 22:41:34.000000000 +0900 +@@ -470,6 +470,7 @@ + @debug_output = nil + @use_ssl = false + @ssl_context = nil ++ @enable_post_connection_check = true + end + + def inspect +@@ -526,6 +527,9 @@ + false # redefined in net/https + end + ++ # specify enabling SSL server certificate and hostname checking. ++ attr_accessor :enable_post_connection_check ++ + # Opens TCP connection and HTTP session. + # + # When this method is called with block, gives a HTTP object +@@ -584,6 +588,14 @@ + HTTPResponse.read_new(@socket).value + end + s.connect ++ if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE ++ begin ++ s.post_connection_check(@address) ++ rescue OpenSSL::SSL::SSLError => ex ++ raise ex if @enable_post_connection_check ++ warn ex.message ++ end ++ end + end + on_connect + end +diff -ruN ruby-1.8.6-p110.orig/lib/open-uri.rb ruby-1.8.6-p110/lib/open-uri.rb +--- ruby-1.8.6-p110.orig/lib/open-uri.rb 2007-02-13 08:01:19.000000000 +0900 ++++ ruby-1.8.6-p110/lib/open-uri.rb 2007-10-04 22:42:18.000000000 +0900 +@@ -229,6 +229,7 @@ + if target.class == URI::HTTPS + require 'net/https' + http.use_ssl = true ++ http.enable_post_connection_check = true + http.verify_mode = OpenSSL::SSL::VERIFY_PEER + store = OpenSSL::X509::Store.new + store.set_default_paths +@@ -240,16 +241,6 @@ + + resp = nil + http.start { +- if target.class == URI::HTTPS +- # xxx: information hiding violation +- sock = http.instance_variable_get(:@socket) +- if sock.respond_to?(:io) +- sock = sock.io # 1.9 +- else +- sock = sock.instance_variable_get(:@socket) # 1.8 +- end +- sock.post_connection_check(target_host) +- end + req = Net::HTTP::Get.new(request_uri, header) + if options.include? :http_basic_authentication + user, pass = options[:http_basic_authentication] +diff -ruN ruby-1.8.6-p110.orig/version.h ruby-1.8.6-p110/version.h +--- ruby-1.8.6-p110.orig/version.h 2007-09-23 09:01:50.000000000 +0900 ++++ ruby-1.8.6-p110/version.h 2007-10-04 22:42:37.000000000 +0900 +@@ -1,15 +1,15 @@ + #define RUBY_VERSION "1.8.6" +-#define RUBY_RELEASE_DATE "2007-09-23" ++#define RUBY_RELEASE_DATE "2007-09-24" + #define RUBY_VERSION_CODE 186 +-#define RUBY_RELEASE_CODE 20070923 +-#define RUBY_PATCHLEVEL 110 ++#define RUBY_RELEASE_CODE 20070924 ++#define RUBY_PATCHLEVEL 111 + + #define RUBY_VERSION_MAJOR 1 + #define RUBY_VERSION_MINOR 8 + #define RUBY_VERSION_TEENY 6 + #define RUBY_RELEASE_YEAR 2007 + #define RUBY_RELEASE_MONTH 9 +-#define RUBY_RELEASE_DAY 23 ++#define RUBY_RELEASE_DAY 24 + + #ifdef RUBY_EXTERN + RUBY_EXTERN const char ruby_version[]; diff --git a/ruby-r12567.patch b/ruby-r12567.patch deleted file mode 100644 index 0a15fc9..0000000 --- a/ruby-r12567.patch +++ /dev/null @@ -1,30 +0,0 @@ -Mon Jun 18 11:29:49 2007 Nobuyoshi Nakada - - * intern.h, ext/thread/thread.c: moved prototype of rb_thread_status() - to get rid of error in C++. [ruby-list:43615] - -Index: intern.h -=================================================================== ---- intern.h (吾с 12566) -+++ intern.h (吾с 12567) -@@ -204,7 +204,6 @@ - void rb_thread_polling _((void)); - void rb_thread_sleep _((int)); - void rb_thread_sleep_forever _((void)); --enum rb_thread_status rb_thread_status _((VALUE)); - VALUE rb_thread_stop _((void)); - VALUE rb_thread_wakeup _((VALUE)); - VALUE rb_thread_wakeup_alive _((VALUE)); -Index: ext/thread/thread.c -=================================================================== ---- ext/thread/thread.c (吾с 12566) -+++ ext/thread/thread.c (吾с 12567) -@@ -14,6 +14,8 @@ - #include - #include - -+enum rb_thread_status rb_thread_status _((VALUE)); -+ - static VALUE rb_cMutex; - static VALUE rb_cConditionVariable; - static VALUE rb_cQueue; diff --git a/ruby.spec b/ruby.spec index 1b97c49..08eb877 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %define manver 1.4.6 %define rubyxver 1.8 %define rubyver 1.8.6 -%define _patchlevel 36 +%define _patchlevel 110 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define sitedir %{_libdir}/ruby/site_ruby @@ -11,7 +11,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 4%{?dist} +Release: 1%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -36,7 +36,7 @@ Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch -Patch24: ruby-r12567.patch +Patch24: ruby-1.8.6-CVE-2007-5162.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -153,7 +153,7 @@ pushd %{name}-%{rubyver}%{?patchlevel} %patch22 -p1 %patch23 -p1 %endif -%patch24 -p0 +%patch24 -p1 popd %build @@ -471,6 +471,12 @@ rm -rf tmp-ruby-docs %endif %changelog +* Wed Oct 10 2007 Akira TAGOH - 1.8.6.110-1 +- New upstream release. + - ruby-r12567.patch: removed. +- ruby-1.8.6-CVE-2007-5162.patch: security fix for Net::HTTP that is + insufficient verification of SSL certificate. + * Thu Aug 23 2007 Akira TAGOH - 1.8.6.36-4 - Rebuild diff --git a/sources b/sources index 96dd4cd..effd85c 100644 --- a/sources +++ b/sources @@ -3,3 +3,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 eb7f25818cb6993839b38d1f21bd4ea1 ruby-1.8.6-p36.tar.bz2 +39cbf0cc610e636983cb3311bef3f2d0 ruby-1.8.6-p110.tar.bz2 From 0a1f03043b457150e1c9447fe23b0e4a83a650b2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 10 Oct 2007 02:38:06 +0000 Subject: [PATCH 103/529] *** empty log message *** --- ruby-deprecated-search-path.patch | 20 ++++++++++---------- ruby-deprecated-sitelib-search-path.patch | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ruby-deprecated-search-path.patch b/ruby-deprecated-search-path.patch index 3b937b2..aead58e 100644 --- a/ruby-deprecated-search-path.patch +++ b/ruby-deprecated-search-path.patch @@ -24,28 +24,28 @@ diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c @@ -292,11 +292,17 @@ #endif - ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB2)); + incpush(RUBY_RELATIVE(RUBY_SITE_LIB2)); +#ifdef RUBY_DEPRECATED_SITE_LIB -+ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB2)); ++ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB2)); +#endif #ifdef RUBY_SITE_THIN_ARCHLIB - ruby_incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB)); + incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB)); #endif - ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); - ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); + incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); + incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); +#ifdef RUBY_DEPRECATED_SITE_LIB -+ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB)); ++ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB)); +#endif #ifdef RUBY_DEPRECATED_OLD_SITE_LIB2 - ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); + incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); #endif @@ -308,6 +314,9 @@ #endif - ruby_incpush(RUBY_RELATIVE(RUBY_LIB)); + incpush(RUBY_RELATIVE(RUBY_LIB)); +#ifdef RUBY_DEPRECATED_LIB -+ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_LIB)); ++ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_LIB)); +#endif #ifdef RUBY_THIN_ARCHLIB - ruby_incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB)); + incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB)); #endif diff --git a/ruby-deprecated-sitelib-search-path.patch b/ruby-deprecated-sitelib-search-path.patch index ce5f2ab..5711727 100644 --- a/ruby-deprecated-sitelib-search-path.patch +++ b/ruby-deprecated-sitelib-search-path.patch @@ -23,17 +23,17 @@ diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c +++ ruby-1.8.4/ruby.c 2006-06-07 15:56:14.000000000 +0900 @@ -297,6 +297,15 @@ #endif - ruby_incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); - ruby_incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); + incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); + incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); +#ifdef RUBY_DEPRECATED_OLD_SITE_LIB2 -+ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); ++ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); +#endif +#ifdef RUBY_DEPRECATED_OLD_SITE_ARCHLIB -+ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_ARCHLIB)); ++ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_ARCHLIB)); +#endif +#ifdef RUBY_DEPRECATED_OLD_SITE_LIB -+ ruby_incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB)); ++ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB)); +#endif - ruby_incpush(RUBY_RELATIVE(RUBY_LIB)); + incpush(RUBY_RELATIVE(RUBY_LIB)); #ifdef RUBY_THIN_ARCHLIB From cc412b274d59b693c4302863f3c6ad2f58cc5a3a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 15 Oct 2007 11:46:24 +0000 Subject: [PATCH 104/529] - Enable pthread support for ppc too. (#201452) - Fix unexpected dependencies appears in ruby-libs. (#253325) --- ruby.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 08eb877..e535494 100644 --- a/ruby.spec +++ b/ruby.spec @@ -175,11 +175,7 @@ export CFLAGS --with-bundled-rmd160 \ --enable-shared \ --enable-ipv6 \ -%ifarch ppc - --disable-pthread \ -%else --enable-pthread \ -%endif --with-lookup-order-hack=INET \ --disable-rpath \ --with-ruby-prefix=%{_prefix}/lib @@ -471,6 +467,10 @@ rm -rf tmp-ruby-docs %endif %changelog +* Mon Oct 15 2007 Akira TAGOH - 1.8.6.110-2 +- Enable pthread support for ppc too. (#201452) +- Fix unexpected dependencies appears in ruby-libs. (#253325) + * Wed Oct 10 2007 Akira TAGOH - 1.8.6.110-1 - New upstream release. - ruby-r12567.patch: removed. From db165b8a66f56ff189dab682e5a9051e42d5920d Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 15 Oct 2007 11:48:04 +0000 Subject: [PATCH 105/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e535494..eacf5ae 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,7 +11,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) From 283e1d64fa5e631b34d84b431e29b79b2be1c892 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mon, 15 Oct 2007 19:21:20 +0000 Subject: [PATCH 106/529] makefile update to properly grab makefile.common --- Makefile | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a48d560..d363f5c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,21 @@ # Makefile for source rpm: ruby -# $Id$ +# $Id: Makefile,v 1.1 2004/09/09 11:54:27 cvsdist Exp $ NAME := ruby SPECFILE = $(firstword $(wildcard *.spec)) -include ../common/Makefile.common +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attempt a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) From ab1c353515fa09310cb59f32fc116a3a7c360ec2 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 29 Oct 2007 12:32:50 +0000 Subject: [PATCH 107/529] - New upstream release. - ruby-1.8.6.111-CVE-2007-5162.patch: Update a bit with backporting the changes at trunk to enable the fix without any modifications on the users' scripts. Note that Net::HTTP#enable_post_connection_check isn't available anymore. If you want to disable this post-check, you should give OpenSSL::SSL::VERIFY_NONE to Net::HTTP#verify_mode= instead of. --- .cvsignore | 1 + ruby-1.8.6-CVE-2007-5162.patch | 99 ------------------------------ ruby-1.8.6.111-CVE-2007-5162.patch | 97 +++++++++++++++++++++++++++++ ruby.spec | 18 +++--- sources | 3 +- 5 files changed, 110 insertions(+), 108 deletions(-) delete mode 100644 ruby-1.8.6-CVE-2007-5162.patch create mode 100644 ruby-1.8.6.111-CVE-2007-5162.patch diff --git a/.cvsignore b/.cvsignore index 99e711a..f855092 100644 --- a/.cvsignore +++ b/.cvsignore @@ -15,3 +15,4 @@ ruby-1.8.5-p12.tar.gz ruby-1.8.6.tar.bz2 ruby-1.8.6-p36.tar.bz2 ruby-1.8.6-p110.tar.bz2 +ruby-1.8.6-p111.tar.bz2 diff --git a/ruby-1.8.6-CVE-2007-5162.patch b/ruby-1.8.6-CVE-2007-5162.patch deleted file mode 100644 index d4e4d68..0000000 --- a/ruby-1.8.6-CVE-2007-5162.patch +++ /dev/null @@ -1,99 +0,0 @@ -diff -ruN ruby-1.8.6-p110.orig/ext/openssl/lib/openssl/ssl.rb ruby-1.8.6-p110/ext/openssl/lib/openssl/ssl.rb ---- ruby-1.8.6-p110.orig/ext/openssl/lib/openssl/ssl.rb 2007-02-13 08:01:19.000000000 +0900 -+++ ruby-1.8.6-p110/ext/openssl/lib/openssl/ssl.rb 2007-10-04 22:38:48.000000000 +0900 -@@ -88,7 +88,7 @@ - end - } - end -- raise SSLError, "hostname not match" -+ raise SSLError, "hostname not match with the server certificate" - end - end - -diff -ruN ruby-1.8.6-p110.orig/lib/net/http.rb ruby-1.8.6-p110/lib/net/http.rb ---- ruby-1.8.6-p110.orig/lib/net/http.rb 2007-02-13 08:01:19.000000000 +0900 -+++ ruby-1.8.6-p110/lib/net/http.rb 2007-10-04 22:41:34.000000000 +0900 -@@ -470,6 +470,7 @@ - @debug_output = nil - @use_ssl = false - @ssl_context = nil -+ @enable_post_connection_check = true - end - - def inspect -@@ -526,6 +527,9 @@ - false # redefined in net/https - end - -+ # specify enabling SSL server certificate and hostname checking. -+ attr_accessor :enable_post_connection_check -+ - # Opens TCP connection and HTTP session. - # - # When this method is called with block, gives a HTTP object -@@ -584,6 +588,14 @@ - HTTPResponse.read_new(@socket).value - end - s.connect -+ if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE -+ begin -+ s.post_connection_check(@address) -+ rescue OpenSSL::SSL::SSLError => ex -+ raise ex if @enable_post_connection_check -+ warn ex.message -+ end -+ end - end - on_connect - end -diff -ruN ruby-1.8.6-p110.orig/lib/open-uri.rb ruby-1.8.6-p110/lib/open-uri.rb ---- ruby-1.8.6-p110.orig/lib/open-uri.rb 2007-02-13 08:01:19.000000000 +0900 -+++ ruby-1.8.6-p110/lib/open-uri.rb 2007-10-04 22:42:18.000000000 +0900 -@@ -229,6 +229,7 @@ - if target.class == URI::HTTPS - require 'net/https' - http.use_ssl = true -+ http.enable_post_connection_check = true - http.verify_mode = OpenSSL::SSL::VERIFY_PEER - store = OpenSSL::X509::Store.new - store.set_default_paths -@@ -240,16 +241,6 @@ - - resp = nil - http.start { -- if target.class == URI::HTTPS -- # xxx: information hiding violation -- sock = http.instance_variable_get(:@socket) -- if sock.respond_to?(:io) -- sock = sock.io # 1.9 -- else -- sock = sock.instance_variable_get(:@socket) # 1.8 -- end -- sock.post_connection_check(target_host) -- end - req = Net::HTTP::Get.new(request_uri, header) - if options.include? :http_basic_authentication - user, pass = options[:http_basic_authentication] -diff -ruN ruby-1.8.6-p110.orig/version.h ruby-1.8.6-p110/version.h ---- ruby-1.8.6-p110.orig/version.h 2007-09-23 09:01:50.000000000 +0900 -+++ ruby-1.8.6-p110/version.h 2007-10-04 22:42:37.000000000 +0900 -@@ -1,15 +1,15 @@ - #define RUBY_VERSION "1.8.6" --#define RUBY_RELEASE_DATE "2007-09-23" -+#define RUBY_RELEASE_DATE "2007-09-24" - #define RUBY_VERSION_CODE 186 --#define RUBY_RELEASE_CODE 20070923 --#define RUBY_PATCHLEVEL 110 -+#define RUBY_RELEASE_CODE 20070924 -+#define RUBY_PATCHLEVEL 111 - - #define RUBY_VERSION_MAJOR 1 - #define RUBY_VERSION_MINOR 8 - #define RUBY_VERSION_TEENY 6 - #define RUBY_RELEASE_YEAR 2007 - #define RUBY_RELEASE_MONTH 9 --#define RUBY_RELEASE_DAY 23 -+#define RUBY_RELEASE_DAY 24 - - #ifdef RUBY_EXTERN - RUBY_EXTERN const char ruby_version[]; diff --git a/ruby-1.8.6.111-CVE-2007-5162.patch b/ruby-1.8.6.111-CVE-2007-5162.patch new file mode 100644 index 0000000..5ed628d --- /dev/null +++ b/ruby-1.8.6.111-CVE-2007-5162.patch @@ -0,0 +1,97 @@ +diff -pruN ruby-1.8.6-p111.orig/ext/openssl/lib/net/ftptls.rb ruby-1.8.6-p111/ext/openssl/lib/net/ftptls.rb +--- ruby-1.8.6-p111.orig/ext/openssl/lib/net/ftptls.rb 2007-02-13 08:01:19.000000000 +0900 ++++ ruby-1.8.6-p111/ext/openssl/lib/net/ftptls.rb 2007-10-29 21:10:24.000000000 +0900 +@@ -29,13 +29,23 @@ require 'net/ftp' + + module Net + class FTPTLS < FTP ++ def connect(host, port=FTP_PORT) ++ @hostname = host ++ super ++ end ++ + def login(user = "anonymous", passwd = nil, acct = nil) ++ store = OpenSSL::X509::Store.new ++ store.set_default_paths + ctx = OpenSSL::SSL::SSLContext.new('SSLv23') ++ ctx.cert_store = store ++ ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER + ctx.key = nil + ctx.cert = nil + voidcmd("AUTH TLS") + @sock = OpenSSL::SSL::SSLSocket.new(@sock, ctx) + @sock.connect ++ @sock.post_connection_check(@hostname) + super(user, passwd, acct) + voidcmd("PBSZ 0") + end +diff -pruN ruby-1.8.6-p111.orig/ext/openssl/lib/net/telnets.rb ruby-1.8.6-p111/ext/openssl/lib/net/telnets.rb +--- ruby-1.8.6-p111.orig/ext/openssl/lib/net/telnets.rb 2007-02-13 08:01:19.000000000 +0900 ++++ ruby-1.8.6-p111/ext/openssl/lib/net/telnets.rb 2007-10-29 21:13:03.000000000 +0900 +@@ -134,6 +134,9 @@ module Net + @sock.verify_callback = @options['VerifyCallback'] + @sock.verify_depth = @options['VerifyDepth'] + @sock.connect ++ if @options['VerifyMode'] != OpenSSL::SSL::VERIFY_NONE ++ @sock.post_connection_check(@options['Host']) ++ end + @ssl = true + end + '' +diff -pruN ruby-1.8.6-p111.orig/lib/net/http.rb ruby-1.8.6-p111/lib/net/http.rb +--- ruby-1.8.6-p111.orig/lib/net/http.rb 2007-09-24 17:12:24.000000000 +0900 ++++ ruby-1.8.6-p111/lib/net/http.rb 2007-10-29 21:12:12.000000000 +0900 +@@ -470,7 +470,6 @@ module Net #:nodoc: + @debug_output = nil + @use_ssl = false + @ssl_context = nil +- @enable_post_connection_check = false + end + + def inspect +@@ -527,9 +526,6 @@ module Net #:nodoc: + false # redefined in net/https + end + +- # specify enabling SSL server certificate and hostname checking. +- attr_accessor :enable_post_connection_check +- + # Opens TCP connection and HTTP session. + # + # When this method is called with block, gives a HTTP object +@@ -589,12 +585,7 @@ module Net #:nodoc: + end + s.connect + if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE +- begin +- s.post_connection_check(@address) +- rescue OpenSSL::SSL::SSLError => ex +- raise ex if @enable_post_connection_check +- warn ex.message +- end ++ s.post_connection_check(@address) + end + end + on_connect +diff -pruN ruby-1.8.6-p111.orig/lib/net/imap.rb ruby-1.8.6-p111/lib/net/imap.rb +--- ruby-1.8.6-p111.orig/lib/net/imap.rb 2007-08-22 08:28:09.000000000 +0900 ++++ ruby-1.8.6-p111/lib/net/imap.rb 2007-10-29 21:14:38.000000000 +0900 +@@ -900,6 +900,7 @@ module Net + end + @sock = SSLSocket.new(@sock, context) + @sock.connect # start ssl session. ++ @sock.post_connection_check(@host) if verify + else + @usessl = false + end +diff -pruN ruby-1.8.6-p111.orig/lib/open-uri.rb ruby-1.8.6-p111/lib/open-uri.rb +--- ruby-1.8.6-p111.orig/lib/open-uri.rb 2007-09-24 17:12:24.000000000 +0900 ++++ ruby-1.8.6-p111/lib/open-uri.rb 2007-10-29 21:16:03.000000000 +0900 +@@ -229,7 +229,6 @@ module OpenURI + if target.class == URI::HTTPS + require 'net/https' + http.use_ssl = true +- http.enable_post_connection_check = true + http.verify_mode = OpenSSL::SSL::VERIFY_PEER + store = OpenSSL::X509::Store.new + store.set_default_paths diff --git a/ruby.spec b/ruby.spec index eacf5ae..f9e8ae8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %define manver 1.4.6 %define rubyxver 1.8 %define rubyver 1.8.6 -%define _patchlevel 110 +%define _patchlevel 111 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define sitedir %{_libdir}/ruby/site_ruby @@ -11,7 +11,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 1%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -36,7 +36,7 @@ Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch -Patch24: ruby-1.8.6-CVE-2007-5162.patch +Patch24: ruby-1.8.6.111-CVE-2007-5162.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -180,10 +180,6 @@ export CFLAGS --disable-rpath \ --with-ruby-prefix=%{_prefix}/lib -%ifarch ppc -cp Makefile Makefile.orig -sed -e 's/^EXTMK_ARGS[[:space:]].*=\(.*\) --$/EXTMK_ARGS=\1 --disable-tcl-thread --/' Makefile.orig > Makefile -%endif make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} %ifarch ia64 # Miscompilation? Buggy code? @@ -467,6 +463,14 @@ rm -rf tmp-ruby-docs %endif %changelog +* Mon Oct 29 2007 Akira TAGOH - 1.8.6.111-1 +- New upstream release. +- ruby-1.8.6.111-CVE-2007-5162.patch: Update a bit with backporting the changes + at trunk to enable the fix without any modifications on the users' scripts. + Note that Net::HTTP#enable_post_connection_check isn't available anymore. + If you want to disable this post-check, you should give OpenSSL::SSL::VERIFY_NONE + to Net::HTTP#verify_mode= instead of. + * Mon Oct 15 2007 Akira TAGOH - 1.8.6.110-2 - Enable pthread support for ppc too. (#201452) - Fix unexpected dependencies appears in ruby-libs. (#253325) diff --git a/sources b/sources index effd85c..840df49 100644 --- a/sources +++ b/sources @@ -2,5 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 -eb7f25818cb6993839b38d1f21bd4ea1 ruby-1.8.6-p36.tar.bz2 -39cbf0cc610e636983cb3311bef3f2d0 ruby-1.8.6-p110.tar.bz2 +e1d38b7d4f1be55726d6927a3395ce3b ruby-1.8.6-p111.tar.bz2 From 37698a63cde4cf3032cd1634218e52f9034eef5e Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 31 Oct 2007 07:35:06 +0000 Subject: [PATCH 108/529] - Fix the dead link. --- ruby.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index f9e8ae8..1eb1c61 100644 --- a/ruby.spec +++ b/ruby.spec @@ -20,10 +20,11 @@ BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel gli BuildRequires: emacs %endif -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{name}-%{rubyver}%{?patchlevel}.tar.bz2 +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{rubyver}%{?patchlevel}.tar.bz2 ##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz Source1: %{name}-man-%{manver}.tar.bz2 -Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz +##Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz +Source2: %{name}-refm-rdp-1.8.1-ja-html.tar.gz ##Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz Source3: rubyfaq-990927.tar.bz2 ##Source4: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz @@ -463,6 +464,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Wed Oct 31 2007 Akira TAGOH +- Fix the dead link. + * Mon Oct 29 2007 Akira TAGOH - 1.8.6.111-1 - New upstream release. - ruby-1.8.6.111-CVE-2007-5162.patch: Update a bit with backporting the changes From b4cc79c19e1bb0ad7da141c4543eec814233d6d6 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 4 Dec 2007 22:45:03 +0000 Subject: [PATCH 109/529] - Rebuild for openssl bump --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 1eb1c61..e92ff59 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,7 +11,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -464,6 +464,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Tue Dec 04 2007 Release Engineering - %{rubyver}%{?dotpatchlevel}-2 + - Rebuild for openssl bump + * Wed Oct 31 2007 Akira TAGOH - Fix the dead link. From 81fc3c36d59866aac8c724f7b8331e404c01cb82 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 21 Dec 2007 12:30:55 +0000 Subject: [PATCH 110/529] - Clean up the spec file. - Remove ruby-man-1.4.6 stuff. this is entirely the out-dated document. this could be replaced by ri. - Disable the static library building. --- .cvsignore | 2 + ruby.spec | 344 ++++++++++++++++++++++++++++++----------------------- 2 files changed, 200 insertions(+), 146 deletions(-) diff --git a/.cvsignore b/.cvsignore index f855092..0e480f7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -4,6 +4,8 @@ ruby-refm-rdp-1.8.1-ja-html.tar.gz rubyfaq-990927.tar.bz2 rubyfaq-jp-990927.tar.bz2 *.rpm +*.gz +*.bz2 ruby-1.8.2.tar.gz ruby-1.8.3.tar.gz ruby-1.8.4-preview1.tar.gz diff --git a/ruby.spec b/ruby.spec index e92ff59..41adfd5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -4,14 +4,16 @@ %define _patchlevel 111 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} +%define arcver %{rubyver}%{?patchlevel} %define sitedir %{_libdir}/ruby/site_ruby # This is required to ensure that noarch files puts under /usr/lib/... for # multilib because ruby library is installed under /usr/{lib,lib64}/ruby anyway. %define sitedir2 %{_prefix}/lib/ruby/site_ruby +%define _normalized_cpu %(echo `echo %{_target_cpu} | sed 's/^ppc/powerpc/'`) Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -20,16 +22,14 @@ BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel gli BuildRequires: emacs %endif -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{rubyver}%{?patchlevel}.tar.bz2 -##Source1: ftp://ftp.ruby-lang.org/pub/%{name}/doc/%{name}-man-%{manver}.tar.gz -Source1: %{name}-man-%{manver}.tar.bz2 -##Source2: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz -Source2: %{name}-refm-rdp-1.8.1-ja-html.tar.gz -##Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz -Source3: rubyfaq-990927.tar.bz2 -##Source4: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz -Source4: rubyfaq-jp-990927.tar.bz2 -Source5: irb.1 +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{arcver}.tar.bz2 +##Source1: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz +Source1: %{name}-refm-rdp-1.8.1-ja-html.tar.gz +##Source2: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz +Source2: rubyfaq-990927.tar.bz2 +##Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz +Source3: rubyfaq-jp-990927.tar.bz2 +Source4: irb.1 Source10: ruby-mode-init.el Patch1: ruby-deadcode.patch @@ -141,12 +141,12 @@ along with a list of the methods the class or module implements. %prep -%setup -q -c -a 1 -a 3 -a 4 +%setup -q -c -a 2 -a 3 mkdir -p ruby-refm-ja pushd ruby-refm-ja -tar fxz %{SOURCE2} +tar fxz %{SOURCE1} popd -pushd %{name}-%{rubyver}%{?patchlevel} +pushd %{name}-%{arcver} %patch1 -p1 %patch20 -p1 %patch21 -p1 @@ -158,7 +158,7 @@ pushd %{name}-%{rubyver}%{?patchlevel} popd %build -pushd %{name}-%{rubyver}%{?patchlevel} +pushd %{name}-%{arcver} for i in config.sub config.guess; do test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i . done @@ -191,7 +191,7 @@ make OPT=-O0 RUBY_INSTALL_NAME=ruby %{?_smp_mflags} popd %check -pushd %{name}-%{rubyver}%{?patchlevel} +pushd %{name}-%{arcver} %ifnarch ppc64 make test %endif @@ -203,8 +203,6 @@ rm -rf $RPM_BUILD_ROOT %ifnarch ppc64 %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode %{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d -#%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/ruby-mode -#%{__mkdir_p} $RPM_BUILD_ROOT%{_libdir}/xemacs/xemacs-packages/lisp/site-start.d %endif # installing documents and exapmles... @@ -214,14 +212,14 @@ cd tmp-ruby-docs # for ruby.rpm mkdir ruby ruby-libs ruby-devel ruby-tcltk ruby-docs irb cd ruby -(cd ../../%{name}-%{rubyver}%{?patchlevel} && tar cf - sample) | tar xvf - +(cd ../../%{name}-%{arcver} && tar cf - sample) | tar xvf - cd .. # for ruby-libs cd ruby-libs -(cd ../../%{name}-%{rubyver}%{?patchlevel} && tar cf - lib/README*) | tar xvf - -(cd ../../%{name}-%{rubyver}%{?patchlevel}/doc && tar cf - .) | tar xvf - -(cd ../../%{name}-%{rubyver}%{?patchlevel} && +(cd ../../%{name}-%{arcver} && tar cf - lib/README*) | tar xvf - +(cd ../../%{name}-%{arcver}/doc && tar cf - .) | tar xvf - +(cd ../../%{name}-%{arcver} && tar cf - `find ext \ -mindepth 1 \ \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ @@ -253,8 +251,7 @@ cd .. # for ruby-docs cd ruby-docs -mkdir doc-en refm-ja faq-en faq-ja -(cd ../../ruby-man-`echo %{manver} | sed -e 's/\.[0-9]*$//'` && tar cf - .) | (cd doc-en && tar xvf -) +mkdir refm-ja faq-en faq-ja (cd ../../ruby-refm-ja && tar cf - .) | (cd refm-ja && tar xvf -) (cd ../../rubyfaq && tar cf - .) | (cd faq-en && tar xvf -) (cd ../../rubyfaq-jp && tar cf - .) | (cd faq-ja && tar xvf -) @@ -266,15 +263,12 @@ mkdir doc-en refm-ja faq-en faq-ja < $f > `echo $f | sed -e's/-jp//'` rm -f $f; \ done) -# make sure that all doc files are the world-readable -find -type f | xargs chmod 0644 - cd .. # fixing `#!' paths for f in `find . -type f` do - sed -e 's,^#![ ]*\([^ ]*\)/\(ruby\|with\|perl\|env\),#!/usr/bin/\2,' < $f > $f.n + sed -e 's,^#![ ]*\([^ ]*\)/\(ruby\|wish\|perl\|env\),#!/usr/bin/\2,' < $f > $f.n if ! cmp $f $f.n then mv -f $f.n $f @@ -283,34 +277,44 @@ do fi done +# make sure that all doc files are the world-readable +find -type f | xargs chmod 0644 + +# convert to utf-8 +for i in `find -type f`; do + iconv -f utf-8 -t utf-8 $i > /dev/null 2>&1 || (iconv -f euc-jp -t utf-8 $i > $i.new && mv $i.new $i || exit 1) + if [ $? != 0 ]; then + iconv -f iso8859-1 -t utf-8 $i > $.new && mv $i.new $i || exit 1 + fi + if [ -f $i.new ]; then + echo "Failed to convert with iconv." + exit 1 + fi +done + # done cd .. # installing binaries ... -make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{rubyver}%{?patchlevel} DESTDIR=$RPM_BUILD_ROOT install +make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} DESTDIR=$RPM_BUILD_ROOT install -_cpu=`echo %{_target_cpu} | sed 's/^ppc/powerpc/'` +# remove the static library +rm $RPM_BUILD_ROOT%{_libdir}/libruby-static.a # generate ri doc -rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{rubyver}%{?patchlevel} -LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} RUBYLIB=$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}:$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os} make -C $rubybuilddir DESTDIR=$RPM_BUILD_ROOT install-doc -#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $rubybuilddir -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -I $rubybuilddir/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $rubybuilddir +rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} +LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} RUBYLIB=$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}:$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} make -C $rubybuilddir DESTDIR=$RPM_BUILD_ROOT install-doc +#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $rubybuilddir -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/ -I $rubybuilddir/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $rubybuilddir %{__mkdir_p} $RPM_BUILD_ROOT%{sitedir2}/%{rubyxver} -%{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/$_cpu-%{_target_os} - -%ifarch ppc64 s390x sparc64 x86_64 -# correct archdir -#mv $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os}/* $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/$_cpu-%{_target_os}/ -#rmdir $RPM_BUILD_ROOT%{_prefix}/lib/ruby/%{rubyxver}/$_cpu-%{_target_os} -%endif +%{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} # XXX: installing irb -install -m 0644 %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/ +install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/ %ifnarch ppc64 # installing ruby-mode -cd %{name}-%{rubyver}%{?patchlevel} +cd %{name}-%{arcver} cp misc/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode ## for ruby-mode @@ -327,144 +331,192 @@ install -m 644 %{SOURCE10} \ cd .. %endif -# listing all files in ruby-all.files -(find $RPM_BUILD_ROOT -type f -o -type l) | - sort | uniq | sed -e "s,^$RPM_BUILD_ROOT,," \ - -e "s,\(/man/man./.*\)$,\1*," > ruby-all.files -egrep '(\.[ah]|libruby\.so)$' ruby-all.files > ruby-devel.files - -_rubytmpfile=`mktemp -t %{name}-%{version}-%{release}-tmp-%(%{__id_u -n}).XXXXXXXXXX` -# for ruby-tcltk.rpm -cp /dev/null ruby-tcltk.files -for f in `find %{name}-%{rubyver}%{?patchlevel}/ext/tk/lib -type f; find %{name}-%{rubyver}%{?patchlevel}/.ext -type f -name '*.so'; find %{name}-%{rubyver}%{?patchlevel}/ext/tk -type f -name '*.so'` -do - egrep "tcl|tk" ruby-all.files | grep "/`basename $f`$" >> ruby-tcltk.files || : +# remove shebang +for i in $RPM_BUILD_ROOT%{_prefix}/lib/ruby/1.8/{abbrev,generator,irb/{cmd/subirb,ext/save-history},matrix,rdoc/{markup/sample/rdoc2latex,parsers/parse_rb},set,tsort}.rb; do + sed -i -e '/#![ ]*/{D}' $i done -sort ruby-tcltk.files | uniq - $_rubytmpfile && mv $_rubytmpfile ruby-tcltk.files - -# for irb.rpm -fgrep 'irb' ruby-all.files > irb.files - -# for ri -cp /dev/null ri.files -fgrep '%{_datadir}/ri' ruby-all.files >> ri.files -fgrep '%{_bindir}/ri' ruby-all.files >> ri.files - -# for rdoc -cp /dev/null rdoc.files -fgrep rdoc ruby-all.files >> rdoc.files - -# for ruby-libs -cp /dev/null ruby-libs.files -(fgrep '%{_prefix}/lib' ruby-all.files; - fgrep -h '%{_prefix}/lib' ruby-devel.files ruby-tcltk.files irb.files ri.files rdoc.files) | egrep -v "elc?$" | \ - sort | uniq -u > ruby-libs.files - -%ifnarch ppc64 -# for ruby-mode -cp /dev/null ruby-mode.files -fgrep '.el' ruby-all.files >> ruby-mode.files -%else -touch ruby-mode.files -%endif - -# for ruby.rpm -sort ruby-all.files \ - ruby-libs.files ruby-devel.files ruby-tcltk.files irb.files ruby-mode.files ri.files rdoc.files | - uniq -u > ruby.files - -# for arch-dependent dir -rbconfig=`find $RPM_BUILD_ROOT -name rbconfig.rb` -export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} -arch=`$RPM_BUILD_ROOT%{_bindir}/ruby -r $rbconfig -e 'printf ("%s\n", Config::CONFIG["arch"])'` -cat <<__EOF__ >> ruby-libs.files -%%dir %%{_libdir}/ruby/%%{rubyxver}/$arch -%%dir %%{_libdir}/ruby/%%{rubyxver}/$arch/digest -__EOF__ %clean rm -rf $RPM_BUILD_ROOT -rm -f *.files rm -rf tmp-ruby-docs %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig -%files -f ruby.files -%defattr(-, root, root) -%doc %{name}-%{rubyver}%{?patchlevel}/COPYING* -%doc %{name}-%{rubyver}%{?patchlevel}/ChangeLog -%doc %{name}-%{rubyver}%{?patchlevel}/GPL -%doc %{name}-%{rubyver}%{?patchlevel}/LEGAL -%doc %{name}-%{rubyver}%{?patchlevel}/LGPL -%doc %{name}-%{rubyver}%{?patchlevel}/NEWS -%doc %{name}-%{rubyver}%{?patchlevel}/README -%lang(ja) %doc %{name}-%{rubyver}%{?patchlevel}/README.ja -%doc %{name}-%{rubyver}%{?patchlevel}/ToDo -%doc %{name}-%{rubyver}%{?patchlevel}/doc/ChangeLog-1.8.0 -%doc %{name}-%{rubyver}%{?patchlevel}/doc/NEWS-1.8.0 +%files +%defattr(-, root, root, -) +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%doc %{name}-%{arcver}/NEWS +%doc %{name}-%{arcver}/README +%lang(ja) %doc %{name}-%{arcver}/README.ja +%doc %{name}-%{arcver}/ToDo +%doc %{name}-%{arcver}/doc/ChangeLog-1.8.0 +%doc %{name}-%{arcver}/doc/NEWS-1.8.0 %doc tmp-ruby-docs/ruby/* +%{_bindir}/ruby +%{_bindir}/erb +%{_bindir}/testrb +%{_mandir}/man1/ruby.1* -%files devel -f ruby-devel.files -%defattr(-, root, root) -%doc %{name}-%{rubyver}%{?patchlevel}/README.EXT -%lang(ja) %doc %{name}-%{rubyver}%{?patchlevel}/README.EXT.ja +%files devel +%defattr(-, root, root, -) +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%doc %{name}-%{arcver}/README.EXT +%lang(ja) %doc %{name}-%{arcver}/README.EXT.ja +%{_libdir}/libruby.so +%{_libdir}/ruby/%{rubyxver}/*/*.h -%files libs -f ruby-libs.files -%defattr(-, root, root) -%doc %{name}-%{rubyver}%{?patchlevel}/README -%lang(ja) %doc %{name}-%{rubyver}%{?patchlevel}/README.ja -%doc %{name}-%{rubyver}%{?patchlevel}/COPYING* -%doc %{name}-%{rubyver}%{?patchlevel}/ChangeLog -%doc %{name}-%{rubyver}%{?patchlevel}/GPL -%doc %{name}-%{rubyver}%{?patchlevel}/LEGAL -%doc %{name}-%{rubyver}%{?patchlevel}/LGPL +%files libs +%defattr(-, root, root, -) +%doc %{name}-%{arcver}/README +%lang(ja) %doc %{name}-%{arcver}/README.ja +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL %dir %{_libdir}/ruby %dir %{_prefix}/lib/ruby %dir %{_libdir}/ruby/%{rubyxver} %dir %{_prefix}/lib/ruby/%{rubyxver} -%dir %{_prefix}/lib/ruby/%{rubyxver}/cgi -%dir %{_prefix}/lib/ruby/%{rubyxver}/net -%dir %{_prefix}/lib/ruby/%{rubyxver}/shell -%dir %{_prefix}/lib/ruby/%{rubyxver}/uri +%dir %{_libdir}/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} %{sitedir} %{sitedir2} +## the following files should goes into ruby-tcltk package. +%exclude %{_prefix}/lib/ruby/%{rubyxver}/*tk.rb +%exclude %{_prefix}/lib/ruby/%{rubyxver}/tcltk.rb +%exclude %{_prefix}/lib/ruby/%{rubyxver}/tk +%exclude %{_prefix}/lib/ruby/%{rubyxver}/tk*.rb +%exclude %{_prefix}/lib/ruby/%{rubyxver}/tkextlib +%exclude %{_libdir}/ruby/%{rubyxver}/*/tcltklib.so +%exclude %{_libdir}/ruby/%{rubyxver}/*/tkutil.so +## the following files should goes into ruby-rdoc package. +%exclude %{_prefix}/lib/ruby/%{rubyxver}/rdoc +## the following files should goes into ruby-irb package. +%exclude %{_prefix}/lib/ruby/%{rubyxver}/irb.rb +%exclude %{_prefix}/lib/ruby/%{rubyxver}/irb +## files in ruby-libs from here +%{_prefix}/lib/ruby/%{rubyxver}/*.rb +%{_prefix}/lib/ruby/%{rubyxver}/bigdecimal +%{_prefix}/lib/ruby/%{rubyxver}/cgi +%{_prefix}/lib/ruby/%{rubyxver}/date +%{_prefix}/lib/ruby/%{rubyxver}/digest +%{_prefix}/lib/ruby/%{rubyxver}/dl +%{_prefix}/lib/ruby/%{rubyxver}/drb +%{_prefix}/lib/ruby/%{rubyxver}/io +%{_prefix}/lib/ruby/%{rubyxver}/net +%{_prefix}/lib/ruby/%{rubyxver}/openssl +%{_prefix}/lib/ruby/%{rubyxver}/optparse +%{_prefix}/lib/ruby/%{rubyxver}/racc +%{_prefix}/lib/ruby/%{rubyxver}/rexml +%{_prefix}/lib/ruby/%{rubyxver}/rinda +%{_prefix}/lib/ruby/%{rubyxver}/rss +%{_prefix}/lib/ruby/%{rubyxver}/runit +%{_prefix}/lib/ruby/%{rubyxver}/shell +%{_prefix}/lib/ruby/%{rubyxver}/soap +%{_prefix}/lib/ruby/%{rubyxver}/test +%{_prefix}/lib/ruby/%{rubyxver}/uri +%{_prefix}/lib/ruby/%{rubyxver}/webrick +%{_prefix}/lib/ruby/%{rubyxver}/wsdl +%{_prefix}/lib/ruby/%{rubyxver}/xmlrpc +%{_prefix}/lib/ruby/%{rubyxver}/xsd +%{_prefix}/lib/ruby/%{rubyxver}/yaml +%{_libdir}/libruby.so.* +%{_libdir}/ruby/%{rubyxver}/*/*.so +%{_libdir}/ruby/%{rubyxver}/*/digest +%{_libdir}/ruby/%{rubyxver}/*/io +%{_libdir}/ruby/%{rubyxver}/*/racc +%{_libdir}/ruby/%{rubyxver}/*/rbconfig.rb -%files tcltk -f ruby-tcltk.files -%defattr(-, root, root) +%files tcltk +%defattr(-, root, root, -) +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL %doc tmp-ruby-docs/ruby-tcltk/ext/* +%{_prefix}/lib/ruby/%{rubyxver}/*-tk.rb +%{_prefix}/lib/ruby/%{rubyxver}/tcltk.rb +%{_prefix}/lib/ruby/%{rubyxver}/tk +%{_prefix}/lib/ruby/%{rubyxver}/tk*.rb +%{_prefix}/lib/ruby/%{rubyxver}/tkextlib +%{_libdir}/ruby/%{rubyxver}/*/tcltklib.so +%{_libdir}/ruby/%{rubyxver}/*/tkutil.so -%files rdoc -f rdoc.files -%defattr(-, root, root) -%dir %{_libdir}/ruby -%dir %{_libdir}/ruby/%{rubyxver} +%files rdoc +%defattr(-, root, root, -) +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%{_bindir}/rdoc +%{_prefix}/lib/ruby/%{rubyxver}/rdoc -%files irb -f irb.files -%defattr(-, root, root) +%files irb +%defattr(-, root, root, -) +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL %doc tmp-ruby-docs/irb/* -%dir %{_prefix}/lib/ruby/%{rubyxver}/irb -%dir %{_prefix}/lib/ruby/%{rubyxver}/irb/lc -%dir %{_prefix}/lib/ruby/%{rubyxver}/irb/lc/ja +%{_bindir}/irb +%{_prefix}/lib/ruby/%{rubyxver}/irb.rb +%{_prefix}/lib/ruby/%{rubyxver}/irb +%{_mandir}/man1/irb.1* -%files ri -f ri.files -%defattr(-, root, root) -%dir %{_datadir}/ri +%files ri +%defattr(-, root, root, -) +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%{_bindir}/ri +%{_datadir}/ri %files docs -%defattr(-, root, root) +%defattr(-, root, root, -) +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL %doc tmp-ruby-docs/ruby-docs/* %doc tmp-ruby-docs/ruby-libs/* %ifnarch ppc64 -%files mode -f ruby-mode.files -%defattr(-, root, root) -%doc %{name}-%{rubyver}%{?patchlevel}/misc/README -%dir %{_datadir}/emacs/site-lisp/ruby-mode +%files mode +%defattr(-, root, root, -) +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%doc %{name}-%{arcver}/misc/README +%{_datadir}/emacs/site-lisp/ruby-mode +%{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %endif %changelog -* Tue Dec 04 2007 Release Engineering - %{rubyver}%{?dotpatchlevel}-2 +* Fri Dec 21 2007 Akira TAGOH - 1.8.6.111-3 +- Clean up the spec file. +- Remove ruby-man-1.4.6 stuff. this is entirely the out-dated document. + this could be replaced by ri. +- Disable the static library building. + +* Tue Dec 04 2007 Release Engineering - 1.8.6.111-2 - Rebuild for openssl bump * Wed Oct 31 2007 Akira TAGOH From 3646e24c14ec1505d6c3f1696b44dffb3ad138f6 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 28 Dec 2007 02:42:45 +0000 Subject: [PATCH 111/529] - Clean up again. --- .cvsignore | 2 ++ ruby.spec | 59 ++++++++++++++++++++++++++++-------------------------- sources | 4 ++-- 3 files changed, 35 insertions(+), 30 deletions(-) diff --git a/.cvsignore b/.cvsignore index 0e480f7..eeb7cc6 100644 --- a/.cvsignore +++ b/.cvsignore @@ -18,3 +18,5 @@ ruby-1.8.6.tar.bz2 ruby-1.8.6-p36.tar.bz2 ruby-1.8.6-p110.tar.bz2 ruby-1.8.6-p111.tar.bz2 +rubyfaq-990927.tar.gz +rubyfaq-jp-990927.tar.gz diff --git a/ruby.spec b/ruby.spec index 41adfd5..88c5805 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,4 +1,3 @@ -%define manver 1.4.6 %define rubyxver 1.8 %define rubyver 1.8.6 %define _patchlevel 111 @@ -13,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 4%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -23,12 +22,11 @@ BuildRequires: emacs %endif Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{arcver}.tar.bz2 +## Dead link ##Source1: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz Source1: %{name}-refm-rdp-1.8.1-ja-html.tar.gz -##Source2: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz -Source2: rubyfaq-990927.tar.bz2 -##Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz -Source3: rubyfaq-jp-990927.tar.bz2 +Source2: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz +Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz Source4: irb.1 Source10: ruby-mode-init.el @@ -95,7 +93,8 @@ from the terminal. %package rdoc Summary: A tool to generate documentation from Ruby source files Group: Development/Languages -Requires: %{name} = %{version}-%{release} +## ruby-irb requires ruby +#Requires: %{name} = %{version}-%{release} Requires: %{name}-irb = %{version}-%{release} Provides: rdoc = %{version}-%{release} Obsoletes: rdoc <= %{version}-%{release} @@ -128,7 +127,8 @@ Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. %package ri Summary: Ruby interactive reference Group: Documentation -Requires: %{name} = %{version}-%{release} +## ruby-irb requires ruby, which ruby-rdoc requires +#Requires: %{name} = %{version}-%{release} Requires: %{name}-rdoc = %{version}-%{release} Provides: ri = %{version}-%{release} Obsoletes: ri <= %{version}-%{release} @@ -181,7 +181,7 @@ export CFLAGS --disable-rpath \ --with-ruby-prefix=%{_prefix}/lib -make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} +make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} COPY="cp -p" %{?_smp_mflags} %ifarch ia64 # Miscompilation? Buggy code? rm -f parse.o @@ -201,11 +201,12 @@ popd rm -rf $RPM_BUILD_ROOT %ifnarch ppc64 -%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode -%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d +mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode +mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d %endif # installing documents and exapmles... +rm -rf tmp-ruby-docs mkdir tmp-ruby-docs cd tmp-ruby-docs @@ -217,14 +218,14 @@ cd .. # for ruby-libs cd ruby-libs -(cd ../../%{name}-%{arcver} && tar cf - lib/README*) | tar xvf - -(cd ../../%{name}-%{arcver}/doc && tar cf - .) | tar xvf - +(cd ../../%{name}-%{arcver} && tar cf - lib/README*) | tar xf - +(cd ../../%{name}-%{arcver}/doc && tar cf - .) | tar xf - (cd ../../%{name}-%{arcver} && tar cf - `find ext \ -mindepth 1 \ \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ \( -name '*.rb' -not -path '*/lib/*' -not -name extconf.rb \) -o \ - \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \)`) | tar xvf - + \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \)`) | tar xf - cd .. # for irb @@ -243,7 +244,7 @@ cd ruby-tcltk for target in tcltklib tk do (cd ../ruby-libs && - tar cf - `find . -path "*/$target/*"`) | tar xvf - + tar cf - `find . -path "*/$target/*"`) | tar xf - (cd ../ruby-libs && rm -rf `find . -name "$target" -type d`) done @@ -252,9 +253,9 @@ cd .. # for ruby-docs cd ruby-docs mkdir refm-ja faq-en faq-ja -(cd ../../ruby-refm-ja && tar cf - .) | (cd refm-ja && tar xvf -) -(cd ../../rubyfaq && tar cf - .) | (cd faq-en && tar xvf -) -(cd ../../rubyfaq-jp && tar cf - .) | (cd faq-ja && tar xvf -) +(cd ../../ruby-refm-ja && tar cf - .) | (cd refm-ja && tar xf -) +(cd ../../rubyfaq && tar cf - .) | (cd faq-en && tar xf -) +(cd ../../rubyfaq-jp && tar cf - .) | (cd faq-ja && tar xf -) (cd faq-ja && for f in rubyfaq-jp*.html @@ -286,10 +287,6 @@ for i in `find -type f`; do if [ $? != 0 ]; then iconv -f iso8859-1 -t utf-8 $i > $.new && mv $i.new $i || exit 1 fi - if [ -f $i.new ]; then - echo "Failed to convert with iconv." - exit 1 - fi done # done @@ -303,14 +300,15 @@ rm $RPM_BUILD_ROOT%{_libdir}/libruby-static.a # generate ri doc rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} +rm -rf %{name}-%{arcver}/.ext/rdoc LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} RUBYLIB=$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}:$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} make -C $rubybuilddir DESTDIR=$RPM_BUILD_ROOT install-doc #DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $rubybuilddir -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/ -I $rubybuilddir/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $rubybuilddir -%{__mkdir_p} $RPM_BUILD_ROOT%{sitedir2}/%{rubyxver} -%{__mkdir_p} $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} +mkdir -p $RPM_BUILD_ROOT%{sitedir2}/%{rubyxver} +mkdir -p $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} # XXX: installing irb -install -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/ +install -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/ %ifnarch ppc64 # installing ruby-mode @@ -325,7 +323,7 @@ EOF emacs --no-site-file -q -batch -l path.el -f batch-byte-compile *.el rm -f path.el* popd -install -m 644 %{SOURCE10} \ +install -p -m 644 %{SOURCE10} \ $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d cd .. @@ -384,12 +382,14 @@ rm -rf tmp-ruby-docs %doc %{name}-%{arcver}/GPL %doc %{name}-%{arcver}/LEGAL %doc %{name}-%{arcver}/LGPL -%dir %{_libdir}/ruby %dir %{_prefix}/lib/ruby -%dir %{_libdir}/ruby/%{rubyxver} %dir %{_prefix}/lib/ruby/%{rubyxver} +%ifarch ppc64 s390x sparc64 x86_64 +%dir %{_libdir}/ruby +%dir %{_libdir}/ruby/%{rubyxver} %dir %{_libdir}/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} %{sitedir} +%endif %{sitedir2} ## the following files should goes into ruby-tcltk package. %exclude %{_prefix}/lib/ruby/%{rubyxver}/*tk.rb @@ -510,6 +510,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Fri Dec 28 2007 Akira TAGOH - 1.8.6.111-4 +- Clean up again. + * Fri Dec 21 2007 Akira TAGOH - 1.8.6.111-3 - Clean up the spec file. - Remove ruby-man-1.4.6 stuff. this is entirely the out-dated document. diff --git a/sources b/sources index 840df49..20cafe8 100644 --- a/sources +++ b/sources @@ -1,5 +1,5 @@ 8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz -7f3e181c0be9a1579e43a5a8b26372d6 rubyfaq-990927.tar.bz2 -8aa2e2da327dc43ff6e46e634eb657b6 rubyfaq-jp-990927.tar.bz2 e1d38b7d4f1be55726d6927a3395ce3b ruby-1.8.6-p111.tar.bz2 +634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz +4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz From 871224e7e440275c7a1f7d588c16678b972443d7 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 4 Jan 2008 03:04:40 +0000 Subject: [PATCH 112/529] - Rebuild. --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 88c5805..cffdc97 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 4%{?dist} +Release: 5%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -510,6 +510,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Fri Jan 4 2008 Akira TAGOH - 1.8.6.111-5 +- Rebuild. + * Fri Dec 28 2007 Akira TAGOH - 1.8.6.111-4 - Clean up again. From 117d8ed5521a7f72a6a6aff9e3ead9040982e55d Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Fri, 11 Jan 2008 00:43:43 +0000 Subject: [PATCH 113/529] - Fix an unnecessary replacement for shebang. (#426835) --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index cffdc97..cbc7485 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 5%{?dist} +Release: 6%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -331,7 +331,7 @@ cd .. # remove shebang for i in $RPM_BUILD_ROOT%{_prefix}/lib/ruby/1.8/{abbrev,generator,irb/{cmd/subirb,ext/save-history},matrix,rdoc/{markup/sample/rdoc2latex,parsers/parse_rb},set,tsort}.rb; do - sed -i -e '/#![ ]*/{D}' $i + sed -i -e '/^#!.*/,1D' $i done %clean @@ -510,6 +510,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Fri Jan 11 2008 Akira TAGOH - 1.8.6.111-6 +- Fix an unnecessary replacement for shebang. (#426835) + * Fri Jan 4 2008 Akira TAGOH - 1.8.6.111-5 - Rebuild. From ab8b6162b9a0d3e09429d5ac807533ae495a0be1 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 15 Jan 2008 02:35:10 +0000 Subject: [PATCH 114/529] - Revert the change of libruby-static.a. (#428384) --- ruby.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index cbc7485..7e3bd51 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 6%{?dist} +Release: 7%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -63,6 +63,7 @@ This package includes the libruby, necessary to run Ruby. Summary: A Ruby development environment Group: Development/Languages Requires: %{name}-libs = %{version}-%{release} +Provides: %{name}-libs-static = %{version}-%{release} %description devel Header files and libraries for building a extension library for the @@ -295,9 +296,6 @@ cd .. # installing binaries ... make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} DESTDIR=$RPM_BUILD_ROOT install -# remove the static library -rm $RPM_BUILD_ROOT%{_libdir}/libruby-static.a - # generate ri doc rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} rm -rf %{name}-%{arcver}/.ext/rdoc @@ -371,6 +369,7 @@ rm -rf tmp-ruby-docs %doc %{name}-%{arcver}/README.EXT %lang(ja) %doc %{name}-%{arcver}/README.EXT.ja %{_libdir}/libruby.so +%{_libdir}/libruby-static.a %{_libdir}/ruby/%{rubyxver}/*/*.h %files libs @@ -510,6 +509,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Tue Jan 15 2008 Akira TAGOH - 1.8.6.111-7 +- Revert the change of libruby-static.a. (#428384) + * Fri Jan 11 2008 Akira TAGOH - 1.8.6.111-6 - Fix an unnecessary replacement for shebang. (#426835) From e2d02a3483f5fb5c781750eac94546c8a03a016a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 12 Feb 2008 10:12:29 +0000 Subject: [PATCH 115/529] - Rebuild for gcc-4.3. --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 7e3bd51..36f4be2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 7%{?dist} +Release: 8%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -509,6 +509,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Tue Feb 12 2008 Akira TAGOH - 1.8.6.111-8 +- Rebuild for gcc-4.3. + * Tue Jan 15 2008 Akira TAGOH - 1.8.6.111-7 - Revert the change of libruby-static.a. (#428384) From 16b62022c6fe7b0355b338cbd5e59b5479dadc5a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 19 Feb 2008 02:54:55 +0000 Subject: [PATCH 116/529] add a patch to build on gcc-4.3 --- ruby-1.8.6.111-gcc43.patch | 16 ++++++++++++++++ ruby.spec | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.6.111-gcc43.patch diff --git a/ruby-1.8.6.111-gcc43.patch b/ruby-1.8.6.111-gcc43.patch new file mode 100644 index 0000000..9e1b297 --- /dev/null +++ b/ruby-1.8.6.111-gcc43.patch @@ -0,0 +1,16 @@ +diff -pruN ruby-1.8.6-p111.orig/ext/socket/socket.c ruby-1.8.6-p111/ext/socket/socket.c +--- ruby-1.8.6-p111.orig/ext/socket/socket.c 2007-05-23 00:08:43.000000000 +0900 ++++ ruby-1.8.6-p111/ext/socket/socket.c 2008-02-19 11:24:22.000000000 +0900 +@@ -893,10 +893,10 @@ port_str(port, pbuf, len) + } + + #ifndef NI_MAXHOST +-# define 1025 ++# define NI_MAXHOST 1025 + #endif + #ifndef NI_MAXSERV +-# define 32 ++# define NI_MAXSERV 32 + #endif + + static struct addrinfo* diff --git a/ruby.spec b/ruby.spec index 36f4be2..0b9dd91 100644 --- a/ruby.spec +++ b/ruby.spec @@ -36,6 +36,7 @@ Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch Patch24: ruby-1.8.6.111-CVE-2007-5162.patch +Patch25: ruby-1.8.6.111-gcc43.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -156,6 +157,7 @@ pushd %{name}-%{arcver} %patch23 -p1 %endif %patch24 -p1 +%patch25 -p1 popd %build @@ -509,7 +511,7 @@ rm -rf tmp-ruby-docs %endif %changelog -* Tue Feb 12 2008 Akira TAGOH - 1.8.6.111-8 +* Tue Feb 19 2008 Akira TAGOH - 1.8.6.111-8 - Rebuild for gcc-4.3. * Tue Jan 15 2008 Akira TAGOH - 1.8.6.111-7 From 6c3566ac87612f24ce1ca6abef647a3b08ece4b8 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 20 Feb 2008 03:41:02 +0000 Subject: [PATCH 117/529] - Autorebuild for GCC 4.3 --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 0b9dd91..9728613 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 8%{?dist} +Release: 9%{?dist} License: Ruby or GPL+ URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -511,6 +511,9 @@ rm -rf tmp-ruby-docs %endif %changelog +* Tue Feb 19 2008 Fedora Release Engineering - 1.8.6.111-9 +- Autorebuild for GCC 4.3 + * Tue Feb 19 2008 Akira TAGOH - 1.8.6.111-8 - Rebuild for gcc-4.3. From 0af4ee55b7d9b7325e964708f786beb6a5c3853a Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 10 Mar 2008 04:28:30 +0000 Subject: [PATCH 118/529] - Security fix for CVE-2008-1145. - Improve a spec file. (#226381) - Correct License tag. - Fix a timestamp issue. - Own a arch-specific directory. --- .cvsignore | 1 + ruby.spec | 16 ++++++++++++---- sources | 1 + 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index eeb7cc6..d31c9b8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -20,3 +20,4 @@ ruby-1.8.6-p110.tar.bz2 ruby-1.8.6-p111.tar.bz2 rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz +ruby-1.8.6-p114.tar.bz2 diff --git a/ruby.spec b/ruby.spec index 9728613..b79fec4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %define rubyxver 1.8 %define rubyver 1.8.6 -%define _patchlevel 111 +%define _patchlevel 114 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define arcver %{rubyver}%{?patchlevel} @@ -12,8 +12,8 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 9%{?dist} -License: Ruby or GPL+ +Release: 1%{?dist} +License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel byacc @@ -313,7 +313,7 @@ install -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/ %ifnarch ppc64 # installing ruby-mode cd %{name}-%{arcver} -cp misc/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode +cp -p misc/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode ## for ruby-mode pushd $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode @@ -385,6 +385,7 @@ rm -rf tmp-ruby-docs %doc %{name}-%{arcver}/LGPL %dir %{_prefix}/lib/ruby %dir %{_prefix}/lib/ruby/%{rubyxver} +%dir %{_prefix}/lib/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} %ifarch ppc64 s390x sparc64 x86_64 %dir %{_libdir}/ruby %dir %{_libdir}/ruby/%{rubyxver} @@ -511,6 +512,13 @@ rm -rf tmp-ruby-docs %endif %changelog +* Tue Mar 4 2008 Akira TAGOH - 1.8.6.114-1 +- Security fix for CVE-2008-1145. +- Improve a spec file. (#226381) + - Correct License tag. + - Fix a timestamp issue. + - Own a arch-specific directory. + * Tue Feb 19 2008 Fedora Release Engineering - 1.8.6.111-9 - Autorebuild for GCC 4.3 diff --git a/sources b/sources index 20cafe8..1dcdc28 100644 --- a/sources +++ b/sources @@ -3,3 +3,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz e1d38b7d4f1be55726d6927a3395ce3b ruby-1.8.6-p111.tar.bz2 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz +b4d0c74497f684814bcfbb41b7384a71 ruby-1.8.6-p114.tar.bz2 From 67dd6cda0e7a68e260916458bc680a9122704695 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 10 Mar 2008 05:27:02 +0000 Subject: [PATCH 119/529] *** empty log message *** --- ruby.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruby.spec b/ruby.spec index b79fec4..4d0e325 100644 --- a/ruby.spec +++ b/ruby.spec @@ -385,7 +385,9 @@ rm -rf tmp-ruby-docs %doc %{name}-%{arcver}/LGPL %dir %{_prefix}/lib/ruby %dir %{_prefix}/lib/ruby/%{rubyxver} +%ifnarch ppc64 s390x sparc64 x86_64 %dir %{_prefix}/lib/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} +%endif %ifarch ppc64 s390x sparc64 x86_64 %dir %{_libdir}/ruby %dir %{_libdir}/ruby/%{rubyxver} From a4b170df84dbd9cc8015f3839fbed1a82ff2c1e0 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 27 May 2008 02:36:04 +0000 Subject: [PATCH 120/529] clean up --- ruby-1.8.4-64bit-pack.patch | 26 -------- ruby-1.8.4-fix-alias-safe-level.patch | 36 ---------- ruby-1.8.4-fix-insecure-dir-operation.patch | 31 --------- ...8.4-fix-insecure-regexp-modification.patch | 66 ------------------- ruby-1.8.4-no-eaccess.patch | 56 ---------------- ruby-1.8.5-hash-memory-leak.patch | 48 -------------- ruby-fix-autoconf-magic-code.patch | 11 ---- ruby-tcltk-multilib.patch | 30 --------- sources | 1 - 9 files changed, 305 deletions(-) delete mode 100644 ruby-1.8.4-64bit-pack.patch delete mode 100644 ruby-1.8.4-fix-alias-safe-level.patch delete mode 100644 ruby-1.8.4-fix-insecure-dir-operation.patch delete mode 100644 ruby-1.8.4-fix-insecure-regexp-modification.patch delete mode 100644 ruby-1.8.4-no-eaccess.patch delete mode 100644 ruby-1.8.5-hash-memory-leak.patch delete mode 100644 ruby-fix-autoconf-magic-code.patch delete mode 100644 ruby-tcltk-multilib.patch diff --git a/ruby-1.8.4-64bit-pack.patch b/ruby-1.8.4-64bit-pack.patch deleted file mode 100644 index a0ccbee..0000000 --- a/ruby-1.8.4-64bit-pack.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -ruN ruby-1.8.4.orig/pack.c ruby-1.8.4/pack.c ---- ruby-1.8.4.orig/pack.c 2005-10-13 23:30:49.000000000 +0900 -+++ ruby-1.8.4/pack.c 2006-04-20 13:50:25.000000000 +0900 -@@ -347,11 +347,11 @@ - return 0; /* not reached */ - } - --#if SIZEOF_LONG == SIZE32 || SIZEOF_INT == SIZE32 -+#if SIZEOF_LONG == SIZE32 - # define EXTEND32(x) - #else - /* invariant in modulo 1<<31 */ --# define EXTEND32(x) do {if (!natint) {(x) = (I32)(((1<<31)-1-(x))^~(~0<<31));}} while(0) -+# define EXTEND32(x) do { if (!natint) {(x) = (((1L<<31)-1-(x))^~(~0L<<31));}} while(0) - #endif - #if SIZEOF_SHORT == SIZE16 - # define EXTEND16(x) -@@ -1951,7 +1951,7 @@ - case 'w': - { - unsigned long ul = 0; -- unsigned long ulmask = 0xfeL << ((sizeof(unsigned long) - 1) * 8); -+ unsigned long ulmask = 0xfeUL << ((sizeof(unsigned long) - 1UL) * 8UL); - - while (len > 0 && s < send) { - ul <<= 7; diff --git a/ruby-1.8.4-fix-alias-safe-level.patch b/ruby-1.8.4-fix-alias-safe-level.patch deleted file mode 100644 index e95d784..0000000 --- a/ruby-1.8.4-fix-alias-safe-level.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -ruN ruby-1.8.4.orig/eval.c ruby-1.8.4/eval.c ---- ruby-1.8.4.orig/eval.c 2005-12-20 22:41:47.000000000 +0900 -+++ ruby-1.8.4/eval.c 2006-07-20 18:33:50.000000000 +0900 -@@ -2097,7 +2097,8 @@ - } - } - st_insert(RCLASS(klass)->m_tbl, name, -- (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), orig->nd_noex)); -+ (st_data_t)NEW_METHOD(NEW_FBODY(body, def, origin), -+ NOEX_WITH_SAFE(orig->nd_noex))); - if (singleton) { - rb_funcall(singleton, singleton_added, 1, ID2SYM(name)); - } -@@ -5638,6 +5639,11 @@ - TMP_PROTECT; - volatile int safe = -1; - -+ if (NOEX_SAFE(flags) > ruby_safe_level && -+ !(flags&NOEX_TAINTED) && ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) { -+ rb_raise(rb_eSecurityError, "calling insecure method: %s", -+ rb_id2name(id)); -+ } - switch (ruby_iter->iter) { - case ITER_PRE: - case ITER_PAS: -@@ -5742,10 +5748,6 @@ - b2 = body = body->nd_next; - - if (NOEX_SAFE(flags) > ruby_safe_level) { -- if (!(flags&NOEX_TAINTED) && ruby_safe_level == 0 && NOEX_SAFE(flags) > 2) { -- rb_raise(rb_eSecurityError, "calling insecure method: %s", -- rb_id2name(id)); -- } - safe = ruby_safe_level; - ruby_safe_level = NOEX_SAFE(flags); - } diff --git a/ruby-1.8.4-fix-insecure-dir-operation.patch b/ruby-1.8.4-fix-insecure-dir-operation.patch deleted file mode 100644 index 492aff4..0000000 --- a/ruby-1.8.4-fix-insecure-dir-operation.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -ruN ruby-1.8.4.orig/dir.c ruby-1.8.4/dir.c ---- ruby-1.8.4.orig/dir.c 2005-09-14 22:40:58.000000000 +0900 -+++ ruby-1.8.4/dir.c 2006-07-19 22:14:05.000000000 +0900 -@@ -325,7 +325,17 @@ - rb_raise(rb_eIOError, "closed directory"); - } - -+static void -+dir_check(dir) -+ VALUE dir; -+{ -+ if (!OBJ_TAINTED(dir) && rb_safe_level() >= 4) -+ rb_raise(rb_eSecurityError, "Insecure: operation on untainted Dir"); -+ rb_check_frozen(dir); -+} -+ - #define GetDIR(obj, dirp) do {\ -+ dir_check(dir);\ - Data_Get_Struct(obj, struct dir_data, dirp);\ - if (dirp->dir == NULL) dir_closed();\ - } while (0) -@@ -536,6 +546,9 @@ - { - struct dir_data *dirp; - -+ if (rb_safe_level() >= 4 && !OBJ_TAINTED(dir)) { -+ rb_raise(rb_eSecurityError, "Insecure: can't close"); -+ } - GetDIR(dir, dirp); - closedir(dirp->dir); - dirp->dir = NULL; diff --git a/ruby-1.8.4-fix-insecure-regexp-modification.patch b/ruby-1.8.4-fix-insecure-regexp-modification.patch deleted file mode 100644 index 26c24e3..0000000 --- a/ruby-1.8.4-fix-insecure-regexp-modification.patch +++ /dev/null @@ -1,66 +0,0 @@ -diff -ruN ruby-1.8.4.orig/re.c ruby-1.8.4/re.c ---- ruby-1.8.4.orig/re.c 2005-12-13 12:27:51.000000000 +0900 -+++ ruby-1.8.4/re.c 2006-07-19 18:07:59.000000000 +0900 -@@ -70,10 +70,11 @@ - #endif - - int --rb_memcicmp(p1, p2, len) -- char *p1, *p2; -+rb_memcicmp(x, y, len) -+ const void *x, *y; - long len; - { -+ const unsigned char *p1 = x, *p2 = y; - int tmp; - - while (len--) { -@@ -85,7 +86,7 @@ - - int - rb_memcmp(p1, p2, len) -- char *p1, *p2; -+ const void *p1, *p2; - long len; - { - if (!ruby_ignorecase) { -@@ -96,11 +97,11 @@ - - long - rb_memsearch(x0, m, y0, n) -- char *x0, *y0; -+ const void *x0, *y0; - long m, n; - { -- unsigned char *x = (unsigned char *)x0, *y = (unsigned char *)y0; -- unsigned char *s, *e; -+ const unsigned char *x = (unsigned char *)x0, *y = (unsigned char *)y0; -+ const unsigned char *s, *e; - long i; - int d; - unsigned long hx, hy; -@@ -1332,6 +1333,8 @@ - { - struct RRegexp *re = RREGEXP(obj); - -+ if (!OBJ_TAINTED(obj) && rb_safe_level() >= 4) -+ rb_raise(rb_eSecurityError, "Insecure: can't modify regexp"); - if (re->ptr) re_free_pattern(re->ptr); - if (re->str) free(re->str); - re->ptr = 0; -diff -ruN ruby-1.8.4.orig/intern.h ruby-1.8.4/intern.h ---- ruby-1.8.4.orig/intern.h 2006-07-19 18:13:49.000000000 +0900 -+++ ruby-1.8.4/intern.h 2006-07-19 18:20:34.000000000 +0900 -@@ -353,9 +353,9 @@ - VALUE rb_range_beg_len _((VALUE, long*, long*, long, int)); - VALUE rb_length_by_each _((VALUE)); - /* re.c */ --int rb_memcmp _((char*,char*,long)); --int rb_memcicmp _((char*,char*,long)); --long rb_memsearch _((char*,long,char*,long)); -+int rb_memcmp _((const void*,const void*,long)); -+int rb_memcicmp _((const void*,const void*,long)); -+long rb_memsearch _((const void*,long,const void*,long)); - VALUE rb_reg_nth_defined _((int, VALUE)); - VALUE rb_reg_nth_match _((int, VALUE)); - VALUE rb_reg_last_match _((VALUE)); diff --git a/ruby-1.8.4-no-eaccess.patch b/ruby-1.8.4-no-eaccess.patch deleted file mode 100644 index 412d3d7..0000000 --- a/ruby-1.8.4-no-eaccess.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in ---- ruby-1.8.4.orig/configure.in 2005-11-24 21:07:18.000000000 +0900 -+++ ruby-1.8.4/configure.in 2006-02-06 12:51:58.000000000 +0900 -@@ -437,7 +437,7 @@ - AC_REPLACE_FUNCS(dup2 memmove strcasecmp strncasecmp strerror strftime\ - strchr strstr strtoul crypt flock vsnprintf\ - isnan finite isinf hypot acosh erf) --AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd\ -+AC_CHECK_FUNCS(fmod killpg wait4 waitpid syscall chroot fsync getcwd eaccess\ - truncate chsize times utimes fcntl lockf lstat symlink link\ - readlink setitimer setruid seteuid setreuid setresuid\ - setproctitle setrgid setegid setregid setresgid issetugid pause\ -diff -ruN ruby-1.8.4.orig/file.c ruby-1.8.4/file.c ---- ruby-1.8.4.orig/file.c 2005-12-21 18:20:15.000000000 +0900 -+++ ruby-1.8.4/file.c 2006-02-06 12:52:48.000000000 +0900 -@@ -849,6 +849,7 @@ - # define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) - #endif - -+#ifndef HAVE_EACCESS - int - eaccess(path, mode) - const char *path; -@@ -887,6 +888,7 @@ - return access(path, mode); - #endif - } -+#endif - - - /* -diff -ruN ruby-1.8.4.orig/intern.h ruby-1.8.4/intern.h ---- ruby-1.8.4.orig/intern.h 2005-11-23 11:06:00.000000000 +0900 -+++ ruby-1.8.4/intern.h 2006-02-06 12:52:54.000000000 +0900 -@@ -221,7 +221,6 @@ - void rb_thread_atfork _((void)); - VALUE rb_funcall_rescue __((VALUE, ID, int, ...)); - /* file.c */ --int eaccess _((const char*, int)); - VALUE rb_file_s_expand_path _((int, VALUE *)); - VALUE rb_file_expand_path _((VALUE, VALUE)); - void rb_file_const _((const char*, VALUE)); -diff -ruN ruby-1.8.4.orig/missing.h ruby-1.8.4/missing.h ---- ruby-1.8.4.orig/missing.h 2005-06-13 01:58:41.000000000 +0900 -+++ ruby-1.8.4/missing.h 2006-02-06 12:53:29.000000000 +0900 -@@ -39,6 +39,10 @@ - extern int dup2 _((int, int)); - #endif - -+#ifndef HAVE_EACCESS -+extern int eaccess(const char*, int); -+#endif -+ - #ifndef HAVE_FINITE - extern int finite _((double)); - #endif diff --git a/ruby-1.8.5-hash-memory-leak.patch b/ruby-1.8.5-hash-memory-leak.patch deleted file mode 100644 index 331ab34..0000000 --- a/ruby-1.8.5-hash-memory-leak.patch +++ /dev/null @@ -1,48 +0,0 @@ -diff -ruN ruby-1.8.5.orig/hash.c ruby-1.8.5/hash.c ---- ruby-1.8.5.orig/hash.c 2006-07-07 00:44:26.000000000 +0900 -+++ ruby-1.8.5/hash.c 2006-08-30 15:50:31.000000000 +0900 -@@ -223,20 +223,31 @@ - rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash); - } - -+static VALUE hash_alloc0 _((VALUE)); - static VALUE hash_alloc _((VALUE)); - static VALUE --hash_alloc(klass) -+hash_alloc0(klass) - VALUE klass; - { - NEWOBJ(hash, struct RHash); - OBJSETUP(hash, klass, T_HASH); - - hash->ifnone = Qnil; -- hash->tbl = st_init_table(&objhash); - - return (VALUE)hash; - } - -+static VALUE -+hash_alloc(klass) -+ VALUE klass; -+{ -+ VALUE hash = hash_alloc0(klass); -+ -+ RHASH(hash)->tbl = st_init_table(&objhash); -+ -+ return hash; -+} -+ - VALUE - rb_hash_new() - { -@@ -325,9 +336,7 @@ - int i; - - if (argc == 1 && TYPE(argv[0]) == T_HASH) { -- hash = hash_alloc(klass); -- -- RHASH(hash)->ifnone = Qnil; -+ hash = hash_alloc0(klass); - RHASH(hash)->tbl = st_copy(RHASH(argv[0])->tbl); - - return hash; diff --git a/ruby-fix-autoconf-magic-code.patch b/ruby-fix-autoconf-magic-code.patch deleted file mode 100644 index 58ac75f..0000000 --- a/ruby-fix-autoconf-magic-code.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ruN ruby-1.8.4.orig/mkconfig.rb ruby-1.8.4/mkconfig.rb ---- ruby-1.8.4.orig/mkconfig.rb 2006-07-19 20:39:48.000000000 +0900 -+++ ruby-1.8.4/mkconfig.rb 2006-07-19 20:40:12.000000000 +0900 -@@ -37,6 +37,7 @@ - has_version = false - File.foreach "config.status" do |line| - next if /^#/ =~ line -+ line.gsub!(/\|#_!!_#\|/, '') - if /^s[%,]@program_transform_name@[%,]s,(.*)/ =~ line - next if $install_name - ptn = $1.sub(/\$\$/, '$').split(/,/) #' diff --git a/ruby-tcltk-multilib.patch b/ruby-tcltk-multilib.patch deleted file mode 100644 index 2b0a250..0000000 --- a/ruby-tcltk-multilib.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff -ruN ruby-1.8.4.orig/ext/tk/extconf.rb ruby-1.8.4/ext/tk/extconf.rb ---- ruby-1.8.4.orig/ext/tk/extconf.rb 2005-11-02 20:28:40.000000000 +0900 -+++ ruby-1.8.4/ext/tk/extconf.rb 2005-12-16 19:44:57.000000000 +0900 -@@ -48,7 +48,7 @@ - stubs = enable_config("tcltk_stubs") || with_config("tcltk_stubs") - - def find_tcl(tcllib, stubs) -- paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"] -+ paths = ["/usr/local/lib64", "/usr/local/lib", "/usr/pkg/lib64", "/usr/pkg/lib", "/usr/lib64", "/usr/lib"] - if stubs - func = "Tcl_InitStubs" - lib = "tclstub" -@@ -71,7 +71,7 @@ - end - - def find_tk(tklib, stubs) -- paths = ["/usr/local/lib", "/usr/pkg/lib", "/usr/lib"] -+ paths = ["/usr/local/lib64", "/usr/local/lib", "/usr/pkg/lib64", "/usr/pkg/lib", "/usr/lib64", "/usr/lib"] - if stubs - func = "Tk_InitStubs" - lib = "tkstub" -@@ -274,7 +274,7 @@ - if tcltk_framework || - (have_header("tcl.h") && have_header("tk.h") && - (is_win32 || find_library("X11", "XOpenDisplay", -- "/usr/X11/lib", "/usr/lib/X11", "/usr/X11R6/lib", "/usr/openwin/lib")) && -+ "/usr/X11/lib64", "/usr/X11/lib", "/usr/lib64/X11", "/usr/lib/X11", "/usr/X11R6/lib64", "/usr/X11R6/lib", "/usr/openwin/lib64", "/usr/openwin/lib")) && - find_tcl(tcllib, stubs) && - find_tk(tklib, stubs)) - $CPPFLAGS += ' -DUSE_TCL_STUBS -DUSE_TK_STUBS' if stubs diff --git a/sources b/sources index 1dcdc28..dff6ae6 100644 --- a/sources +++ b/sources @@ -1,6 +1,5 @@ 8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz -e1d38b7d4f1be55726d6927a3395ce3b ruby-1.8.6-p111.tar.bz2 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz b4d0c74497f684814bcfbb41b7384a71 ruby-1.8.6-p114.tar.bz2 From 9f5e44d23cf18e670b17da8080a69d8b6f054367 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 24 Jun 2008 03:32:31 +0000 Subject: [PATCH 121/529] - New upstream release. - Security fixes. (#452295) - CVE-2008-1891: WEBrick CGI source disclosure. - CVE-2008-2662: Integer overflow in rb_str_buf_append(). - CVE-2008-2663: Integer overflow in rb_ary_store(). - CVE-2008-2664: Unsafe use of alloca in rb_str_format(). - CVE-2008-2725: Integer overflow in rb_ary_splice(). - CVE-2008-2726: Integer overflow in rb_ary_splice(). - ruby-1.8.6.111-CVE-2007-5162.patch: removed. - Build ruby-mode package for all archtectures. --- .cvsignore | 1 + ruby-1.8.6.111-CVE-2007-5162.patch | 97 ------------------------------ ruby.spec | 26 ++++---- sources | 2 +- 4 files changed, 15 insertions(+), 111 deletions(-) delete mode 100644 ruby-1.8.6.111-CVE-2007-5162.patch diff --git a/.cvsignore b/.cvsignore index d31c9b8..2ecc1d3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -21,3 +21,4 @@ ruby-1.8.6-p111.tar.bz2 rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz ruby-1.8.6-p114.tar.bz2 +ruby-1.8.6-p230.tar.bz2 diff --git a/ruby-1.8.6.111-CVE-2007-5162.patch b/ruby-1.8.6.111-CVE-2007-5162.patch deleted file mode 100644 index 5ed628d..0000000 --- a/ruby-1.8.6.111-CVE-2007-5162.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff -pruN ruby-1.8.6-p111.orig/ext/openssl/lib/net/ftptls.rb ruby-1.8.6-p111/ext/openssl/lib/net/ftptls.rb ---- ruby-1.8.6-p111.orig/ext/openssl/lib/net/ftptls.rb 2007-02-13 08:01:19.000000000 +0900 -+++ ruby-1.8.6-p111/ext/openssl/lib/net/ftptls.rb 2007-10-29 21:10:24.000000000 +0900 -@@ -29,13 +29,23 @@ require 'net/ftp' - - module Net - class FTPTLS < FTP -+ def connect(host, port=FTP_PORT) -+ @hostname = host -+ super -+ end -+ - def login(user = "anonymous", passwd = nil, acct = nil) -+ store = OpenSSL::X509::Store.new -+ store.set_default_paths - ctx = OpenSSL::SSL::SSLContext.new('SSLv23') -+ ctx.cert_store = store -+ ctx.verify_mode = OpenSSL::SSL::VERIFY_PEER - ctx.key = nil - ctx.cert = nil - voidcmd("AUTH TLS") - @sock = OpenSSL::SSL::SSLSocket.new(@sock, ctx) - @sock.connect -+ @sock.post_connection_check(@hostname) - super(user, passwd, acct) - voidcmd("PBSZ 0") - end -diff -pruN ruby-1.8.6-p111.orig/ext/openssl/lib/net/telnets.rb ruby-1.8.6-p111/ext/openssl/lib/net/telnets.rb ---- ruby-1.8.6-p111.orig/ext/openssl/lib/net/telnets.rb 2007-02-13 08:01:19.000000000 +0900 -+++ ruby-1.8.6-p111/ext/openssl/lib/net/telnets.rb 2007-10-29 21:13:03.000000000 +0900 -@@ -134,6 +134,9 @@ module Net - @sock.verify_callback = @options['VerifyCallback'] - @sock.verify_depth = @options['VerifyDepth'] - @sock.connect -+ if @options['VerifyMode'] != OpenSSL::SSL::VERIFY_NONE -+ @sock.post_connection_check(@options['Host']) -+ end - @ssl = true - end - '' -diff -pruN ruby-1.8.6-p111.orig/lib/net/http.rb ruby-1.8.6-p111/lib/net/http.rb ---- ruby-1.8.6-p111.orig/lib/net/http.rb 2007-09-24 17:12:24.000000000 +0900 -+++ ruby-1.8.6-p111/lib/net/http.rb 2007-10-29 21:12:12.000000000 +0900 -@@ -470,7 +470,6 @@ module Net #:nodoc: - @debug_output = nil - @use_ssl = false - @ssl_context = nil -- @enable_post_connection_check = false - end - - def inspect -@@ -527,9 +526,6 @@ module Net #:nodoc: - false # redefined in net/https - end - -- # specify enabling SSL server certificate and hostname checking. -- attr_accessor :enable_post_connection_check -- - # Opens TCP connection and HTTP session. - # - # When this method is called with block, gives a HTTP object -@@ -589,12 +585,7 @@ module Net #:nodoc: - end - s.connect - if @ssl_context.verify_mode != OpenSSL::SSL::VERIFY_NONE -- begin -- s.post_connection_check(@address) -- rescue OpenSSL::SSL::SSLError => ex -- raise ex if @enable_post_connection_check -- warn ex.message -- end -+ s.post_connection_check(@address) - end - end - on_connect -diff -pruN ruby-1.8.6-p111.orig/lib/net/imap.rb ruby-1.8.6-p111/lib/net/imap.rb ---- ruby-1.8.6-p111.orig/lib/net/imap.rb 2007-08-22 08:28:09.000000000 +0900 -+++ ruby-1.8.6-p111/lib/net/imap.rb 2007-10-29 21:14:38.000000000 +0900 -@@ -900,6 +900,7 @@ module Net - end - @sock = SSLSocket.new(@sock, context) - @sock.connect # start ssl session. -+ @sock.post_connection_check(@host) if verify - else - @usessl = false - end -diff -pruN ruby-1.8.6-p111.orig/lib/open-uri.rb ruby-1.8.6-p111/lib/open-uri.rb ---- ruby-1.8.6-p111.orig/lib/open-uri.rb 2007-09-24 17:12:24.000000000 +0900 -+++ ruby-1.8.6-p111/lib/open-uri.rb 2007-10-29 21:16:03.000000000 +0900 -@@ -229,7 +229,6 @@ module OpenURI - if target.class == URI::HTTPS - require 'net/https' - http.use_ssl = true -- http.enable_post_connection_check = true - http.verify_mode = OpenSSL::SSL::VERIFY_PEER - store = OpenSSL::X509::Store.new - store.set_default_paths diff --git a/ruby.spec b/ruby.spec index 4d0e325..656c16b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %define rubyxver 1.8 %define rubyver 1.8.6 -%define _patchlevel 114 +%define _patchlevel 230 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define arcver %{rubyver}%{?patchlevel} @@ -17,9 +17,7 @@ License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel byacc -%ifnarch ppc64 BuildRequires: emacs -%endif Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{arcver}.tar.bz2 ## Dead link @@ -35,7 +33,6 @@ Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch -Patch24: ruby-1.8.6.111-CVE-2007-5162.patch Patch25: ruby-1.8.6.111-gcc43.patch Summary: An interpreter of object-oriented scripting language @@ -115,7 +112,6 @@ Group: Documentation Manuals and FAQs for the object-oriented scripting language Ruby. -%ifnarch ppc64 %package mode Summary: Emacs Lisp ruby-mode for the scripting language Ruby Group: Applications/Editors @@ -123,7 +119,6 @@ Requires: emacs-common %description mode Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. -%endif %package ri @@ -156,7 +151,6 @@ pushd %{name}-%{arcver} %patch22 -p1 %patch23 -p1 %endif -%patch24 -p1 %patch25 -p1 popd @@ -203,10 +197,8 @@ popd %install rm -rf $RPM_BUILD_ROOT -%ifnarch ppc64 mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d -%endif # installing documents and exapmles... rm -rf tmp-ruby-docs @@ -310,7 +302,6 @@ mkdir -p $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} # XXX: installing irb install -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/ -%ifnarch ppc64 # installing ruby-mode cd %{name}-%{arcver} cp -p misc/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode @@ -327,7 +318,6 @@ install -p -m 644 %{SOURCE10} \ $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d cd .. -%endif # remove shebang for i in $RPM_BUILD_ROOT%{_prefix}/lib/ruby/1.8/{abbrev,generator,irb/{cmd/subirb,ext/save-history},matrix,rdoc/{markup/sample/rdoc2latex,parsers/parse_rb},set,tsort}.rb; do @@ -500,7 +490,6 @@ rm -rf tmp-ruby-docs %doc tmp-ruby-docs/ruby-docs/* %doc tmp-ruby-docs/ruby-libs/* -%ifnarch ppc64 %files mode %defattr(-, root, root, -) %doc %{name}-%{arcver}/COPYING* @@ -511,9 +500,20 @@ rm -rf tmp-ruby-docs %doc %{name}-%{arcver}/misc/README %{_datadir}/emacs/site-lisp/ruby-mode %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el -%endif %changelog +* Tue Jun 24 2008 Akira TAGOH - 1.8.6.230-1 +- New upstream release. +- Security fixes. (#452295) + - CVE-2008-1891: WEBrick CGI source disclosure. + - CVE-2008-2662: Integer overflow in rb_str_buf_append(). + - CVE-2008-2663: Integer overflow in rb_ary_store(). + - CVE-2008-2664: Unsafe use of alloca in rb_str_format(). + - CVE-2008-2725: Integer overflow in rb_ary_splice(). + - CVE-2008-2726: Integer overflow in rb_ary_splice(). +- ruby-1.8.6.111-CVE-2007-5162.patch: removed. +- Build ruby-mode package for all archtectures. + * Tue Mar 4 2008 Akira TAGOH - 1.8.6.114-1 - Security fix for CVE-2008-1145. - Improve a spec file. (#226381) diff --git a/sources b/sources index dff6ae6..33ddadd 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -b4d0c74497f684814bcfbb41b7384a71 ruby-1.8.6-p114.tar.bz2 +3eceb42d4fc56398676c20a49ac7e044 ruby-1.8.6-p230.tar.bz2 From 3c9cf6c1bd70862ba33add3e5a2c19c1e3c0a358 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 25 Jun 2008 08:32:24 +0000 Subject: [PATCH 122/529] - Fix a segfault issue. (#452810) --- ruby-1.8.6.230-string-str_buf_cat.patch | 28 +++++++++++++++++++++++++ ruby.spec | 7 ++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.6.230-string-str_buf_cat.patch diff --git a/ruby-1.8.6.230-string-str_buf_cat.patch b/ruby-1.8.6.230-string-str_buf_cat.patch new file mode 100644 index 0000000..287ddc9 --- /dev/null +++ b/ruby-1.8.6.230-string-str_buf_cat.patch @@ -0,0 +1,28 @@ +diff -pruN ruby-1.8.6-p230.orig/string.c ruby-1.8.6-p230/string.c +--- ruby-1.8.6-p230.orig/string.c 2008-06-20 18:24:53.000000000 +0900 ++++ ruby-1.8.6-p230/string.c 2008-06-25 16:10:17.000000000 +0900 +@@ -693,9 +693,13 @@ str_buf_cat(str, ptr, len) + const char *ptr; + long len; + { +- long capa, total; ++ long capa, total, off = -1; + + rb_str_modify(str); ++ if (ptr >= RSTRING(str)->ptr && ptr <= RSTRING(str)->ptr + RSTRING(str)->len) { ++ off = ptr - RSTRING(str)->ptr; ++ } ++ if (len == 0) return 0; + if (FL_TEST(str, STR_ASSOC)) { + FL_UNSET(str, STR_ASSOC); + capa = RSTRING(str)->aux.capa = RSTRING(str)->len; +@@ -717,6 +721,9 @@ str_buf_cat(str, ptr, len) + } + RESIZE_CAPA(str, capa); + } ++ if (off != -1) { ++ ptr = RSTRING(str)->ptr + off; ++ } + memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len); + RSTRING(str)->len = total; + RSTRING(str)->ptr[total] = '\0'; /* sentinel */ diff --git a/ruby.spec b/ruby.spec index 656c16b..77dc6a2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -34,6 +34,7 @@ Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch Patch25: ruby-1.8.6.111-gcc43.patch +Patch26: ruby-1.8.6.230-string-str_buf_cat.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -152,6 +153,7 @@ pushd %{name}-%{arcver} %patch23 -p1 %endif %patch25 -p1 +%patch26 -p1 popd %build @@ -502,6 +504,9 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog +* Wed Jun 25 2008 Akira TAGOH - 1.8.6.230-2 +- Fix a segfault issue. (#452810) + * Tue Jun 24 2008 Akira TAGOH - 1.8.6.230-1 - New upstream release. - Security fixes. (#452295) From 2061c5bdb3262d96de97547ad5588c3c64e7b640 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 30 Jun 2008 02:37:44 +0000 Subject: [PATCH 123/529] - Backported from upstream SVN to fix a segfault issue. (#452825) - Backported from upstream SVN to fix an integer overflow in rb_ary_fill. --- ruby-1.8.6.230-p238.patch | 58 +++++++++++++++++++++++++++++++++++++++ ruby-1.8.6.230-p248.patch | 16 +++++++++++ ruby.spec | 10 ++++++- 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.6.230-p238.patch create mode 100644 ruby-1.8.6.230-p248.patch diff --git a/ruby-1.8.6.230-p238.patch b/ruby-1.8.6.230-p238.patch new file mode 100644 index 0000000..1cf26ff --- /dev/null +++ b/ruby-1.8.6.230-p238.patch @@ -0,0 +1,58 @@ +diff -pruN ruby-1.8.6-p230.orig/class.c ruby-1.8.6-p230/class.c +--- ruby-1.8.6-p230.orig/class.c 2008-06-15 21:06:33.000000000 +0900 ++++ ruby-1.8.6-p230/class.c 2008-06-30 11:21:41.000000000 +0900 +@@ -62,10 +62,7 @@ clone_method(mid, body, data) + 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); ++ fbody = rb_copy_node_scope(fbody, ruby_cref); + } + st_insert(data->tbl, mid, (st_data_t)NEW_METHOD(fbody, body->nd_noex)); + return ST_CONTINUE; +diff -pruN ruby-1.8.6-p230.orig/eval.c ruby-1.8.6-p230/eval.c +--- ruby-1.8.6-p230.orig/eval.c 2008-06-16 15:43:48.000000000 +0900 ++++ ruby-1.8.6-p230/eval.c 2008-06-30 11:19:15.000000000 +0900 +@@ -2239,8 +2239,8 @@ rb_mod_alias_method(mod, newname, oldnam + return mod; + } + +-static NODE* +-copy_node_scope(node, rval) ++NODE* ++rb_copy_node_scope(node, rval) + NODE *node; + NODE *rval; + { +@@ -3948,7 +3948,7 @@ rb_eval(self, n) + noex |= NOEX_NOSUPER; + } + +- defn = copy_node_scope(node->nd_defn, ruby_cref); ++ defn = rb_copy_node_scope(node->nd_defn, ruby_cref); + rb_add_method(ruby_class, node->nd_mid, defn, noex); + if (scope_vmode == SCOPE_MODFUNC) { + rb_add_method(rb_singleton_class(ruby_class), +@@ -3984,7 +3984,7 @@ rb_eval(self, n) + rb_warning("redefine %s", rb_id2name(node->nd_mid)); + } + } +- defn = copy_node_scope(node->nd_defn, ruby_cref); ++ defn = rb_copy_node_scope(node->nd_defn, ruby_cref); + rb_add_method(klass, node->nd_mid, defn, + NOEX_PUBLIC|(body?body->nd_noex&NOEX_UNDEF:0)); + result = Qnil; +diff -pruN ruby-1.8.6-p230.orig/node.h ruby-1.8.6-p230/node.h +--- ruby-1.8.6-p230.orig/node.h 2007-05-23 00:01:22.000000000 +0900 ++++ ruby-1.8.6-p230/node.h 2008-06-30 11:20:06.000000000 +0900 +@@ -371,6 +371,7 @@ typedef unsigned int rb_event_t; + #define RUBY_EVENT_ALL 0xff + + typedef void (*rb_event_hook_func_t) _((rb_event_t,NODE*,VALUE,ID,VALUE)); ++NODE *rb_copy_node_scope _((NODE *, NODE *)); + void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t)); + int rb_remove_event_hook _((rb_event_hook_func_t)); + diff --git a/ruby-1.8.6.230-p248.patch b/ruby-1.8.6.230-p248.patch new file mode 100644 index 0000000..1279c48 --- /dev/null +++ b/ruby-1.8.6.230-p248.patch @@ -0,0 +1,16 @@ +diff -pruN ruby-1.8.6-p230.orig/array.c ruby-1.8.6-p230/array.c +--- ruby-1.8.6-p230.orig/array.c 2008-06-20 15:53:16.000000000 +0900 ++++ ruby-1.8.6-p230/array.c 2008-06-30 11:33:00.000000000 +0900 +@@ -2272,10 +2272,10 @@ rb_ary_fill(argc, argv, ary) + break; + } + rb_ary_modify(ary); +- end = beg + len; +- if (end < 0) { ++ if (len > ARY_MAX_SIZE - beg) { + rb_raise(rb_eArgError, "argument too big"); + } ++ end = beg + len; + if (end > RARRAY(ary)->len) { + if (end >= RARRAY(ary)->aux.capa) { + REALLOC_N(RARRAY(ary)->ptr, VALUE, end); diff --git a/ruby.spec b/ruby.spec index 77dc6a2..07f1c67 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -35,6 +35,8 @@ Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch Patch25: ruby-1.8.6.111-gcc43.patch Patch26: ruby-1.8.6.230-string-str_buf_cat.patch +Patch27: ruby-1.8.6.230-p238.patch +Patch28: ruby-1.8.6.230-p248.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -154,6 +156,8 @@ pushd %{name}-%{arcver} %endif %patch25 -p1 %patch26 -p1 +%patch27 -p1 +%patch28 -p1 popd %build @@ -504,6 +508,10 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog +* Mon Jun 30 2008 Akira TAGOH - 1.8.6.230-3 +- Backported from upstream SVN to fix a segfault issue. (#452825) +- Backported from upstream SVN to fix an integer overflow in rb_ary_fill. + * Wed Jun 25 2008 Akira TAGOH - 1.8.6.230-2 - Fix a segfault issue. (#452810) From 1c83e9e839da194a59b5c8da3b73c901faf064d1 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 1 Jul 2008 08:01:35 +0000 Subject: [PATCH 124/529] - Backported from upstream SVN to fix a segfault issue with Array#fill. --- ruby-1.8.6.230-p257.patch | 12 ++++++++++++ ruby.spec | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.6.230-p257.patch diff --git a/ruby-1.8.6.230-p257.patch b/ruby-1.8.6.230-p257.patch new file mode 100644 index 0000000..dbae14a --- /dev/null +++ b/ruby-1.8.6.230-p257.patch @@ -0,0 +1,12 @@ +diff -pruN ruby-1.8.6-p230.orig/array.c ruby-1.8.6-p230/array.c +--- ruby-1.8.6-p230.orig/array.c 2008-07-01 16:32:12.000000000 +0900 ++++ ruby-1.8.6-p230/array.c 2008-07-01 16:34:01.000000000 +0900 +@@ -2272,7 +2272,7 @@ rb_ary_fill(argc, argv, ary) + break; + } + rb_ary_modify(ary); +- if (len > ARY_MAX_SIZE - beg) { ++ if (beg >= ARY_MAX_SIZE || len > ARY_MAX_SIZE - beg) { + rb_raise(rb_eArgError, "argument too big"); + } + end = beg + len; diff --git a/ruby.spec b/ruby.spec index 07f1c67..14fd705 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 4%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -37,6 +37,7 @@ Patch25: ruby-1.8.6.111-gcc43.patch Patch26: ruby-1.8.6.230-string-str_buf_cat.patch Patch27: ruby-1.8.6.230-p238.patch Patch28: ruby-1.8.6.230-p248.patch +patch29: ruby-1.8.6.230-p257.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -158,6 +159,7 @@ pushd %{name}-%{arcver} %patch26 -p1 %patch27 -p1 %patch28 -p1 +%patch29 -p1 popd %build @@ -508,6 +510,9 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog +* Tue Jul 1 2008 Akira TAGOH - 1.8.6.230-4 +- Backported from upstream SVN to fix a segfault issue with Array#fill. + * Mon Jun 30 2008 Akira TAGOH - 1.8.6.230-3 - Backported from upstream SVN to fix a segfault issue. (#452825) - Backported from upstream SVN to fix an integer overflow in rb_ary_fill. From 8e0c100d5f541360730b07cfef64ba86ea548f28 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Tue, 1 Jul 2008 08:12:02 +0000 Subject: [PATCH 125/529] *** empty log message *** --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 14fd705..cc21cb6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -37,7 +37,7 @@ Patch25: ruby-1.8.6.111-gcc43.patch Patch26: ruby-1.8.6.230-string-str_buf_cat.patch Patch27: ruby-1.8.6.230-p238.patch Patch28: ruby-1.8.6.230-p248.patch -patch29: ruby-1.8.6.230-p257.patch +Patch29: ruby-1.8.6.230-p257.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages From de2fc9b10362d7aee330639f48f04a8c8a44ca62 Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Thu, 10 Jul 2008 16:00:48 +0000 Subject: [PATCH 126/529] rebuild against db4 4.7 --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index cc21cb6..428839c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 4%{?dist} +Release: 5%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -510,6 +510,9 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog +* Thu Jul 10 2008 Tom "spot" Callaway - 1.8.6.230-5 +- rebuild against db4-4.7 + * Tue Jul 1 2008 Akira TAGOH - 1.8.6.230-4 - Backported from upstream SVN to fix a segfault issue with Array#fill. From 3f68db5077a1b663d00646c851690f48f8d8d30c Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Sat, 23 Aug 2008 08:58:47 +0000 Subject: [PATCH 127/529] - New upstream release. - Security fixes. - CVE-2008-3655: Ruby does not properly restrict access to critical variables and methods at various safe levels. - CVE-2008-3656: DoS vulnerability in WEBrick. - CVE-2008-3657: Lack of taintness check in dl. - CVE-2008-1447: DNS spoofing vulnerability in resolv.rb. - CVE-2008-3443: Memory allocation failure in Ruby regex engine. - Remove the unnecessary backported patches. --- .cvsignore | 1 + ruby-1.8.6.230-p238.patch | 58 ------------------------- ruby-1.8.6.230-p248.patch | 16 ------- ruby-1.8.6.230-p257.patch | 12 ----- ruby-1.8.6.230-string-str_buf_cat.patch | 28 ------------ ruby-rubyprefix.patch | 26 +++++------ ruby.spec | 23 +++++----- sources | 2 +- 8 files changed, 28 insertions(+), 138 deletions(-) delete mode 100644 ruby-1.8.6.230-p238.patch delete mode 100644 ruby-1.8.6.230-p248.patch delete mode 100644 ruby-1.8.6.230-p257.patch delete mode 100644 ruby-1.8.6.230-string-str_buf_cat.patch diff --git a/.cvsignore b/.cvsignore index 2ecc1d3..8b4ee53 100644 --- a/.cvsignore +++ b/.cvsignore @@ -22,3 +22,4 @@ rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz ruby-1.8.6-p114.tar.bz2 ruby-1.8.6-p230.tar.bz2 +ruby-1.8.6-p287.tar.bz2 diff --git a/ruby-1.8.6.230-p238.patch b/ruby-1.8.6.230-p238.patch deleted file mode 100644 index 1cf26ff..0000000 --- a/ruby-1.8.6.230-p238.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -pruN ruby-1.8.6-p230.orig/class.c ruby-1.8.6-p230/class.c ---- ruby-1.8.6-p230.orig/class.c 2008-06-15 21:06:33.000000000 +0900 -+++ ruby-1.8.6-p230/class.c 2008-06-30 11:21:41.000000000 +0900 -@@ -62,10 +62,7 @@ clone_method(mid, body, data) - 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); -+ fbody = rb_copy_node_scope(fbody, ruby_cref); - } - st_insert(data->tbl, mid, (st_data_t)NEW_METHOD(fbody, body->nd_noex)); - return ST_CONTINUE; -diff -pruN ruby-1.8.6-p230.orig/eval.c ruby-1.8.6-p230/eval.c ---- ruby-1.8.6-p230.orig/eval.c 2008-06-16 15:43:48.000000000 +0900 -+++ ruby-1.8.6-p230/eval.c 2008-06-30 11:19:15.000000000 +0900 -@@ -2239,8 +2239,8 @@ rb_mod_alias_method(mod, newname, oldnam - return mod; - } - --static NODE* --copy_node_scope(node, rval) -+NODE* -+rb_copy_node_scope(node, rval) - NODE *node; - NODE *rval; - { -@@ -3948,7 +3948,7 @@ rb_eval(self, n) - noex |= NOEX_NOSUPER; - } - -- defn = copy_node_scope(node->nd_defn, ruby_cref); -+ defn = rb_copy_node_scope(node->nd_defn, ruby_cref); - rb_add_method(ruby_class, node->nd_mid, defn, noex); - if (scope_vmode == SCOPE_MODFUNC) { - rb_add_method(rb_singleton_class(ruby_class), -@@ -3984,7 +3984,7 @@ rb_eval(self, n) - rb_warning("redefine %s", rb_id2name(node->nd_mid)); - } - } -- defn = copy_node_scope(node->nd_defn, ruby_cref); -+ defn = rb_copy_node_scope(node->nd_defn, ruby_cref); - rb_add_method(klass, node->nd_mid, defn, - NOEX_PUBLIC|(body?body->nd_noex&NOEX_UNDEF:0)); - result = Qnil; -diff -pruN ruby-1.8.6-p230.orig/node.h ruby-1.8.6-p230/node.h ---- ruby-1.8.6-p230.orig/node.h 2007-05-23 00:01:22.000000000 +0900 -+++ ruby-1.8.6-p230/node.h 2008-06-30 11:20:06.000000000 +0900 -@@ -371,6 +371,7 @@ typedef unsigned int rb_event_t; - #define RUBY_EVENT_ALL 0xff - - typedef void (*rb_event_hook_func_t) _((rb_event_t,NODE*,VALUE,ID,VALUE)); -+NODE *rb_copy_node_scope _((NODE *, NODE *)); - void rb_add_event_hook _((rb_event_hook_func_t,rb_event_t)); - int rb_remove_event_hook _((rb_event_hook_func_t)); - diff --git a/ruby-1.8.6.230-p248.patch b/ruby-1.8.6.230-p248.patch deleted file mode 100644 index 1279c48..0000000 --- a/ruby-1.8.6.230-p248.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -pruN ruby-1.8.6-p230.orig/array.c ruby-1.8.6-p230/array.c ---- ruby-1.8.6-p230.orig/array.c 2008-06-20 15:53:16.000000000 +0900 -+++ ruby-1.8.6-p230/array.c 2008-06-30 11:33:00.000000000 +0900 -@@ -2272,10 +2272,10 @@ rb_ary_fill(argc, argv, ary) - break; - } - rb_ary_modify(ary); -- end = beg + len; -- if (end < 0) { -+ if (len > ARY_MAX_SIZE - beg) { - rb_raise(rb_eArgError, "argument too big"); - } -+ end = beg + len; - if (end > RARRAY(ary)->len) { - if (end >= RARRAY(ary)->aux.capa) { - REALLOC_N(RARRAY(ary)->ptr, VALUE, end); diff --git a/ruby-1.8.6.230-p257.patch b/ruby-1.8.6.230-p257.patch deleted file mode 100644 index dbae14a..0000000 --- a/ruby-1.8.6.230-p257.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -pruN ruby-1.8.6-p230.orig/array.c ruby-1.8.6-p230/array.c ---- ruby-1.8.6-p230.orig/array.c 2008-07-01 16:32:12.000000000 +0900 -+++ ruby-1.8.6-p230/array.c 2008-07-01 16:34:01.000000000 +0900 -@@ -2272,7 +2272,7 @@ rb_ary_fill(argc, argv, ary) - break; - } - rb_ary_modify(ary); -- if (len > ARY_MAX_SIZE - beg) { -+ if (beg >= ARY_MAX_SIZE || len > ARY_MAX_SIZE - beg) { - rb_raise(rb_eArgError, "argument too big"); - } - end = beg + len; diff --git a/ruby-1.8.6.230-string-str_buf_cat.patch b/ruby-1.8.6.230-string-str_buf_cat.patch deleted file mode 100644 index 287ddc9..0000000 --- a/ruby-1.8.6.230-string-str_buf_cat.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -pruN ruby-1.8.6-p230.orig/string.c ruby-1.8.6-p230/string.c ---- ruby-1.8.6-p230.orig/string.c 2008-06-20 18:24:53.000000000 +0900 -+++ ruby-1.8.6-p230/string.c 2008-06-25 16:10:17.000000000 +0900 -@@ -693,9 +693,13 @@ str_buf_cat(str, ptr, len) - const char *ptr; - long len; - { -- long capa, total; -+ long capa, total, off = -1; - - rb_str_modify(str); -+ if (ptr >= RSTRING(str)->ptr && ptr <= RSTRING(str)->ptr + RSTRING(str)->len) { -+ off = ptr - RSTRING(str)->ptr; -+ } -+ if (len == 0) return 0; - if (FL_TEST(str, STR_ASSOC)) { - FL_UNSET(str, STR_ASSOC); - capa = RSTRING(str)->aux.capa = RSTRING(str)->len; -@@ -717,6 +721,9 @@ str_buf_cat(str, ptr, len) - } - RESIZE_CAPA(str, capa); - } -+ if (off != -1) { -+ ptr = RSTRING(str)->ptr + off; -+ } - memcpy(RSTRING(str)->ptr + RSTRING(str)->len, ptr, len); - RSTRING(str)->len = total; - RSTRING(str)->ptr[total] = '\0'; /* sentinel */ diff --git a/ruby-rubyprefix.patch b/ruby-rubyprefix.patch index 79daf90..8d1bd0c 100644 --- a/ruby-rubyprefix.patch +++ b/ruby-rubyprefix.patch @@ -1,7 +1,7 @@ -diff -ruN ruby-1.8.5-p12.orig/configure.in ruby-1.8.5-p12/configure.in ---- ruby-1.8.5-p12.orig/configure.in 2006-12-06 19:58:08.000000000 +0900 -+++ ruby-1.8.5-p12/configure.in 2007-02-05 17:02:43.000000000 +0900 -@@ -1505,6 +1505,13 @@ +diff -pruN ruby-1.8.6-p287.orig/configure.in ruby-1.8.6-p287/configure.in +--- ruby-1.8.6-p287.orig/configure.in 2008-07-13 00:03:28.000000000 +0900 ++++ ruby-1.8.6-p287/configure.in 2008-08-14 01:08:00.000000000 +0900 +@@ -1608,6 +1608,13 @@ case "$target_os" in rubyw_install_name="$RUBYW_INSTALL_NAME" ;; esac @@ -15,7 +15,7 @@ diff -ruN ruby-1.8.5-p12.orig/configure.in ruby-1.8.5-p12/configure.in case "$target_os" in cygwin*|mingw*|*djgpp*|os2-emx*) RUBY_LIB_PREFIX="/lib/ruby" -@@ -1513,20 +1520,29 @@ +@@ -1616,20 +1623,29 @@ case "$target_os" in RUBY_LIB_PREFIX="${prefix}/lib/ruby" ;; esac @@ -47,7 +47,7 @@ diff -ruN ruby-1.8.5-p12.orig/configure.in ruby-1.8.5-p12/configure.in RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}" AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") -@@ -1536,6 +1552,7 @@ +@@ -1639,6 +1655,7 @@ AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RU AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(sitedir)dnl @@ -55,7 +55,7 @@ diff -ruN ruby-1.8.5-p12.orig/configure.in ruby-1.8.5-p12/configure.in configure_args=$ac_configure_args AC_SUBST(configure_args)dnl -@@ -1544,7 +1561,7 @@ +@@ -1647,7 +1664,7 @@ if test "$fat_binary" != no ; then arch="fat-${target_os}" AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB, @@ -64,7 +64,7 @@ diff -ruN ruby-1.8.5-p12.orig/configure.in ruby-1.8.5-p12/configure.in AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB, "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") -@@ -1559,8 +1576,8 @@ +@@ -1662,8 +1679,8 @@ case "$target_os" in *) sitearch="${arch}" ;; esac @@ -75,11 +75,11 @@ diff -ruN ruby-1.8.5-p12.orig/configure.in ruby-1.8.5-p12/configure.in AC_ARG_WITH(search-path, [ --with-search-path=DIR specify the additional search path], -diff -ruN ruby-1.8.5-p12.orig/mkconfig.rb ruby-1.8.5-p12/mkconfig.rb ---- ruby-1.8.5-p12.orig/mkconfig.rb 2006-06-25 23:03:10.000000000 +0900 -+++ ruby-1.8.5-p12/mkconfig.rb 2007-02-05 16:54:32.000000000 +0900 -@@ -108,10 +108,10 @@ - print v_fast, v_others +diff -pruN ruby-1.8.6-p287.orig/mkconfig.rb ruby-1.8.6-p287/mkconfig.rb +--- ruby-1.8.6-p287.orig/mkconfig.rb 2008-06-08 01:37:10.000000000 +0900 ++++ ruby-1.8.6-p287/mkconfig.rb 2008-08-14 01:08:00.000000000 +0900 +@@ -139,10 +139,10 @@ print(*v_fast) + print(*v_others) print < - 1.8.6.287-1 +- New upstream release. +- Security fixes. + - CVE-2008-3655: Ruby does not properly restrict access to critical + variables and methods at various safe levels. + - CVE-2008-3656: DoS vulnerability in WEBrick. + - CVE-2008-3657: Lack of taintness check in dl. + - CVE-2008-1447: DNS spoofing vulnerability in resolv.rb. + - CVE-2008-3443: Memory allocation failure in Ruby regex engine. +- Remove the unnecessary backported patches. + * Thu Jul 10 2008 Tom "spot" Callaway - 1.8.6.230-5 - rebuild against db4-4.7 diff --git a/sources b/sources index 33ddadd..6e9470f 100644 --- a/sources +++ b/sources @@ -2,4 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -3eceb42d4fc56398676c20a49ac7e044 ruby-1.8.6-p230.tar.bz2 +80b5f3db12531d36e6c81fac6d05dda9 ruby-1.8.6-p287.tar.bz2 From 7aa361802fb8b86d0a2cfbcde128d10af1ed5056 Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Wed, 8 Oct 2008 13:30:47 +0000 Subject: [PATCH 128/529] - CVE-2008-3790: DoS vulnerability in the REXML module. --- ruby-1.8.6-rexml-CVE-2008-3790.patch | 96 ++++++++++++++++++++++++++++ ruby.spec | 7 +- 2 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.6-rexml-CVE-2008-3790.patch diff --git a/ruby-1.8.6-rexml-CVE-2008-3790.patch b/ruby-1.8.6-rexml-CVE-2008-3790.patch new file mode 100644 index 0000000..2ce6e1f --- /dev/null +++ b/ruby-1.8.6-rexml-CVE-2008-3790.patch @@ -0,0 +1,96 @@ +diff -pruN ruby-1.8.6-p287.orig/lib/rexml/document.rb ruby-1.8.6-p287/lib/rexml/document.rb +--- ruby-1.8.6-p287.orig/lib/rexml/document.rb 2007-11-04 13:50:15.000000000 +0900 ++++ ruby-1.8.6-p287/lib/rexml/document.rb 2008-10-08 22:25:14.000000000 +0900 +@@ -32,6 +32,7 @@ module REXML + # @param context if supplied, contains the context of the document; + # this should be a Hash. + def initialize( source = nil, context = {} ) ++ @entity_expansion_count = 0 + super() + @context = context + return if source.nil? +@@ -200,6 +201,27 @@ module REXML + Parsers::StreamParser.new( source, listener ).parse + end + ++ @@entity_expansion_limit = 10_000 ++ ++ # Set the entity expansion limit. By defualt the limit is set to 10000. ++ def Document::entity_expansion_limit=( val ) ++ @@entity_expansion_limit = val ++ end ++ ++ # Get the entity expansion limit. By defualt the limit is set to 10000. ++ def Document::entity_expansion_limit ++ return @@entity_expansion_limit ++ end ++ ++ attr_reader :entity_expansion_count ++ ++ def record_entity_expansion ++ @entity_expansion_count += 1 ++ if @entity_expansion_count > @@entity_expansion_limit ++ raise "number of entity expansions exceeded, processing aborted." ++ end ++ end ++ + private + def build( source ) + Parsers::TreeParser.new( source, self ).parse +diff -pruN ruby-1.8.6-p287.orig/lib/rexml/entity.rb ruby-1.8.6-p287/lib/rexml/entity.rb +--- ruby-1.8.6-p287.orig/lib/rexml/entity.rb 2007-07-28 11:46:08.000000000 +0900 ++++ ruby-1.8.6-p287/lib/rexml/entity.rb 2008-10-08 22:25:14.000000000 +0900 +@@ -73,6 +73,7 @@ module REXML + # all entities -- both %ent; and &ent; entities. This differs from + # +value()+ in that +value+ only replaces %ent; entities. + def unnormalized ++ document.record_entity_expansion + v = value() + return nil if v.nil? + @unnormalized = Text::unnormalize(v, parent) +diff -pruN ruby-1.8.6-p287.orig/test/rexml/test_document.rb ruby-1.8.6-p287/test/rexml/test_document.rb +--- ruby-1.8.6-p287.orig/test/rexml/test_document.rb 1970-01-01 09:00:00.000000000 +0900 ++++ ruby-1.8.6-p287/test/rexml/test_document.rb 2008-10-08 22:25:14.000000000 +0900 +@@ -0,0 +1,42 @@ ++require "rexml/document" ++require "test/unit" ++ ++class REXML::TestDocument < Test::Unit::TestCase ++ def test_new ++ doc = REXML::Document.new(< ++Hello world! ++EOF ++ assert_equal("Hello world!", doc.root.children.first.value) ++ end ++ ++ XML_WITH_NESTED_ENTITY = < ++ ++ ++ ++ ++ ++ ++ ++]> ++ ++&a; ++ ++EOF ++ ++ def test_entity_expansion_limit ++ doc = REXML::Document.new(XML_WITH_NESTED_ENTITY) ++ assert_raise(RuntimeError) do ++ doc.root.children.first.value ++ end ++ REXML::Document.entity_expansion_limit = 100 ++ assert_equal(100, REXML::Document.entity_expansion_limit) ++ doc = REXML::Document.new(XML_WITH_NESTED_ENTITY) ++ assert_raise(RuntimeError) do ++ doc.root.children.first.value ++ end ++ assert_equal(101, doc.entity_expansion_count) ++ end ++end diff --git a/ruby.spec b/ruby.spec index 4de644d..2206c3b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -34,6 +34,7 @@ Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch Patch25: ruby-1.8.6.111-gcc43.patch +Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -152,6 +153,7 @@ pushd %{name}-%{arcver} %patch23 -p1 %endif %patch25 -p1 +%patch26 -p1 popd %build @@ -502,6 +504,9 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog +* Wed Oct 8 2008 Akira TAGOH - 1.8.6.287-2 +- CVE-2008-3790: DoS vulnerability in the REXML module. + * Sat Aug 23 2008 Akira TAGOH - 1.8.6.287-1 - New upstream release. - Security fixes. From e861f3d73942be96d8e55a343b8b5e3bcbf00dcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Sat, 17 Jan 2009 20:59:44 +0000 Subject: [PATCH 129/529] - rebuild with new openssl --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 2206c3b..c38cdc8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -504,6 +504,9 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog +* Sat Jan 17 2009 Tomas Mraz - 1.8.6.287-3 +- rebuild with new openssl + * Wed Oct 8 2008 Akira TAGOH - 1.8.6.287-2 - CVE-2008-3790: DoS vulnerability in the REXML module. From df302447709ec2bd700a6bdc0352308e0e021eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Mon, 26 Jan 2009 14:15:26 +0000 Subject: [PATCH 130/529] - rebuild with new openssl - BN_rand_range functions are now constified --- ruby-1.8.6-ossl-rand-range.patch | 14 ++++++++++++++ ruby.spec | 5 ++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.6-ossl-rand-range.patch diff --git a/ruby-1.8.6-ossl-rand-range.patch b/ruby-1.8.6-ossl-rand-range.patch new file mode 100644 index 0000000..790a760 --- /dev/null +++ b/ruby-1.8.6-ossl-rand-range.patch @@ -0,0 +1,14 @@ +diff -up ruby-1.8.6-p287/ext/openssl/openssl_missing.h.rand-range ruby-1.8.6-p287/ext/openssl/openssl_missing.h +--- ruby-1.8.6-p287/ext/openssl/openssl_missing.h.rand-range 2008-08-04 06:43:34.000000000 +0200 ++++ ruby-1.8.6-p287/ext/openssl/openssl_missing.h 2009-01-26 15:11:23.000000000 +0100 +@@ -120,8 +120,8 @@ int X509_CRL_add0_revoked(X509_CRL *crl, + int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); + int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); + int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); +-int BN_rand_range(BIGNUM *r, BIGNUM *range); +-int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range); ++int BN_rand_range(BIGNUM *r, const BIGNUM *range); ++int BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range); + char *CONF_get1_default_config_file(void); + int PEM_def_callback(char *buf, int num, int w, void *key); + diff --git a/ruby.spec b/ruby.spec index c38cdc8..6380e4e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -35,6 +35,7 @@ Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch Patch25: ruby-1.8.6.111-gcc43.patch Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch +Patch27: ruby-1.8.6-ossl-rand-range.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -154,6 +155,7 @@ pushd %{name}-%{arcver} %endif %patch25 -p1 %patch26 -p1 +%patch27 -p1 popd %build @@ -504,8 +506,9 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog -* Sat Jan 17 2009 Tomas Mraz - 1.8.6.287-3 +* Mon Jan 26 2009 Tomas Mraz - 1.8.6.287-3 - rebuild with new openssl +- BN_rand_range functions are now constified * Wed Oct 8 2008 Akira TAGOH - 1.8.6.287-2 - CVE-2008-3790: DoS vulnerability in the REXML module. From 865d22dbc690d68e99a0b3becd75a0a2cf2dd229 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 25 Feb 2009 21:15:53 +0000 Subject: [PATCH 131/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 6380e4e..d046d7f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 4%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -506,6 +506,9 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 1.8.6.287-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Mon Jan 26 2009 Tomas Mraz - 1.8.6.287-3 - rebuild with new openssl - BN_rand_range functions are now constified From e9a1e47fca12f0b28f7a7d9b74cf9707630f376a Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Sun, 15 Mar 2009 05:56:18 +0000 Subject: [PATCH 132/529] 1.8.6.287-4 --- .cvsignore | 23 +--- import.log | 1 + ruby-1.8.6-ossl-rand-range.patch | 14 --- ruby-1.8.6-p287-CVE-2008-5189.patch | 14 +++ ruby-1.8.6-p287-remove-ssl-rand-range.patch | 113 ++++++++++++++++++++ ruby.spec | 45 ++++---- sources | 3 +- 7 files changed, 154 insertions(+), 59 deletions(-) create mode 100644 import.log delete mode 100644 ruby-1.8.6-ossl-rand-range.patch create mode 100644 ruby-1.8.6-p287-CVE-2008-5189.patch create mode 100644 ruby-1.8.6-p287-remove-ssl-rand-range.patch diff --git a/.cvsignore b/.cvsignore index 8b4ee53..ca8d1fe 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,25 +1,4 @@ -ruby-1.8.1.tar.gz -ruby-man-1.4.6.tar.bz2 +ruby-1.8.6-p287.tar.bz2 ruby-refm-rdp-1.8.1-ja-html.tar.gz -rubyfaq-990927.tar.bz2 -rubyfaq-jp-990927.tar.bz2 -*.rpm -*.gz -*.bz2 -ruby-1.8.2.tar.gz -ruby-1.8.3.tar.gz -ruby-1.8.4-preview1.tar.gz -ruby-1.8.4-preview2.tar.gz -ruby-1.8.4.tar.gz -ruby-1.8.5.tar.gz -ruby-1.8.5-p2.tar.gz -ruby-1.8.5-p12.tar.gz -ruby-1.8.6.tar.bz2 -ruby-1.8.6-p36.tar.bz2 -ruby-1.8.6-p110.tar.bz2 -ruby-1.8.6-p111.tar.bz2 rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz -ruby-1.8.6-p114.tar.bz2 -ruby-1.8.6-p230.tar.bz2 -ruby-1.8.6-p287.tar.bz2 diff --git a/import.log b/import.log new file mode 100644 index 0000000..7da8d49 --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +ruby-1_8_6_287-4_fc10:HEAD:ruby-1.8.6.287-4.fc10.src.rpm:1237096558 diff --git a/ruby-1.8.6-ossl-rand-range.patch b/ruby-1.8.6-ossl-rand-range.patch deleted file mode 100644 index 790a760..0000000 --- a/ruby-1.8.6-ossl-rand-range.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -up ruby-1.8.6-p287/ext/openssl/openssl_missing.h.rand-range ruby-1.8.6-p287/ext/openssl/openssl_missing.h ---- ruby-1.8.6-p287/ext/openssl/openssl_missing.h.rand-range 2008-08-04 06:43:34.000000000 +0200 -+++ ruby-1.8.6-p287/ext/openssl/openssl_missing.h 2009-01-26 15:11:23.000000000 +0100 -@@ -120,8 +120,8 @@ int X509_CRL_add0_revoked(X509_CRL *crl, - int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); - int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); - int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); --int BN_rand_range(BIGNUM *r, BIGNUM *range); --int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range); -+int BN_rand_range(BIGNUM *r, const BIGNUM *range); -+int BN_pseudo_rand_range(BIGNUM *r, const BIGNUM *range); - char *CONF_get1_default_config_file(void); - int PEM_def_callback(char *buf, int num, int w, void *key); - diff --git a/ruby-1.8.6-p287-CVE-2008-5189.patch b/ruby-1.8.6-p287-CVE-2008-5189.patch new file mode 100644 index 0000000..2854826 --- /dev/null +++ b/ruby-1.8.6-p287-CVE-2008-5189.patch @@ -0,0 +1,14 @@ +--- lib/cgi.rb (revision 19665) ++++ lib/cgi.rb (working copy) +@@ -546,6 +546,11 @@ + when Hash + options = options.dup + end ++ options.each_value do |value| ++ if /\n(?![ \t])/ === value ++ raise ArgumentError, "potential HTTP header injection detected" ++ end ++ end + + unless options.has_key?("type") + options["type"] = "text/html" diff --git a/ruby-1.8.6-p287-remove-ssl-rand-range.patch b/ruby-1.8.6-p287-remove-ssl-rand-range.patch new file mode 100644 index 0000000..75bef4e --- /dev/null +++ b/ruby-1.8.6-p287-remove-ssl-rand-range.patch @@ -0,0 +1,113 @@ +diff -ur ruby-1.8.6-p287.orig/ext/openssl/openssl_missing.c ruby-1.8.6-p287/ext/openssl/openssl_missing.c +--- ruby-1.8.6-p287.orig/ext/openssl/openssl_missing.c 2007-02-13 00:01:19.000000000 +0100 ++++ ruby-1.8.6-p287/ext/openssl/openssl_missing.c 2009-03-15 05:32:31.000000000 +0100 +@@ -43,7 +43,7 @@ + { + return CRYPTO_set_ex_data(&str->ex_data, idx, data); + } +- ++ + void *X509_STORE_get_ex_data(X509_STORE *str, int idx) + { + return CRYPTO_get_ex_data(&str->ex_data, idx); +@@ -113,7 +113,7 @@ + #endif + + #if !defined(HAVE_EVP_CIPHER_CTX_COPY) +-/* ++/* + * this function does not exist in OpenSSL yet... or ever?. + * a future version may break this function. + * tested on 0.9.7d. +@@ -182,12 +182,12 @@ + (ASN1_STRING *)(*a)->serialNumber, + (ASN1_STRING *)(*b)->serialNumber)); + } +- ++ + int + X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) + { + X509_CRL_INFO *inf; +- ++ + inf = crl->crl; + if (!inf->revoked) + inf->revoked = sk_X509_REVOKED_new(OSSL_X509_REVOKED_cmp); +@@ -233,54 +233,6 @@ + } + #endif + +-#if !defined(HAVE_BN_RAND_RANGE) || !defined(HAVE_BN_PSEUDO_RAND_RANGE) +-static int +-bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) +-{ +- int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand; +- int n; +- +- if (range->neg || BN_is_zero(range)) return 0; +- +- n = BN_num_bits(range); +- +- if (n == 1) { +- if (!BN_zero(r)) return 0; +- } else if (!BN_is_bit_set(range, n - 2) && !BN_is_bit_set(range, n - 3)) { +- do { +- if (!bn_rand(r, n + 1, -1, 0)) return 0; +- if (BN_cmp(r ,range) >= 0) { +- if (!BN_sub(r, r, range)) return 0; +- if (BN_cmp(r, range) >= 0) +- if (!BN_sub(r, r, range)) return 0; +- } +- } while (BN_cmp(r, range) >= 0); +- } else { +- do { +- if (!bn_rand(r, n, -1, 0)) return 0; +- } while (BN_cmp(r, range) >= 0); +- } +- +- return 1; +-} +-#endif +- +-#if !defined(HAVE_BN_RAND_RANGE) +-int +-BN_rand_range(BIGNUM *r, BIGNUM *range) +-{ +- return bn_rand_range(0, r, range); +-} +-#endif +- +-#if !defined(HAVE_BN_PSEUDO_RAND_RANGE) +-int +-BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range) +-{ +- return bn_rand_range(1, r, range); +-} +-#endif +- + #if !defined(HAVE_CONF_GET1_DEFAULT_CONFIG_FILE) + #define OPENSSL_CONF "openssl.cnf" + char * +@@ -315,7 +267,7 @@ + { + int i,j; + const char *prompt; +- ++ + if (key) { + i = strlen(key); + i = (i > num) ? num : i; +diff -ur ruby-1.8.6-p287.orig/ext/openssl/openssl_missing.h ruby-1.8.6-p287/ext/openssl/openssl_missing.h +--- ruby-1.8.6-p287.orig/ext/openssl/openssl_missing.h 2008-08-04 06:43:34.000000000 +0200 ++++ ruby-1.8.6-p287/ext/openssl/openssl_missing.h 2009-03-15 05:33:56.000000000 +0100 +@@ -120,8 +120,6 @@ + int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); + int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); + int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); +-int BN_rand_range(BIGNUM *r, BIGNUM *range); +-int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range); + char *CONF_get1_default_config_file(void); + int PEM_def_callback(char *buf, int num, int w, void *key); + +Only in ruby-1.8.6-p287/ext/openssl: .openssl_missing.h.swp diff --git a/ruby.spec b/ruby.spec index d046d7f..1b9c9de 100644 --- a/ruby.spec +++ b/ruby.spec @@ -34,8 +34,9 @@ Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch Patch25: ruby-1.8.6.111-gcc43.patch -Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch -Patch27: ruby-1.8.6-ossl-rand-range.patch +Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch +Patch27: ruby-1.8.6-p287-CVE-2008-5189.patch +Patch28: ruby-1.8.6-p287-remove-ssl-rand-range.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -155,7 +156,8 @@ pushd %{name}-%{arcver} %endif %patch25 -p1 %patch26 -p1 -%patch27 -p1 +%patch27 -p0 +%patch28 -p1 popd %build @@ -167,7 +169,7 @@ autoconf rb_cv_func_strtod=no export rb_cv_func_strtod -CFLAGS="$RPM_OPT_FLAGS -Wall" +CFLAGS="$RPM_OPT_FLAGS -Wall -O0 -fno-strict-aliasing" export CFLAGS %configure \ --with-sitedir='%{sitedir}' \ @@ -281,11 +283,11 @@ done find -type f | xargs chmod 0644 # convert to utf-8 -for i in `find -type f`; do - iconv -f utf-8 -t utf-8 $i > /dev/null 2>&1 || (iconv -f euc-jp -t utf-8 $i > $i.new && mv $i.new $i || exit 1) - if [ $? != 0 ]; then - iconv -f iso8859-1 -t utf-8 $i > $.new && mv $i.new $i || exit 1 - fi +for i in `find -type f ! -name "*.gif"`; do + sh -c "iconv -f utf-8 -t utf-8 $i > /dev/null 2>&1 || (iconv -f euc-jp -t utf-8 $i > $i.new && mv $i.new $i || exit 1) + if [ $? != 0 ]; then + iconv -f iso8859-1 -t utf-8 $i > $.new && mv $i.new $i || exit 1 + fi" done # done @@ -328,6 +330,8 @@ for i in $RPM_BUILD_ROOT%{_prefix}/lib/ruby/1.8/{abbrev,generator,irb/{cmd/subir sed -i -e '/^#!.*/,1D' $i done +find $RPM_BUILD_ROOT/ -name "*.so" -exec chmod 755 {} \; + %clean rm -rf $RPM_BUILD_ROOT rm -rf tmp-ruby-docs @@ -343,10 +347,10 @@ rm -rf tmp-ruby-docs %doc %{name}-%{arcver}/GPL %doc %{name}-%{arcver}/LEGAL %doc %{name}-%{arcver}/LGPL -%doc %{name}-%{arcver}/NEWS +%doc %{name}-%{arcver}/NEWS %doc %{name}-%{arcver}/README %lang(ja) %doc %{name}-%{arcver}/README.ja -%doc %{name}-%{arcver}/ToDo +%doc %{name}-%{arcver}/ToDo %doc %{name}-%{arcver}/doc/ChangeLog-1.8.0 %doc %{name}-%{arcver}/doc/NEWS-1.8.0 %doc tmp-ruby-docs/ruby/* @@ -506,12 +510,11 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog -* Wed Feb 25 2009 Fedora Release Engineering - 1.8.6.287-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild +* Thu Mar 05 2009 Jeroen van Meeuwen - 1.8.6.287-4 +- Rebuild for gcc4.4 -* Mon Jan 26 2009 Tomas Mraz - 1.8.6.287-3 -- rebuild with new openssl -- BN_rand_range functions are now constified +* Fri Feb 27 2009 Jeroen van Meeuwen - 1.8.6.287-3 +- CVE-2008-5189: CGI header injection. * Wed Oct 8 2008 Akira TAGOH - 1.8.6.287-2 - CVE-2008-3790: DoS vulnerability in the REXML module. @@ -891,8 +894,8 @@ rm -rf tmp-ruby-docs * Mon Dec 16 2002 Elliot Lee 1.6.7-13 - Remove ExcludeArch: x86_64 -- Fix x86_64 ruby with long2int.patch (ruby was assuming that sizeof(long) - == sizeof(int). The patch does not fix the source of the problem, just +- Fix x86_64 ruby with long2int.patch (ruby was assuming that sizeof(long) + == sizeof(int). The patch does not fix the source of the problem, just makes it a non-issue.) - _smp_mflags @@ -949,7 +952,7 @@ rm -rf tmp-ruby-docs removed. - ruby-1.6.7-100.patch: applied a bug fix patch. (ruby-dev#16274: patch for 'wm state') - (PR#206ja: SEGV handle EXIT) + (PR#206ja: SEGV handle EXIT) - ruby-1.6.7-101.patch: applied a bug fix patch. (ruby-list#34313: singleton should not be Marshal.dump'ed) (ruby-dev#16411: block local var) @@ -1050,7 +1053,7 @@ rm -rf tmp-ruby-docs * Thu Dec 14 2000 akira yamada - Removed ruby_cvs.2000101901.patch, added ruby_cvs.2000121413.patch (upgraded ruby to latest cvs version). -- Removed ruby-dev.11262.patch, ruby-dev.11265.patch, +- Removed ruby-dev.11262.patch, ruby-dev.11265.patch, and ruby-dev.11268.patch (included into above patch). * Sun Nov 12 2000 MACHINO, Satoshi 1.6.1-0vl9 @@ -1064,7 +1067,7 @@ rm -rf tmp-ruby-docs (upgraded ruby to latest cvs version). - Added ruby-dev.11262.patch. - Added ruby-dev.11265.patch. - + * Wed Oct 11 2000 akira yamada - Removed ruby_cvs.2000100313.patch and added ruby_cvs.2000101117.patch (upgraded ruby to latest cvs version). diff --git a/sources b/sources index 6e9470f..6c9de9d 100644 --- a/sources +++ b/sources @@ -1,5 +1,4 @@ -8336b859400795ec51d05878c1a658b7 ruby-man-1.4.6.tar.bz2 +80b5f3db12531d36e6c81fac6d05dda9 ruby-1.8.6-p287.tar.bz2 d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -80b5f3db12531d36e6c81fac6d05dda9 ruby-1.8.6-p287.tar.bz2 From 281b4a6f518d589d43744cde4c3aac969b4be255 Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Sun, 15 Mar 2009 05:58:14 +0000 Subject: [PATCH 133/529] 1.8.6.287-5 --- import.log | 1 + ruby.spec | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/import.log b/import.log index 7da8d49..ed81896 100644 --- a/import.log +++ b/import.log @@ -1 +1,2 @@ ruby-1_8_6_287-4_fc10:HEAD:ruby-1.8.6.287-4.fc10.src.rpm:1237096558 +ruby-1_8_6_287-5_fc10:HEAD:ruby-1.8.6.287-5.fc10.src.rpm:1237096677 diff --git a/ruby.spec b/ruby.spec index 1b9c9de..ee62473 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 4%{?dist} +Release: 5%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -510,7 +510,7 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog -* Thu Mar 05 2009 Jeroen van Meeuwen - 1.8.6.287-4 +* Thu Mar 05 2009 Jeroen van Meeuwen - 1.8.6.287-5 - Rebuild for gcc4.4 * Fri Feb 27 2009 Jeroen van Meeuwen - 1.8.6.287-3 From 01a3f0d0130341ba8fc8136fa6460e3c0e05ead5 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 15 Mar 2009 17:46:10 +0000 Subject: [PATCH 134/529] - Again use -O2 optimization level - i586 should search i386-linux directory --- ruby-always-use-i386.patch | 11 +++++++++++ ruby.spec | 12 +++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 ruby-always-use-i386.patch diff --git a/ruby-always-use-i386.patch b/ruby-always-use-i386.patch new file mode 100644 index 0000000..9dc8c87 --- /dev/null +++ b/ruby-always-use-i386.patch @@ -0,0 +1,11 @@ +--- ruby-1.8.6-p287/configure.in.i386 2009-03-16 00:55:15.000000000 +0900 ++++ ruby-1.8.6-p287/configure.in 2009-03-16 01:42:41.000000000 +0900 +@@ -1662,6 +1662,8 @@ + configure_args=$ac_configure_args + AC_SUBST(configure_args)dnl + ++target_cpu=`echo $target_cpu | sed s/i.86/i386/` ++ + if test "$fat_binary" != no ; then + arch="fat-${target_os}" + diff --git a/ruby.spec b/ruby.spec index ee62473..322d5bb 100644 --- a/ruby.spec +++ b/ruby.spec @@ -8,11 +8,11 @@ # This is required to ensure that noarch files puts under /usr/lib/... for # multilib because ruby library is installed under /usr/{lib,lib64}/ruby anyway. %define sitedir2 %{_prefix}/lib/ruby/site_ruby -%define _normalized_cpu %(echo `echo %{_target_cpu} | sed 's/^ppc/powerpc/'`) +%define _normalized_cpu %(echo `echo %{_target_cpu} | sed 's/^ppc/powerpc/' | sed -e 's|i.86|i386|'`) Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 5%{?dist} +Release: 6%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -37,6 +37,7 @@ Patch25: ruby-1.8.6.111-gcc43.patch Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch Patch27: ruby-1.8.6-p287-CVE-2008-5189.patch Patch28: ruby-1.8.6-p287-remove-ssl-rand-range.patch +Patch29: ruby-always-use-i386.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -158,6 +159,7 @@ pushd %{name}-%{arcver} %patch26 -p1 %patch27 -p0 %patch28 -p1 +%patch29 -p1 popd %build @@ -169,7 +171,7 @@ autoconf rb_cv_func_strtod=no export rb_cv_func_strtod -CFLAGS="$RPM_OPT_FLAGS -Wall -O0 -fno-strict-aliasing" +CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" export CFLAGS %configure \ --with-sitedir='%{sitedir}' \ @@ -510,6 +512,10 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog +* Mon Mar 16 2009 Mamoru Tasaka - 1.8.6.287-6 +- Again use -O2 optimization level +- i586 should search i386-linux directory + * Thu Mar 05 2009 Jeroen van Meeuwen - 1.8.6.287-5 - Rebuild for gcc4.4 From 0a0cf58fbbbed4ff499d50d9576fa7ee03eb94dd Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Wed, 18 Mar 2009 04:50:29 +0000 Subject: [PATCH 135/529] 1.8.6.287-7 --- import.log | 1 + ruby-1.8.6-rexml-CVE-2008-3790.patch | 6 +++--- ruby.spec | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/import.log b/import.log index ed81896..a10a94e 100644 --- a/import.log +++ b/import.log @@ -1,2 +1,3 @@ ruby-1_8_6_287-4_fc10:HEAD:ruby-1.8.6.287-4.fc10.src.rpm:1237096558 ruby-1_8_6_287-5_fc10:HEAD:ruby-1.8.6.287-5.fc10.src.rpm:1237096677 +ruby-1_8_6_287-7_fc11:HEAD:ruby-1.8.6.287-7.fc11.src.rpm:1237351812 diff --git a/ruby-1.8.6-rexml-CVE-2008-3790.patch b/ruby-1.8.6-rexml-CVE-2008-3790.patch index 2ce6e1f..2db8dd6 100644 --- a/ruby-1.8.6-rexml-CVE-2008-3790.patch +++ b/ruby-1.8.6-rexml-CVE-2008-3790.patch @@ -12,7 +12,7 @@ diff -pruN ruby-1.8.6-p287.orig/lib/rexml/document.rb ruby-1.8.6-p287/lib/rexml/ @@ -200,6 +201,27 @@ module REXML Parsers::StreamParser.new( source, listener ).parse end - + + @@entity_expansion_limit = 10_000 + + # Set the entity expansion limit. By defualt the limit is set to 10000. @@ -26,7 +26,7 @@ diff -pruN ruby-1.8.6-p287.orig/lib/rexml/document.rb ruby-1.8.6-p287/lib/rexml/ + end + + attr_reader :entity_expansion_count -+ ++ + def record_entity_expansion + @entity_expansion_count += 1 + if @entity_expansion_count > @@entity_expansion_limit @@ -44,7 +44,7 @@ diff -pruN ruby-1.8.6-p287.orig/lib/rexml/entity.rb ruby-1.8.6-p287/lib/rexml/en # all entities -- both %ent; and &ent; entities. This differs from # +value()+ in that +value+ only replaces %ent; entities. def unnormalized -+ document.record_entity_expansion ++ document.record_entity_expansion unless document.nil? v = value() return nil if v.nil? @unnormalized = Text::unnormalize(v, parent) diff --git a/ruby.spec b/ruby.spec index 322d5bb..bd7e080 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 6%{?dist} +Release: 7%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -512,6 +512,9 @@ rm -rf tmp-ruby-docs %{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el %changelog +* Wed Mar 18 2009 Jeroen van Meeuwen - 1.8.6.287-7 +- Fix regression in CVE-2008-3790 (#485383) + * Mon Mar 16 2009 Mamoru Tasaka - 1.8.6.287-6 - Again use -O2 optimization level - i586 should search i386-linux directory From ea13dff1e75cc0644ca5ef83fb24c155cc20edc9 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 11 Apr 2009 14:41:42 +0000 Subject: [PATCH 136/529] - Merge Review fix (#226381) --- .cvsignore | 1 + ruby.spec | 53 +++++++++++++++++++++++++++++++++++++---------------- sources | 1 + 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/.cvsignore b/.cvsignore index ca8d1fe..05533e8 100644 --- a/.cvsignore +++ b/.cvsignore @@ -2,3 +2,4 @@ ruby-1.8.6-p287.tar.bz2 ruby-refm-rdp-1.8.1-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz +ruby-refm-rdp-1.8.2-ja-html.tar.gz diff --git a/ruby.spec b/ruby.spec index bd7e080..67fa3e5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,9 +10,13 @@ %define sitedir2 %{_prefix}/lib/ruby/site_ruby %define _normalized_cpu %(echo `echo %{_target_cpu} | sed 's/^ppc/powerpc/' | sed -e 's|i.86|i386|'`) +# emacs sitelisp directory +%{!?_emacs_sitelispdir: %global _emacs_sitelispdir %{_datadir}/emacs/site-lisp} +%{!?_emacs_sitestartdir: %global _emacs_sitelispdir %{_datadir}/emacs/site-lisp/site-start.d} + Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 7%{?dist} +Release: 8%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -22,7 +26,8 @@ BuildRequires: emacs Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{arcver}.tar.bz2 ## Dead link ##Source1: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz -Source1: %{name}-refm-rdp-1.8.1-ja-html.tar.gz +#Source1: %{name}-refm-rdp-1.8.1-ja-html.tar.gz +Source1: http://elbereth-hp.hp.infoseek.co.jp/files/ruby/refm/old/2005/%{name}-refm-rdp-1.8.2-ja-html.tar.gz Source2: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz Source4: irb.1 @@ -53,6 +58,9 @@ straight-forward, and extensible. %package libs Summary: Libraries necessary to run Ruby Group: Development/Libraries +# ext/bigdecimal/bigdecimal.{c,h} are under (GPL+ or Artistic) which +# are used for bigdecimal.so +License: (Ruby or GPLv2) and (GPL+ or Artistic) Provides: ruby(abi) = %{rubyxver} Provides: libruby = %{version}-%{release} Obsoletes: libruby <= %{version}-%{release} @@ -75,6 +83,8 @@ Ruby or an application embedded Ruby. %package tcltk Summary: Tcl/Tk interface for scripting language Ruby Group: Development/Languages +# Many files under ext/tk/sample/ are under TCL +License: (Ruby or GPLv2) and TCL Requires: %{name}-libs = %{version}-%{release} %description tcltk @@ -96,6 +106,8 @@ from the terminal. %package rdoc Summary: A tool to generate documentation from Ruby source files Group: Development/Languages +# generators/template/html/html.rb is under CC-BY +License: (GPLv2 or Ruby) and CC-BY ## ruby-irb requires ruby #Requires: %{name} = %{version}-%{release} Requires: %{name}-irb = %{version}-%{release} @@ -197,7 +209,9 @@ popd %check pushd %{name}-%{arcver} -%ifnarch ppc64 +%ifarch ppc64 +make test || : +%else make test %endif popd @@ -205,8 +219,8 @@ popd %install rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode -mkdir -p $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d +mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir}/ruby-mode +mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir} # installing documents and exapmles... rm -rf tmp-ruby-docs @@ -286,10 +300,15 @@ find -type f | xargs chmod 0644 # convert to utf-8 for i in `find -type f ! -name "*.gif"`; do - sh -c "iconv -f utf-8 -t utf-8 $i > /dev/null 2>&1 || (iconv -f euc-jp -t utf-8 $i > $i.new && mv $i.new $i || exit 1) - if [ $? != 0 ]; then - iconv -f iso8859-1 -t utf-8 $i > $.new && mv $i.new $i || exit 1 - fi" + status=0 + iconv -f utf-8 -t utf-8 $i >/dev/null || { iconv -f euc-jp -t utf-8 $i > $i.new && mv $i.new $i || status=1 ; } + if [ $status = 0 ]; then + if dirname $i | grep -q refm-ja ; then + sed -i -e '/encoding/s|EUC-JP|UTF-8|' -e '/charset/s|EUC-JP|UTF-8|' $i + fi + else + iconv -f iso8859-1 -t utf-8 $i > $.new && mv $i.new $i || rm -f $i.new + fi done # done @@ -312,10 +331,10 @@ install -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/ # installing ruby-mode cd %{name}-%{arcver} -cp -p misc/*.el $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode +cp -p misc/*.el $RPM_BUILD_ROOT%{_emacs_sitelispdir}/ruby-mode ## for ruby-mode -pushd $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/ruby-mode +pushd $RPM_BUILD_ROOT%{_emacs_sitelispdir}/ruby-mode cat < path.el (setq load-path (cons "." load-path) byte-compile-warnings nil) EOF @@ -323,7 +342,7 @@ emacs --no-site-file -q -batch -l path.el -f batch-byte-compile *.el rm -f path.el* popd install -p -m 644 %{SOURCE10} \ - $RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp/site-start.d + $RPM_BUILD_ROOT%{_emacs_sitestartdir} cd .. @@ -336,7 +355,6 @@ find $RPM_BUILD_ROOT/ -name "*.so" -exec chmod 755 {} \; %clean rm -rf $RPM_BUILD_ROOT -rm -rf tmp-ruby-docs %post libs -p /sbin/ldconfig @@ -508,16 +526,19 @@ rm -rf tmp-ruby-docs %doc %{name}-%{arcver}/LEGAL %doc %{name}-%{arcver}/LGPL %doc %{name}-%{arcver}/misc/README -%{_datadir}/emacs/site-lisp/ruby-mode -%{_datadir}/emacs/site-lisp/site-start.d/ruby-mode-init.el +%{_emacs_sitelispdir}/ruby-mode +%{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Sat Apr 11 2009 Mamoru Tasaka - 1.8.6.287-8 +- Merge Review fix (#226381) + * Wed Mar 18 2009 Jeroen van Meeuwen - 1.8.6.287-7 - Fix regression in CVE-2008-3790 (#485383) * Mon Mar 16 2009 Mamoru Tasaka - 1.8.6.287-6 - Again use -O2 optimization level -- i586 should search i386-linux directory +- i586 should search i386-linux directory (on <= F-11) * Thu Mar 05 2009 Jeroen van Meeuwen - 1.8.6.287-5 - Rebuild for gcc4.4 diff --git a/sources b/sources index 6c9de9d..19d9781 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz +b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz From 168ffcfeea9d00f8c2900d149a55bb62ff7f0aad Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Wed, 20 May 2009 23:36:22 +0000 Subject: [PATCH 137/529] Fix wrong macros definition --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 67fa3e5..c3796b3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ # emacs sitelisp directory %{!?_emacs_sitelispdir: %global _emacs_sitelispdir %{_datadir}/emacs/site-lisp} -%{!?_emacs_sitestartdir: %global _emacs_sitelispdir %{_datadir}/emacs/site-lisp/site-start.d} +%{!?_emacs_sitestartdir: %global _emacs_sitestartdir %{_datadir}/emacs/site-lisp/site-start.d} Name: ruby Version: %{rubyver}%{?dotpatchlevel} From c11147cfd2fd2e5a0333ceca6e08af88e3f946b1 Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Sun, 31 May 2009 08:42:06 +0000 Subject: [PATCH 138/529] 1.8.6.368-1 --- .cvsignore | 5 ++--- import.log | 1 + ruby-1.8.6-p287-remove-ssl-rand-range.patch | 13 ------------- ruby-1.8.6.111-gcc43.patch | 16 ---------------- ruby.spec | 14 +++++++++----- sources | 5 ++--- 6 files changed, 14 insertions(+), 40 deletions(-) delete mode 100644 ruby-1.8.6.111-gcc43.patch diff --git a/.cvsignore b/.cvsignore index 05533e8..36ef766 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,5 +1,4 @@ -ruby-1.8.6-p287.tar.bz2 -ruby-refm-rdp-1.8.1-ja-html.tar.gz +ruby-refm-rdp-1.8.2-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz -ruby-refm-rdp-1.8.2-ja-html.tar.gz +ruby-1.8.6-p368.tar.bz2 diff --git a/import.log b/import.log index a10a94e..e87e717 100644 --- a/import.log +++ b/import.log @@ -1,3 +1,4 @@ ruby-1_8_6_287-4_fc10:HEAD:ruby-1.8.6.287-4.fc10.src.rpm:1237096558 ruby-1_8_6_287-5_fc10:HEAD:ruby-1.8.6.287-5.fc10.src.rpm:1237096677 ruby-1_8_6_287-7_fc11:HEAD:ruby-1.8.6.287-7.fc11.src.rpm:1237351812 +ruby-1_8_6_368-1_fc11:HEAD:ruby-1.8.6.368-1.fc11.src.rpm:1243759307 diff --git a/ruby-1.8.6-p287-remove-ssl-rand-range.patch b/ruby-1.8.6-p287-remove-ssl-rand-range.patch index 75bef4e..705f3d3 100644 --- a/ruby-1.8.6-p287-remove-ssl-rand-range.patch +++ b/ruby-1.8.6-p287-remove-ssl-rand-range.patch @@ -98,16 +98,3 @@ diff -ur ruby-1.8.6-p287.orig/ext/openssl/openssl_missing.c ruby-1.8.6-p287/ext/ if (key) { i = strlen(key); i = (i > num) ? num : i; -diff -ur ruby-1.8.6-p287.orig/ext/openssl/openssl_missing.h ruby-1.8.6-p287/ext/openssl/openssl_missing.h ---- ruby-1.8.6-p287.orig/ext/openssl/openssl_missing.h 2008-08-04 06:43:34.000000000 +0200 -+++ ruby-1.8.6-p287/ext/openssl/openssl_missing.h 2009-03-15 05:33:56.000000000 +0100 -@@ -120,8 +120,6 @@ - int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx); - int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); - int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m, BN_CTX *ctx); --int BN_rand_range(BIGNUM *r, BIGNUM *range); --int BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range); - char *CONF_get1_default_config_file(void); - int PEM_def_callback(char *buf, int num, int w, void *key); - -Only in ruby-1.8.6-p287/ext/openssl: .openssl_missing.h.swp diff --git a/ruby-1.8.6.111-gcc43.patch b/ruby-1.8.6.111-gcc43.patch deleted file mode 100644 index 9e1b297..0000000 --- a/ruby-1.8.6.111-gcc43.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -pruN ruby-1.8.6-p111.orig/ext/socket/socket.c ruby-1.8.6-p111/ext/socket/socket.c ---- ruby-1.8.6-p111.orig/ext/socket/socket.c 2007-05-23 00:08:43.000000000 +0900 -+++ ruby-1.8.6-p111/ext/socket/socket.c 2008-02-19 11:24:22.000000000 +0900 -@@ -893,10 +893,10 @@ port_str(port, pbuf, len) - } - - #ifndef NI_MAXHOST --# define 1025 -+# define NI_MAXHOST 1025 - #endif - #ifndef NI_MAXSERV --# define 32 -+# define NI_MAXSERV 32 - #endif - - static struct addrinfo* diff --git a/ruby.spec b/ruby.spec index c3796b3..c0e342f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %define rubyxver 1.8 %define rubyver 1.8.6 -%define _patchlevel 287 +%define _patchlevel 368 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define arcver %{rubyver}%{?patchlevel} @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 8%{?dist} +Release: 1%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -38,7 +38,8 @@ Patch20: ruby-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch -Patch25: ruby-1.8.6.111-gcc43.patch +# Needed in 1.8.6-p287, no longer needed in 1.8.6-p368? +#Patch25: ruby-1.8.6.111-gcc43.patch Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch Patch27: ruby-1.8.6-p287-CVE-2008-5189.patch Patch28: ruby-1.8.6-p287-remove-ssl-rand-range.patch @@ -167,8 +168,8 @@ pushd %{name}-%{arcver} %patch22 -p1 %patch23 -p1 %endif -%patch25 -p1 -%patch26 -p1 +#%patch25 -p1 +#%patch26 -p1 %patch27 -p0 %patch28 -p1 %patch29 -p1 @@ -530,6 +531,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Sun May 31 2009 Jeroen van Meeuwen - 1.8.6.368-1 +- New upstream release (p368) + * Sat Apr 11 2009 Mamoru Tasaka - 1.8.6.287-8 - Merge Review fix (#226381) diff --git a/sources b/sources index 19d9781..63ec757 100644 --- a/sources +++ b/sources @@ -1,5 +1,4 @@ -80b5f3db12531d36e6c81fac6d05dda9 ruby-1.8.6-p287.tar.bz2 -d65e3a216d6d345a2a6f1aa8758c2f75 ruby-refm-rdp-1.8.1-ja-html.tar.gz +b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz +623447c6d8c973193aae565a5538ccfc ruby-1.8.6-p368.tar.bz2 From cd6aa0e02c88d05d0c8e1b7fc1fe078e12654f44 Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Sat, 20 Jun 2009 17:50:59 +0000 Subject: [PATCH 139/529] 1.8.6.368-2 --- .cvsignore | 2 +- import.log | 1 + ruby.spec | 11 +++++++++-- sources | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index 36ef766..1f1c551 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ +ruby-1.8.6-p368.tar.bz2 ruby-refm-rdp-1.8.2-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz -ruby-1.8.6-p368.tar.bz2 diff --git a/import.log b/import.log index e87e717..d2dcbe1 100644 --- a/import.log +++ b/import.log @@ -2,3 +2,4 @@ ruby-1_8_6_287-4_fc10:HEAD:ruby-1.8.6.287-4.fc10.src.rpm:1237096558 ruby-1_8_6_287-5_fc10:HEAD:ruby-1.8.6.287-5.fc10.src.rpm:1237096677 ruby-1_8_6_287-7_fc11:HEAD:ruby-1.8.6.287-7.fc11.src.rpm:1237351812 ruby-1_8_6_368-1_fc11:HEAD:ruby-1.8.6.368-1.fc11.src.rpm:1243759307 +ruby-1_8_6_368-2_fc11:HEAD:ruby-1.8.6.368-2.fc11.src.rpm:1245520186 diff --git a/ruby.spec b/ruby.spec index c0e342f..88901d0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -130,7 +130,7 @@ Manuals and FAQs for the object-oriented scripting language Ruby. %package mode -Summary: Emacs Lisp ruby-mode for the scripting language Ruby +Summary: Emacs Lisp for the scripting language Ruby Group: Applications/Editors Requires: emacs-common @@ -405,8 +405,12 @@ rm -rf $RPM_BUILD_ROOT %dir %{_prefix}/lib/ruby %dir %{_prefix}/lib/ruby/%{rubyxver} %ifnarch ppc64 s390x sparc64 x86_64 +%if "%{_gnu}" == "-gnueabi" +%dir %{_prefix}/lib/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os}-eabi +%else %dir %{_prefix}/lib/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} %endif +%endif %ifarch ppc64 s390x sparc64 x86_64 %dir %{_libdir}/ruby %dir %{_libdir}/ruby/%{rubyxver} @@ -531,6 +535,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Sat Jun 20 2009 Jeroen van Meeuwen - 1.8.6.368-2 +- Fix directory on ARM (#506233, Kedar Sovani) + * Sun May 31 2009 Jeroen van Meeuwen - 1.8.6.368-1 - New upstream release (p368) diff --git a/sources b/sources index 63ec757..62029b4 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ +623447c6d8c973193aae565a5538ccfc ruby-1.8.6-p368.tar.bz2 b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -623447c6d8c973193aae565a5538ccfc ruby-1.8.6-p368.tar.bz2 From 6d07108771f8530395b4b3470bfb6fb6dcc50221 Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Tue, 23 Jun 2009 12:39:02 +0000 Subject: [PATCH 140/529] 1.8.6.369-1 --- .cvsignore | 2 +- import.log | 1 + ruby.spec | 7 ++++--- sources | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index 1f1c551..9be1be4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ -ruby-1.8.6-p368.tar.bz2 ruby-refm-rdp-1.8.2-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz +ruby-1.8.6-p369.tar.bz2 diff --git a/import.log b/import.log index d2dcbe1..47636a0 100644 --- a/import.log +++ b/import.log @@ -3,3 +3,4 @@ ruby-1_8_6_287-5_fc10:HEAD:ruby-1.8.6.287-5.fc10.src.rpm:1237096677 ruby-1_8_6_287-7_fc11:HEAD:ruby-1.8.6.287-7.fc11.src.rpm:1237351812 ruby-1_8_6_368-1_fc11:HEAD:ruby-1.8.6.368-1.fc11.src.rpm:1243759307 ruby-1_8_6_368-2_fc11:HEAD:ruby-1.8.6.368-2.fc11.src.rpm:1245520186 +ruby-1_8_6_369-1_fc11:HEAD:ruby-1.8.6.369-1.fc11.src.rpm:1245760717 diff --git a/ruby.spec b/ruby.spec index 88901d0..bed6afe 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %define rubyxver 1.8 %define rubyver 1.8.6 -%define _patchlevel 368 +%define _patchlevel 369 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define arcver %{rubyver}%{?patchlevel} @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 1%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -535,7 +535,8 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog -* Sat Jun 20 2009 Jeroen van Meeuwen - 1.8.6.368-2 +* Sat Jun 20 2009 Jeroen van Meeuwen - 1.8.6.369-1 +- New patchlevel fixing CVE-2009-1904 - Fix directory on ARM (#506233, Kedar Sovani) * Sun May 31 2009 Jeroen van Meeuwen - 1.8.6.368-1 diff --git a/sources b/sources index 62029b4..34e5163 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ -623447c6d8c973193aae565a5538ccfc ruby-1.8.6-p368.tar.bz2 b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz +c3c1f3dd0dfbd2e17a04e59c2f12cfc8 ruby-1.8.6-p369.tar.bz2 From 36fd38003bd475e507f076cb6c613e227ad3c47f Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 23 Jul 2009 14:57:46 +0000 Subject: [PATCH 141/529] - Make sure that readline.so is linked against readline 5 because Ruby is under GPLv2 --- ruby.spec | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index bed6afe..c8cfc24 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,11 +16,16 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: readline readline-devel ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel byacc +%if 0%{?fedora} >= 12 +BuildRequires: compat-readline5-devel +%else +BuildRequires: readline readline-devel +%endif +BuildRequires: ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel byacc BuildRequires: emacs Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{arcver}.tar.bz2 @@ -197,6 +202,10 @@ export CFLAGS --enable-pthread \ --with-lookup-order-hack=INET \ --disable-rpath \ +%if 0%{?fedora} >= 12 + --with-readline-include=%{_includedir}/readline5 \ + --with-readline-lib=%{_libdir}/readline5 \ +%endif --with-ruby-prefix=%{_prefix}/lib make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} COPY="cp -p" %{?_smp_mflags} @@ -535,6 +544,10 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Thu Jul 23 2009 Mamoru Tasaka - 1.8.6.369-2 +- Make sure that readline.so is linked against readline 5 because + Ruby is under GPLv2 + * Sat Jun 20 2009 Jeroen van Meeuwen - 1.8.6.369-1 - New patchlevel fixing CVE-2009-1904 - Fix directory on ARM (#506233, Kedar Sovani) From 3cd55689a5a7ba3f596627ac0b64aad6c941c1ac Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 23 Jul 2009 16:38:15 +0000 Subject: [PATCH 142/529] wait until tk 8.5.7 is rebuilt --- noautobuild | 1 + 1 file changed, 1 insertion(+) create mode 100644 noautobuild diff --git a/noautobuild b/noautobuild new file mode 100644 index 0000000..7d5a48a --- /dev/null +++ b/noautobuild @@ -0,0 +1 @@ +wait until tk 8.5.7 is rebuilt From 3bbdfef7145f7ae1c9a831a22859d58b76537fc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Wed, 26 Aug 2009 09:49:47 +0000 Subject: [PATCH 143/529] - Rebuild against new openssl --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index c8cfc24..f7e9f1a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -544,6 +544,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Wed Aug 26 2009 Tomas Mraz - 1.8.6.369-3 +- Rebuild against new openssl + * Thu Jul 23 2009 Mamoru Tasaka - 1.8.6.369-2 - Make sure that readline.so is linked against readline 5 because Ruby is under GPLv2 From 209e5c2542a191614514922616878f051f33a56a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Wed, 26 Aug 2009 10:11:58 +0000 Subject: [PATCH 144/529] - fix openssl-1.0 API incompatibility --- ruby-openssl-1.0.patch | 64 ++++++++++++++++++++++++++++++++++++++++++ ruby.spec | 2 ++ 2 files changed, 66 insertions(+) create mode 100644 ruby-openssl-1.0.patch diff --git a/ruby-openssl-1.0.patch b/ruby-openssl-1.0.patch new file mode 100644 index 0000000..29e9971 --- /dev/null +++ b/ruby-openssl-1.0.patch @@ -0,0 +1,64 @@ +diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c +--- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 2007-02-13 00:01:19.000000000 +0100 ++++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c 2009-08-26 12:00:27.000000000 +0200 +@@ -90,6 +90,10 @@ ossl_x509_ary2sk(VALUE ary) + return sk; + } + ++#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#define STACK _STACK ++#endif ++ + #define OSSL_IMPL_SK2ARY(name, type) \ + VALUE \ + ossl_##name##_sk2ary(STACK *sk) \ +diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c +--- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10 2007-03-12 05:12:32.000000000 +0100 ++++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c 2009-08-26 12:08:48.000000000 +0200 +@@ -89,12 +89,18 @@ static char *ossl_sslctx_attrs[] = { + static char *ossl_ssl_attr_readers[] = { "io", "context", }; + static char *ossl_ssl_attrs[] = { "sync_close", }; + ++#if OPENSSL_VERSION_NUMBER >= 0x10000000L ++#define OSSL_MORE_CONST const ++#define STACK _STACK ++#else ++#define OSSL_MORE_CONST ++#endif + /* + * SSLContext class + */ + struct { + const char *name; +- SSL_METHOD *(*func)(void); ++ OSSL_MORE_CONST SSL_METHOD *(*func)(void); + } ossl_ssl_method_tab[] = { + #define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method } + OSSL_SSL_METHOD_ENTRY(TLSv1), +@@ -144,7 +150,7 @@ static VALUE + ossl_sslctx_initialize(int argc, VALUE *argv, VALUE self) + { + VALUE ssl_method; +- SSL_METHOD *method = NULL; ++ OSSL_MORE_CONST SSL_METHOD *method = NULL; + SSL_CTX *ctx; + int i; + char *s; +@@ -407,7 +413,7 @@ ossl_sslctx_setup(VALUE self) + } + + static VALUE +-ossl_ssl_cipher_to_ary(SSL_CIPHER *cipher) ++ossl_ssl_cipher_to_ary(OSSL_MORE_CONST SSL_CIPHER *cipher) + { + VALUE ary; + int bits, alg_bits; +@@ -805,7 +811,7 @@ static VALUE + ossl_ssl_get_cipher(VALUE self) + { + SSL *ssl; +- SSL_CIPHER *cipher; ++ OSSL_MORE_CONST SSL_CIPHER *cipher; + + Data_Get_Struct(self, SSL, ssl); + if (!ssl) { diff --git a/ruby.spec b/ruby.spec index f7e9f1a..5c70969 100644 --- a/ruby.spec +++ b/ruby.spec @@ -49,6 +49,7 @@ Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch Patch27: ruby-1.8.6-p287-CVE-2008-5189.patch Patch28: ruby-1.8.6-p287-remove-ssl-rand-range.patch Patch29: ruby-always-use-i386.patch +Patch30: ruby-openssl-1.0.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -178,6 +179,7 @@ pushd %{name}-%{arcver} %patch27 -p0 %patch28 -p1 %patch29 -p1 +%patch30 -p2 popd %build From 22eefaaac3d90a72b3f3af704aedf0454bbfea64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Mr=C3=A1z?= Date: Wed, 26 Aug 2009 10:31:08 +0000 Subject: [PATCH 145/529] - correct fix for sk2ary --- ruby-openssl-1.0.patch | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/ruby-openssl-1.0.patch b/ruby-openssl-1.0.patch index 29e9971..aa05d14 100644 --- a/ruby-openssl-1.0.patch +++ b/ruby-openssl-1.0.patch @@ -1,17 +1,33 @@ diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c --- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 2007-02-13 00:01:19.000000000 +0100 -+++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c 2009-08-26 12:00:27.000000000 +0200 -@@ -90,6 +90,10 @@ ossl_x509_ary2sk(VALUE ary) - return sk; - } ++++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c 2009-08-26 12:29:41.000000000 +0200 +@@ -92,7 +92,7 @@ ossl_x509_ary2sk(VALUE ary) -+#if OPENSSL_VERSION_NUMBER >= 0x10000000L -+#define STACK _STACK -+#endif -+ #define OSSL_IMPL_SK2ARY(name, type) \ VALUE \ - ossl_##name##_sk2ary(STACK *sk) \ +-ossl_##name##_sk2ary(STACK *sk) \ ++ossl_##name##_sk2ary(STACK_OF(type) *sk) \ + { \ + type *t; \ + int i, num; \ +@@ -102,7 +102,7 @@ ossl_##name##_sk2ary(STACK *sk) \ + OSSL_Debug("empty sk!"); \ + return Qnil; \ + } \ +- num = sk_num(sk); \ ++ num = sk_##type##_num(sk); \ + if (num < 0) { \ + OSSL_Debug("items in sk < -1???"); \ + return rb_ary_new(); \ +@@ -110,7 +110,7 @@ ossl_##name##_sk2ary(STACK *sk) \ + ary = rb_ary_new2(num); \ + \ + for (i=0; i Date: Wed, 26 Aug 2009 14:06:45 +0000 Subject: [PATCH 146/529] - Rebuild against new openssl --- ruby-openssl-1.0.patch | 96 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/ruby-openssl-1.0.patch b/ruby-openssl-1.0.patch index aa05d14..508fd75 100644 --- a/ruby-openssl-1.0.patch +++ b/ruby-openssl-1.0.patch @@ -28,6 +28,102 @@ diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 ruby-1.8.6.369 rb_ary_push(ary, ossl_##name##_new(t)); \ } \ return ary; \ +diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_pkcs7.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_pkcs7.c +--- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_pkcs7.c.ossl10 2007-02-13 00:01:19.000000000 +0100 ++++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_pkcs7.c 2009-08-26 12:53:05.000000000 +0200 +@@ -543,12 +543,11 @@ ossl_pkcs7_add_certificate(VALUE self, V + return self; + } + +-static STACK * +-pkcs7_get_certs_or_crls(VALUE self, int want_certs) ++static STACK_OF(X509) * ++pkcs7_get_certs(VALUE self) + { + PKCS7 *pkcs7; + STACK_OF(X509) *certs; +- STACK_OF(X509_CRL) *crls; + int i; + + GetPKCS7(self, pkcs7); +@@ -556,17 +555,38 @@ pkcs7_get_certs_or_crls(VALUE self, int + switch(i){ + case NID_pkcs7_signed: + certs = pkcs7->d.sign->cert; +- crls = pkcs7->d.sign->crl; + break; + case NID_pkcs7_signedAndEnveloped: + certs = pkcs7->d.signed_and_enveloped->cert; ++ break; ++ default: ++ certs = NULL; ++ } ++ ++ return certs; ++} ++ ++static STACK_OF(X509_CRL) * ++pkcs7_get_crls(VALUE self) ++{ ++ PKCS7 *pkcs7; ++ STACK_OF(X509_CRL) *crls; ++ int i; ++ ++ GetPKCS7(self, pkcs7); ++ i = OBJ_obj2nid(pkcs7->type); ++ switch(i){ ++ case NID_pkcs7_signed: ++ crls = pkcs7->d.sign->crl; ++ break; ++ case NID_pkcs7_signedAndEnveloped: + crls = pkcs7->d.signed_and_enveloped->crl; + break; + default: +- certs = crls = NULL; ++ crls = NULL; + } + +- return want_certs ? certs : crls; ++ return crls; + } + + static VALUE +@@ -581,7 +601,7 @@ ossl_pkcs7_set_certificates(VALUE self, + STACK_OF(X509) *certs; + X509 *cert; + +- certs = pkcs7_get_certs_or_crls(self, 1); ++ certs = pkcs7_get_certs(self); + while((cert = sk_X509_pop(certs))) X509_free(cert); + rb_iterate(rb_each, ary, ossl_pkcs7_set_certs_i, self); + +@@ -591,7 +611,7 @@ ossl_pkcs7_set_certificates(VALUE self, + static VALUE + ossl_pkcs7_get_certificates(VALUE self) + { +- return ossl_x509_sk2ary(pkcs7_get_certs_or_crls(self, 1)); ++ return ossl_x509_sk2ary(pkcs7_get_certs(self)); + } + + static VALUE +@@ -621,7 +641,7 @@ ossl_pkcs7_set_crls(VALUE self, VALUE ar + STACK_OF(X509_CRL) *crls; + X509_CRL *crl; + +- crls = pkcs7_get_certs_or_crls(self, 0); ++ crls = pkcs7_get_crls(self); + while((crl = sk_X509_CRL_pop(crls))) X509_CRL_free(crl); + rb_iterate(rb_each, ary, ossl_pkcs7_set_crls_i, self); + +@@ -631,7 +651,7 @@ ossl_pkcs7_set_crls(VALUE self, VALUE ar + static VALUE + ossl_pkcs7_get_crls(VALUE self) + { +- return ossl_x509crl_sk2ary(pkcs7_get_certs_or_crls(self, 0)); ++ return ossl_x509crl_sk2ary(pkcs7_get_crls(self)); + } + + static VALUE diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c --- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10 2007-03-12 05:12:32.000000000 +0100 +++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c 2009-08-26 12:08:48.000000000 +0200 From bbad66ed0aa4d7333b6a2fec72e491927aab8a63 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Tue, 13 Oct 2009 18:03:03 +0000 Subject: [PATCH 147/529] - Fix the search path of ri command for ri manuals installed with gem (bug 528787) --- ruby-1.8.6-p369-ri-gem_multipath.patch | 55 ++++++++++++++++++++++++++ ruby.spec | 8 +++- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.6-p369-ri-gem_multipath.patch diff --git a/ruby-1.8.6-p369-ri-gem_multipath.patch b/ruby-1.8.6-p369-ri-gem_multipath.patch new file mode 100644 index 0000000..be66fad --- /dev/null +++ b/ruby-1.8.6-p369-ri-gem_multipath.patch @@ -0,0 +1,55 @@ +--- ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb.gemmulti 2007-02-13 08:01:19.000000000 +0900 ++++ ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb 2009-10-14 01:08:42.000000000 +0900 +@@ -63,7 +63,7 @@ + + [ "--gems", nil, nil, + "Include documentation from Rubygems:\n " + +- (RI::Paths::GEMDIRS ? "#{Gem.path}/doc/*/ri" : ++ (RI::Paths::GEMDIRS ? ( tmppath=""; Gem.path.each {|path| tmppath += "#{path}/doc/*/ri "}; tmppath) : + "No Rubygems ri found.") ], + + [ "--format", "-f", "", +@@ -136,7 +136,11 @@ + RI::Paths::HOMEDIR + ] + +- directories << "#{Gem.path}/doc/*/ri" if RI::Paths::GEMDIRS ++ if RI::Paths::GEMDIRS ++ Gem.path.each {|gempath| ++ directories << "#{gempath}/doc/*/ri" ++ } ++ end + + directories = directories.join("\n ") + +--- ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb.gemmulti 2007-02-13 08:01:19.000000000 +0900 ++++ ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb 2009-10-13 19:58:07.000000000 +0900 +@@ -43,9 +43,14 @@ + PATH = [ SYSDIR, SITEDIR, HOMEDIR ].find_all {|p| p && File.directory?(p)} + + begin +- require 'rubygems' +- GEMDIRS = Dir["#{Gem.path}/doc/*/ri"] +- GEMDIRS.each { |path| RI::Paths::PATH << path } ++ require 'rubygems' ++ gemdirs = [] ++ Gem.path.each{ |gempath| ++ ripath = Dir["#{gempath}/doc/*/ri"] ++ ripath.each { |path| RI::Paths::PATH << path } ++ gemdirs << gempath ++ } ++ GEMDIRS = gemdirs + rescue LoadError + GEMDIRS = nil + end +@@ -71,7 +76,9 @@ + path << RI::Paths::SYSDIR if use_system + path << RI::Paths::SITEDIR if use_site + path << RI::Paths::HOMEDIR if use_home +- path << RI::Paths::GEMDIRS if use_gems ++ if use_gems ++ RI::Paths::GEMDIRS.each {|gemdirs| path << gemdirs } ++ end + + return path.flatten.compact + end diff --git a/ruby.spec b/ruby.spec index 5c70969..01297ea 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 4%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -50,6 +50,7 @@ Patch27: ruby-1.8.6-p287-CVE-2008-5189.patch Patch28: ruby-1.8.6-p287-remove-ssl-rand-range.patch Patch29: ruby-always-use-i386.patch Patch30: ruby-openssl-1.0.patch +Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -180,6 +181,7 @@ pushd %{name}-%{arcver} %patch28 -p1 %patch29 -p1 %patch30 -p2 +%patch31 -p1 popd %build @@ -546,6 +548,10 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Wed Oct 14 2009 Mamoru Tasaka - 1.8.6.369-4 +- Fix the search path of ri command for ri manuals installed with gem + (bug 528787) + * Wed Aug 26 2009 Tomas Mraz - 1.8.6.369-3 - Rebuild against new openssl From abf129c49f74e135da40c488657945ae7f0f35a3 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Wed, 14 Oct 2009 15:24:31 +0000 Subject: [PATCH 148/529] - Much better idea for Patch31 provided by Akira TAGOH --- ruby-1.8.6-p369-ri-gem_multipath.patch | 34 ++++++-------------------- ruby.spec | 5 +++- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/ruby-1.8.6-p369-ri-gem_multipath.patch b/ruby-1.8.6-p369-ri-gem_multipath.patch index be66fad..e5b5872 100644 --- a/ruby-1.8.6-p369-ri-gem_multipath.patch +++ b/ruby-1.8.6-p369-ri-gem_multipath.patch @@ -1,11 +1,11 @@ --- ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb.gemmulti 2007-02-13 08:01:19.000000000 +0900 -+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb 2009-10-14 01:08:42.000000000 +0900 ++++ ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb 2009-10-14 23:51:09.000000000 +0900 @@ -63,7 +63,7 @@ [ "--gems", nil, nil, "Include documentation from Rubygems:\n " + - (RI::Paths::GEMDIRS ? "#{Gem.path}/doc/*/ri" : -+ (RI::Paths::GEMDIRS ? ( tmppath=""; Gem.path.each {|path| tmppath += "#{path}/doc/*/ri "}; tmppath) : ++ (RI::Paths::GEMDIRS ? Gem.path.map {|path| "#{path}/doc/*/ri" }.join(', ') : "No Rubygems ri found.") ], [ "--format", "-f", "", @@ -23,33 +23,13 @@ directories = directories.join("\n ") --- ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb.gemmulti 2007-02-13 08:01:19.000000000 +0900 -+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb 2009-10-13 19:58:07.000000000 +0900 -@@ -43,9 +43,14 @@ - PATH = [ SYSDIR, SITEDIR, HOMEDIR ].find_all {|p| p && File.directory?(p)} ++++ ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb 2009-10-15 00:02:05.000000000 +0900 +@@ -44,7 +44,7 @@ begin -- require 'rubygems' + require 'rubygems' - GEMDIRS = Dir["#{Gem.path}/doc/*/ri"] -- GEMDIRS.each { |path| RI::Paths::PATH << path } -+ require 'rubygems' -+ gemdirs = [] -+ Gem.path.each{ |gempath| -+ ripath = Dir["#{gempath}/doc/*/ri"] -+ ripath.each { |path| RI::Paths::PATH << path } -+ gemdirs << gempath -+ } -+ GEMDIRS = gemdirs ++ GEMDIRS = Gem.path.map {|path| Dir["#{path}/doc/*/ri"]}.flatten + GEMDIRS.each { |path| RI::Paths::PATH << path } rescue LoadError GEMDIRS = nil - end -@@ -71,7 +76,9 @@ - path << RI::Paths::SYSDIR if use_system - path << RI::Paths::SITEDIR if use_site - path << RI::Paths::HOMEDIR if use_home -- path << RI::Paths::GEMDIRS if use_gems -+ if use_gems -+ RI::Paths::GEMDIRS.each {|gemdirs| path << gemdirs } -+ end - - return path.flatten.compact - end diff --git a/ruby.spec b/ruby.spec index 01297ea..e44d5ce 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 4%{?dist} +Release: 5%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -548,6 +548,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Wed Oct 14 2009 Mamoru Tasaka - 1.8.6.369-5 +- Much better idea for Patch31 provided by Akira TAGOH + * Wed Oct 14 2009 Mamoru Tasaka - 1.8.6.369-4 - Fix the search path of ri command for ri manuals installed with gem (bug 528787) From 35188975c5d8f4cb0f1d51a83e699567693afce5 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Fri, 23 Oct 2009 17:25:54 +0000 Subject: [PATCH 149/529] - Update to 1.8.6 patchlevel 383 (bug 520063) --- .cvsignore | 2 +- ....patch => ruby-1.8.6-p383-rubyprefix.patch | 33 ++++++++++--------- ruby.spec | 9 +++-- sources | 2 +- 4 files changed, 26 insertions(+), 20 deletions(-) rename ruby-rubyprefix.patch => ruby-1.8.6-p383-rubyprefix.patch (76%) diff --git a/.cvsignore b/.cvsignore index 9be1be4..dd58fe3 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ ruby-refm-rdp-1.8.2-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz -ruby-1.8.6-p369.tar.bz2 +ruby-1.8.6-p383.tar.bz2 diff --git a/ruby-rubyprefix.patch b/ruby-1.8.6-p383-rubyprefix.patch similarity index 76% rename from ruby-rubyprefix.patch rename to ruby-1.8.6-p383-rubyprefix.patch index 8d1bd0c..1f0fa43 100644 --- a/ruby-rubyprefix.patch +++ b/ruby-1.8.6-p383-rubyprefix.patch @@ -1,7 +1,7 @@ -diff -pruN ruby-1.8.6-p287.orig/configure.in ruby-1.8.6-p287/configure.in ---- ruby-1.8.6-p287.orig/configure.in 2008-07-13 00:03:28.000000000 +0900 -+++ ruby-1.8.6-p287/configure.in 2008-08-14 01:08:00.000000000 +0900 -@@ -1608,6 +1608,13 @@ case "$target_os" in +diff -ur ruby-1.8.6-p383.0-deadcode/configure.in ruby-1.8.6-p383/configure.in +--- ruby-1.8.6-p383.0-deadcode/configure.in 2009-07-20 15:24:22.000000000 +0200 ++++ ruby-1.8.6-p383/configure.in 2009-10-22 16:37:13.729623476 +0200 +@@ -1613,6 +1613,13 @@ rubyw_install_name="$RUBYW_INSTALL_NAME" ;; esac @@ -15,12 +15,12 @@ diff -pruN ruby-1.8.6-p287.orig/configure.in ruby-1.8.6-p287/configure.in case "$target_os" in cygwin*|mingw*|*djgpp*|os2-emx*) RUBY_LIB_PREFIX="/lib/ruby" -@@ -1616,20 +1623,29 @@ case "$target_os" in - RUBY_LIB_PREFIX="${prefix}/lib/ruby" +@@ -1621,20 +1628,30 @@ + RUBY_LIB_PREFIX="`eval "echo ${libdir}"`/ruby" ;; esac +else -+ RUBY_LIB_PREFIX="${with_ruby_prefix}/ruby" ++ RUBY_LIB_PREFIX="${with_ruby_prefix}/ruby" +fi RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" +RUBY_LIB_PATH2="${libdir}/ruby/${MAJOR}.${MINOR}" @@ -28,12 +28,13 @@ diff -pruN ruby-1.8.6-p287.orig/configure.in ruby-1.8.6-p287/configure.in AC_ARG_WITH(sitedir, [ --with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]], [sitedir=$withval], - [sitedir='${prefix}/lib/ruby/site_ruby']) + [sitedir="`eval "echo ${libdir}"`/ruby/site_ruby"]) -SITE_DIR=`eval echo \\"${sitedir}\\"` +SITE_DIR=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` +_fc_sitedir="\$(DESTDIR)${sitedir}" +SITE_DIR2=`eval echo \\"${_fc_sitedir}\\"` +sitedir=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` ++ case "$target_os" in cygwin*|mingw*|*djgpp*|os2-emx*) RUBY_SITE_LIB_PATH="`expr "$SITE_DIR" : "$prefix\(/.*\)"`" || @@ -47,7 +48,7 @@ diff -pruN ruby-1.8.6-p287.orig/configure.in ruby-1.8.6-p287/configure.in RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}" AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") -@@ -1639,6 +1655,7 @@ AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RU +@@ -1644,6 +1661,7 @@ AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(sitedir)dnl @@ -55,7 +56,7 @@ diff -pruN ruby-1.8.6-p287.orig/configure.in ruby-1.8.6-p287/configure.in configure_args=$ac_configure_args AC_SUBST(configure_args)dnl -@@ -1647,7 +1664,7 @@ if test "$fat_binary" != no ; then +@@ -1652,7 +1670,7 @@ arch="fat-${target_os}" AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB, @@ -64,7 +65,7 @@ diff -pruN ruby-1.8.6-p287.orig/configure.in ruby-1.8.6-p287/configure.in AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB, "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") -@@ -1662,8 +1679,8 @@ case "$target_os" in +@@ -1667,8 +1685,8 @@ *) sitearch="${arch}" ;; esac @@ -75,10 +76,12 @@ diff -pruN ruby-1.8.6-p287.orig/configure.in ruby-1.8.6-p287/configure.in AC_ARG_WITH(search-path, [ --with-search-path=DIR specify the additional search path], -diff -pruN ruby-1.8.6-p287.orig/mkconfig.rb ruby-1.8.6-p287/mkconfig.rb ---- ruby-1.8.6-p287.orig/mkconfig.rb 2008-06-08 01:37:10.000000000 +0900 -+++ ruby-1.8.6-p287/mkconfig.rb 2008-08-14 01:08:00.000000000 +0900 -@@ -139,10 +139,10 @@ print(*v_fast) +Only in ruby-1.8.6-p383/: configure.in.orig +Only in ruby-1.8.6-p383/: configure.in.rej +diff -ur ruby-1.8.6-p383.0-deadcode/mkconfig.rb ruby-1.8.6-p383/mkconfig.rb +--- ruby-1.8.6-p383.0-deadcode/mkconfig.rb 2008-06-07 18:37:10.000000000 +0200 ++++ ruby-1.8.6-p383/mkconfig.rb 2009-10-22 16:30:55.776872493 +0200 +@@ -139,10 +139,10 @@ print(*v_others) print < - 1.8.6.383-2 +- Update to 1.8.6 patchlevel 383 (bug 520063) + * Wed Oct 14 2009 Mamoru Tasaka - 1.8.6.369-5 - Much better idea for Patch31 provided by Akira TAGOH diff --git a/sources b/sources index 34e5163..a667a08 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -c3c1f3dd0dfbd2e17a04e59c2f12cfc8 ruby-1.8.6-p369.tar.bz2 +a48703cd982b9f0e3002700a50b0e88e ruby-1.8.6-p383.tar.bz2 From 94f00da846fef6bb48e54426294c0376dbf20c19 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 25 Oct 2009 15:08:29 +0000 Subject: [PATCH 150/529] - Patch so that irb saves its history (bug 518584, ruby issue 1556) --- ruby-1.8head-irb-save-history.patch | 111 ++++++++++++++++++++++++++++ ruby.spec | 8 +- 2 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8head-irb-save-history.patch diff --git a/ruby-1.8head-irb-save-history.patch b/ruby-1.8head-irb-save-history.patch new file mode 100644 index 0000000..9349016 --- /dev/null +++ b/ruby-1.8head-irb-save-history.patch @@ -0,0 +1,111 @@ +Thu Jul 23 15:04:20 2009 Keiju Ishitsuka + +ruby* lib/irb.rb, lib/irb/init.rb, lib/irb/ext/save-history.rb: add +ruby IRB::irb_at_exit. no use finalizer saving history. [ruby-dev-38563] + +Index: lib/irb/ext/save-history.rb +=================================================================== +--- lib/irb/ext/save-history.rb (revision 24225) ++++ lib/irb/ext/save-history.rb (revision 24254) +@@ -50,23 +50,24 @@ + module HistorySavingAbility + include Readline + +- def HistorySavingAbility.create_finalizer +- proc do +- if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) > 0 +- if hf = IRB.conf[:HISTORY_FILE] +- file = File.expand_path(hf) +- end +- file = IRB.rc_file("_history") unless file +- open(file, 'w' ) do |f| +- hist = HISTORY.to_a +- f.puts(hist[-num..-1] || hist) +- end +- end +- end +- end ++# def HistorySavingAbility.create_finalizer ++# proc do ++# if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) > 0 ++# if hf = IRB.conf[:HISTORY_FILE] ++# file = File.expand_path(hf) ++# end ++# file = IRB.rc_file("_history") unless file ++# open(file, 'w' ) do |f| ++# hist = HISTORY.to_a ++# f.puts(hist[-num..-1] || hist) ++# end ++# end ++# end ++# end + + def HistorySavingAbility.extended(obj) +- ObjectSpace.define_finalizer(obj, HistorySavingAbility.create_finalizer) ++# ObjectSpace.define_finalizer(obj, HistorySavingAbility.create_finalizer) ++ IRB.conf[:AT_EXIT].push proc{obj.save_history} + obj.load_history + obj + end +@@ -80,6 +81,19 @@ + end + end + end ++ ++ def save_history ++ if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) > 0 ++ if history_file = IRB.conf[:HISTORY_FILE] ++ history_file = File.expand_path(history_file) ++ end ++ history_file = IRB.rc_file("_history") unless history_file ++ open(history_file, 'w' ) do |f| ++ hist = HISTORY.to_a ++ f.puts(hist[-num..-1] || hist) ++ end ++ end ++ end + end + end + +Index: lib/irb/init.rb +=================================================================== +--- lib/irb/init.rb (revision 24225) ++++ lib/irb/init.rb (revision 24254) +@@ -114,6 +114,8 @@ + # @CONF[:LC_MESSAGES] = "en" + @CONF[:LC_MESSAGES] = Locale.new + ++ @CONF[:AT_EXIT] = [] ++ + @CONF[:DEBUG_LEVEL] = 1 + end + +Index: lib/irb.rb +=================================================================== +--- lib/irb.rb (revision 24225) ++++ lib/irb.rb (revision 24254) +@@ -65,13 +65,21 @@ + trap("SIGINT") do + irb.signal_handle + end +- +- catch(:IRB_EXIT) do +- irb.eval_input ++ ++ begin ++ catch(:IRB_EXIT) do ++ irb.eval_input ++ end ++ ensure ++ irb_at_exit + end + # print "\n" + end + ++ def IRB.irb_at_exit ++ @CONF[:AT_EXIT].each{|hook| hook.call} ++ end ++ + def IRB.irb_exit(irb, ret) + throw :IRB_EXIT, ret + end diff --git a/ruby.spec b/ruby.spec index da6cb31..7b60150 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 3%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -51,6 +51,8 @@ Patch28: ruby-1.8.6-p287-remove-ssl-rand-range.patch Patch29: ruby-always-use-i386.patch Patch30: ruby-openssl-1.0.patch Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch +# Patch from ruby_1_8 branch +Patch32: ruby-1.8head-irb-save-history.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -182,6 +184,7 @@ pushd %{name}-%{arcver} %patch29 -p1 %patch30 -p2 %patch31 -p1 +%patch32 -p0 popd %build @@ -548,6 +551,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Sun Oct 25 2009 Mamoru Tasaka - 1.8.6.383-3 +- Patch so that irb saves its history (bug 518584, ruby issue 1556) + * Sat Oct 24 2009 Mamoru Tasaka - 1.8.6.383-2 - Update to 1.8.6 patchlevel 383 (bug 520063) From c6c75f53c5c117d35c65701a48ba219032eb316c Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 29 Oct 2009 16:39:34 +0000 Subject: [PATCH 151/529] - Use bison to regenerate parse.c to keep the original format of error messages (bug 530275 comment 4) --- ruby.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 7b60150..0cf64ef 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 4%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -26,6 +26,8 @@ BuildRequires: compat-readline5-devel BuildRequires: readline readline-devel %endif BuildRequires: ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel byacc +# Use bison to recreate parse.c (ref: bug 530275 comment 4) +BuildRequires: bison BuildRequires: emacs Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{arcver}.tar.bz2 @@ -551,6 +553,10 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Thu Oct 29 2009 Mamoru Tasaka - 1.8.6.383-4 +- Use bison to regenerate parse.c to keep the original format of error + messages (bug 530275 comment 4) + * Sun Oct 25 2009 Mamoru Tasaka - 1.8.6.383-3 - Patch so that irb saves its history (bug 518584, ruby issue 1556) From fd1c99402733e1c3f57188d4068616325fc03c11 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:13:22 +0000 Subject: [PATCH 152/529] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index d363f5c..9141959 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: ruby -# $Id: Makefile,v 1.1 2004/09/09 11:54:27 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 19:21:20 notting Exp $ NAME := ruby SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From bab6007ffb95c05e7c0aea66bd40295a120debc3 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Wed, 9 Dec 2009 09:57:10 +0000 Subject: [PATCH 153/529] - Change mkmf.rb to use LIBRUBYARG_SHARED so that have_library() works without libruby-static.a (bug 428384) - And move libruby-static.a to -static subpackage --- ruby-1.8.6-p383-mkmf-use-shared.patch | 11 +++++++++ ruby.spec | 32 +++++++++++++++++++++++---- 2 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 ruby-1.8.6-p383-mkmf-use-shared.patch diff --git a/ruby-1.8.6-p383-mkmf-use-shared.patch b/ruby-1.8.6-p383-mkmf-use-shared.patch new file mode 100644 index 0000000..fb0e6a5 --- /dev/null +++ b/ruby-1.8.6-p383-mkmf-use-shared.patch @@ -0,0 +1,11 @@ +--- ruby-1.8.6-p383/lib/mkmf.rb.static 2009-03-31 18:19:39.000000000 +0900 ++++ ruby-1.8.6-p383/lib/mkmf.rb 2009-12-09 15:03:19.000000000 +0900 +@@ -275,7 +275,7 @@ + 'LDFLAGS' => "#$LDFLAGS #{ldflags}", + 'LIBPATH' => libpathflag(libpath), + 'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs", +- 'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS") ++ 'LIBS' => "#$LIBRUBYARG_SHARED #{opt} #$LIBS") + Config::expand(TRY_LINK.dup, conf) + end + diff --git a/ruby.spec b/ruby.spec index 0cf64ef..1d53055 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 4%{?dist} +Release: 5%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -53,8 +53,9 @@ Patch28: ruby-1.8.6-p287-remove-ssl-rand-range.patch Patch29: ruby-always-use-i386.patch Patch30: ruby-openssl-1.0.patch Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch -# Patch from ruby_1_8 branch +# Patch32 from ruby_1_8 branch Patch32: ruby-1.8head-irb-save-history.patch +Patch33: ruby-1.8.6-p383-mkmf-use-shared.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -85,12 +86,20 @@ This package includes the libruby, necessary to run Ruby. Summary: A Ruby development environment Group: Development/Languages Requires: %{name}-libs = %{version}-%{release} -Provides: %{name}-libs-static = %{version}-%{release} +#Provides: %{name}-libs-static = %{version}-%{release} %description devel Header files and libraries for building a extension library for the Ruby or an application embedded Ruby. +%package static +Summary: Static libraries for Ruby development environment +Group: Development/Languages +Requires: %{name}-devel = %{version}-%{release} + +%description static +Static libraries for for building a extension library for the +Ruby or an application embedded Ruby. %package tcltk Summary: Tcl/Tk interface for scripting language Ruby @@ -187,6 +196,7 @@ pushd %{name}-%{arcver} %patch30 -p2 %patch31 -p1 %patch32 -p0 +%patch33 -p1 popd %build @@ -217,6 +227,11 @@ export CFLAGS %endif --with-ruby-prefix=%{_prefix}/lib +# For example ext/socket/extconf.rb uses try_run (for getaddrinfo test), +# which executes conftest and setting LD_LIBRARY_PATH for libruby.so is +# needed. +export LD_LIBRARY_PATH=$(pwd) + make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} COPY="cp -p" %{?_smp_mflags} %ifarch ia64 # Miscompilation? Buggy code? @@ -408,9 +423,13 @@ rm -rf $RPM_BUILD_ROOT %doc %{name}-%{arcver}/README.EXT %lang(ja) %doc %{name}-%{arcver}/README.EXT.ja %{_libdir}/libruby.so -%{_libdir}/libruby-static.a +#%%{_libdir}/libruby-static.a %{_libdir}/ruby/%{rubyxver}/*/*.h +%files static +%defattr(-, root, root, -) +%{_libdir}/libruby-static.a + %files libs %defattr(-, root, root, -) %doc %{name}-%{arcver}/README @@ -553,6 +572,11 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Wed Dec 9 2009 Mamoru Tasaka - 1.8.6.383-5 +- Change mkmf.rb to use LIBRUBYARG_SHARED so that have_library() works + without libruby-static.a (bug 428384) +- And move libruby-static.a to -static subpackage + * Thu Oct 29 2009 Mamoru Tasaka - 1.8.6.383-4 - Use bison to regenerate parse.c to keep the original format of error messages (bug 530275 comment 4) From 3b5ddce2380efcb6d6896c48e6856025a60b7f5a Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Tue, 12 Jan 2010 19:02:42 +0000 Subject: [PATCH 154/529] - CVE-2009-4492 ruby WEBrick log escape sequence (bug 554485) --- ruby-1.8.6.x-CVE-2009-4492.patch | 134 +++++++++++++++++++++++++++++++ ruby.spec | 8 +- 2 files changed, 141 insertions(+), 1 deletion(-) create mode 100644 ruby-1.8.6.x-CVE-2009-4492.patch diff --git a/ruby-1.8.6.x-CVE-2009-4492.patch b/ruby-1.8.6.x-CVE-2009-4492.patch new file mode 100644 index 0000000..00fa053 --- /dev/null +++ b/ruby-1.8.6.x-CVE-2009-4492.patch @@ -0,0 +1,134 @@ +Index: lib/webrick/httpstatus.rb +=================================================================== +--- lib/webrick/httpstatus.rb (revision 26273) ++++ lib/webrick/httpstatus.rb (revision 26274) +@@ -12,7 +12,17 @@ + + module HTTPStatus + +- class Status < StandardError; end ++ class Status < StandardError ++ def initialize(message=self.class, *rest) ++ super(AccessLog.escape(message), *rest) ++ end ++ class << self ++ attr_reader :code, :reason_phrase ++ end ++ def code() self::class::code end ++ def reason_phrase() self::class::reason_phrase end ++ alias to_i code ++ end + class Info < Status; end + class Success < Status; end + class Redirect < Status; end +@@ -68,6 +78,7 @@ + CodeToError = {} + + StatusMessage.each{|code, message| ++ message.freeze + var_name = message.gsub(/[ \-]/,'_').upcase + err_name = message.gsub(/[ \-]/,'') + +@@ -79,18 +90,12 @@ + when 500...600; parent = ServerError + end + +- eval %- +- RC_#{var_name} = #{code} +- class #{err_name} < #{parent} +- def self.code() RC_#{var_name} end +- def self.reason_phrase() StatusMessage[code] end +- def code() self::class::code end +- def reason_phrase() self::class::reason_phrase end +- alias to_i code +- end +- - +- +- CodeToError[code] = const_get(err_name) ++ const_set("RC_#{var_name}", code) ++ err_class = Class.new(parent) ++ err_class.instance_variable_set(:@code, code) ++ err_class.instance_variable_set(:@reason_phrase, message) ++ const_set(err_name, err_class) ++ CodeToError[code] = err_class + } + + def reason_phrase(code) +Index: lib/webrick/httprequest.rb +=================================================================== +--- lib/webrick/httprequest.rb (revision 26273) ++++ lib/webrick/httprequest.rb (revision 26274) +@@ -242,11 +242,7 @@ + @raw_header << line + end + end +- begin +- @header = HTTPUtils::parse_header(@raw_header) +- rescue => ex +- raise HTTPStatus::BadRequest, ex.message +- end ++ @header = HTTPUtils::parse_header(@raw_header.join) + end + + def parse_uri(str, scheme="http") +Index: lib/webrick/httpresponse.rb +=================================================================== +--- lib/webrick/httpresponse.rb (revision 26273) ++++ lib/webrick/httpresponse.rb (revision 26274) +@@ -132,7 +132,7 @@ + end + end + +- # Determin the message length (RFC2616 -- 4.4 Message Length) ++ # Determine the message length (RFC2616 -- 4.4 Message Length) + if @status == 304 || @status == 204 || HTTPStatus::info?(@status) + @header.delete('content-length') + @body = "" +Index: lib/webrick/httputils.rb +=================================================================== +--- lib/webrick/httputils.rb (revision 26273) ++++ lib/webrick/httputils.rb (revision 26274) +@@ -128,11 +128,11 @@ + when /^\s+(.*?)\s*\z/om + value = $1 + unless field +- raise "bad header '#{line.inspect}'." ++ raise HTTPStatus::BadRequest, "bad header '#{line}'." + end + header[field][-1] << " " << value + else +- raise "bad header '#{line.inspect}'." ++ raise HTTPStatus::BadRequest, "bad header '#{line}'." + end + } + header.each{|key, values| +Index: lib/webrick/accesslog.rb +=================================================================== +--- lib/webrick/accesslog.rb (revision 26273) ++++ lib/webrick/accesslog.rb (revision 26274) +@@ -53,15 +53,23 @@ + when ?e, ?i, ?n, ?o + raise AccessLogError, + "parameter is required for \"#{spec}\"" unless param +- params[spec][param] || "-" ++ param = params[spec][param] ? escape(param) : "-" + when ?t + params[spec].strftime(param || CLF_TIME_FORMAT) + when ?% + "%" + else +- params[spec] ++ escape(params[spec].to_s) + end + } + end ++ ++ def escape(data) ++ if data.tainted? ++ data.gsub(/[[:cntrl:]\\]+/) {$&.dump[1...-1]}.untaint ++ else ++ data ++ end ++ end + end + end diff --git a/ruby.spec b/ruby.spec index 1d53055..3c67fe7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 5%{?dist} +Release: 6%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -56,6 +56,8 @@ Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch # Patch32 from ruby_1_8 branch Patch32: ruby-1.8head-irb-save-history.patch Patch33: ruby-1.8.6-p383-mkmf-use-shared.patch +# Patch34 already applied in 1.8.6p388 +Patch34: ruby-1.8.6.x-CVE-2009-4492.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -197,6 +199,7 @@ pushd %{name}-%{arcver} %patch31 -p1 %patch32 -p0 %patch33 -p1 +%patch34 -p0 popd %build @@ -572,6 +575,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Wed Jan 13 2010 Mamoru Tasaka - 1.8.6.383-6 +- CVE-2009-4492 ruby WEBrick log escape sequence (bug 554485) + * Wed Dec 9 2009 Mamoru Tasaka - 1.8.6.383-5 - Change mkmf.rb to use LIBRUBYARG_SHARED so that have_library() works without libruby-static.a (bug 428384) From fed6f04781aa369e83e3ad8934c00b01e83604da Mon Sep 17 00:00:00 2001 From: Akira TAGOH Date: Mon, 18 Jan 2010 08:32:37 +0000 Subject: [PATCH 155/529] - Add conditional for RHEL. --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 3c67fe7..537e91b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -20,7 +20,7 @@ Release: 6%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -%if 0%{?fedora} >= 12 +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 BuildRequires: compat-readline5-devel %else BuildRequires: readline readline-devel @@ -224,7 +224,7 @@ export CFLAGS --enable-pthread \ --with-lookup-order-hack=INET \ --disable-rpath \ -%if 0%{?fedora} >= 12 +%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 --with-readline-include=%{_includedir}/readline5 \ --with-readline-lib=%{_libdir}/readline5 \ %endif @@ -575,6 +575,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Mon Jan 18 2010 Akira TAGOH +- Add conditional for RHEL. + * Wed Jan 13 2010 Mamoru Tasaka - 1.8.6.383-6 - CVE-2009-4492 ruby WEBrick log escape sequence (bug 554485) From bf4f952440af693e3d289de0027e1a927a0875b3 Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Thu, 21 Jan 2010 00:15:48 +0000 Subject: [PATCH 156/529] 1.8.6.388-6 --- .cvsignore | 2 +- import.log | 1 + noautobuild | 1 - ruby-1.8.6.x-CVE-2009-4492.patch | 134 ------------------------------- ruby.spec | 5 +- sources | 2 +- 6 files changed, 4 insertions(+), 141 deletions(-) delete mode 100644 noautobuild delete mode 100644 ruby-1.8.6.x-CVE-2009-4492.patch diff --git a/.cvsignore b/.cvsignore index dd58fe3..abc7fa1 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ ruby-refm-rdp-1.8.2-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz -ruby-1.8.6-p383.tar.bz2 +ruby-1.8.6-p388.tar.bz2 diff --git a/import.log b/import.log index 47636a0..2f16979 100644 --- a/import.log +++ b/import.log @@ -4,3 +4,4 @@ ruby-1_8_6_287-7_fc11:HEAD:ruby-1.8.6.287-7.fc11.src.rpm:1237351812 ruby-1_8_6_368-1_fc11:HEAD:ruby-1.8.6.368-1.fc11.src.rpm:1243759307 ruby-1_8_6_368-2_fc11:HEAD:ruby-1.8.6.368-2.fc11.src.rpm:1245520186 ruby-1_8_6_369-1_fc11:HEAD:ruby-1.8.6.369-1.fc11.src.rpm:1245760717 +ruby-1_8_6_388-6_fc12:HEAD:ruby-1.8.6.388-6.fc12.src.rpm:1264032880 diff --git a/noautobuild b/noautobuild deleted file mode 100644 index 7d5a48a..0000000 --- a/noautobuild +++ /dev/null @@ -1 +0,0 @@ -wait until tk 8.5.7 is rebuilt diff --git a/ruby-1.8.6.x-CVE-2009-4492.patch b/ruby-1.8.6.x-CVE-2009-4492.patch deleted file mode 100644 index 00fa053..0000000 --- a/ruby-1.8.6.x-CVE-2009-4492.patch +++ /dev/null @@ -1,134 +0,0 @@ -Index: lib/webrick/httpstatus.rb -=================================================================== ---- lib/webrick/httpstatus.rb (revision 26273) -+++ lib/webrick/httpstatus.rb (revision 26274) -@@ -12,7 +12,17 @@ - - module HTTPStatus - -- class Status < StandardError; end -+ class Status < StandardError -+ def initialize(message=self.class, *rest) -+ super(AccessLog.escape(message), *rest) -+ end -+ class << self -+ attr_reader :code, :reason_phrase -+ end -+ def code() self::class::code end -+ def reason_phrase() self::class::reason_phrase end -+ alias to_i code -+ end - class Info < Status; end - class Success < Status; end - class Redirect < Status; end -@@ -68,6 +78,7 @@ - CodeToError = {} - - StatusMessage.each{|code, message| -+ message.freeze - var_name = message.gsub(/[ \-]/,'_').upcase - err_name = message.gsub(/[ \-]/,'') - -@@ -79,18 +90,12 @@ - when 500...600; parent = ServerError - end - -- eval %- -- RC_#{var_name} = #{code} -- class #{err_name} < #{parent} -- def self.code() RC_#{var_name} end -- def self.reason_phrase() StatusMessage[code] end -- def code() self::class::code end -- def reason_phrase() self::class::reason_phrase end -- alias to_i code -- end -- - -- -- CodeToError[code] = const_get(err_name) -+ const_set("RC_#{var_name}", code) -+ err_class = Class.new(parent) -+ err_class.instance_variable_set(:@code, code) -+ err_class.instance_variable_set(:@reason_phrase, message) -+ const_set(err_name, err_class) -+ CodeToError[code] = err_class - } - - def reason_phrase(code) -Index: lib/webrick/httprequest.rb -=================================================================== ---- lib/webrick/httprequest.rb (revision 26273) -+++ lib/webrick/httprequest.rb (revision 26274) -@@ -242,11 +242,7 @@ - @raw_header << line - end - end -- begin -- @header = HTTPUtils::parse_header(@raw_header) -- rescue => ex -- raise HTTPStatus::BadRequest, ex.message -- end -+ @header = HTTPUtils::parse_header(@raw_header.join) - end - - def parse_uri(str, scheme="http") -Index: lib/webrick/httpresponse.rb -=================================================================== ---- lib/webrick/httpresponse.rb (revision 26273) -+++ lib/webrick/httpresponse.rb (revision 26274) -@@ -132,7 +132,7 @@ - end - end - -- # Determin the message length (RFC2616 -- 4.4 Message Length) -+ # Determine the message length (RFC2616 -- 4.4 Message Length) - if @status == 304 || @status == 204 || HTTPStatus::info?(@status) - @header.delete('content-length') - @body = "" -Index: lib/webrick/httputils.rb -=================================================================== ---- lib/webrick/httputils.rb (revision 26273) -+++ lib/webrick/httputils.rb (revision 26274) -@@ -128,11 +128,11 @@ - when /^\s+(.*?)\s*\z/om - value = $1 - unless field -- raise "bad header '#{line.inspect}'." -+ raise HTTPStatus::BadRequest, "bad header '#{line}'." - end - header[field][-1] << " " << value - else -- raise "bad header '#{line.inspect}'." -+ raise HTTPStatus::BadRequest, "bad header '#{line}'." - end - } - header.each{|key, values| -Index: lib/webrick/accesslog.rb -=================================================================== ---- lib/webrick/accesslog.rb (revision 26273) -+++ lib/webrick/accesslog.rb (revision 26274) -@@ -53,15 +53,23 @@ - when ?e, ?i, ?n, ?o - raise AccessLogError, - "parameter is required for \"#{spec}\"" unless param -- params[spec][param] || "-" -+ param = params[spec][param] ? escape(param) : "-" - when ?t - params[spec].strftime(param || CLF_TIME_FORMAT) - when ?% - "%" - else -- params[spec] -+ escape(params[spec].to_s) - end - } - end -+ -+ def escape(data) -+ if data.tainted? -+ data.gsub(/[[:cntrl:]\\]+/) {$&.dump[1...-1]}.untaint -+ else -+ data -+ end -+ end - end - end diff --git a/ruby.spec b/ruby.spec index 537e91b..e947c4c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %define rubyxver 1.8 %define rubyver 1.8.6 -%define _patchlevel 383 +%define _patchlevel 388 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define arcver %{rubyver}%{?patchlevel} @@ -56,8 +56,6 @@ Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch # Patch32 from ruby_1_8 branch Patch32: ruby-1.8head-irb-save-history.patch Patch33: ruby-1.8.6-p383-mkmf-use-shared.patch -# Patch34 already applied in 1.8.6p388 -Patch34: ruby-1.8.6.x-CVE-2009-4492.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -199,7 +197,6 @@ pushd %{name}-%{arcver} %patch31 -p1 %patch32 -p0 %patch33 -p1 -%patch34 -p0 popd %build diff --git a/sources b/sources index a667a08..d9a2f79 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -a48703cd982b9f0e3002700a50b0e88e ruby-1.8.6-p383.tar.bz2 +f26cefbc8ab6728650ab9ae773d22bcb ruby-1.8.6-p388.tar.bz2 From 10bb15baa88b587c0bfa11ebc64e39009b4f92f6 Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Wed, 27 Jan 2010 12:41:43 +0000 Subject: [PATCH 157/529] 1.8.6.388-7 --- .cvsignore | 2 +- import.log | 1 + ruby.spec | 8 ++++++-- sources | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.cvsignore b/.cvsignore index abc7fa1..237576f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,4 +1,4 @@ +ruby-1.8.6-p388.tar.bz2 ruby-refm-rdp-1.8.2-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz -ruby-1.8.6-p388.tar.bz2 diff --git a/import.log b/import.log index 2f16979..6d9f528 100644 --- a/import.log +++ b/import.log @@ -5,3 +5,4 @@ ruby-1_8_6_368-1_fc11:HEAD:ruby-1.8.6.368-1.fc11.src.rpm:1243759307 ruby-1_8_6_368-2_fc11:HEAD:ruby-1.8.6.368-2.fc11.src.rpm:1245520186 ruby-1_8_6_369-1_fc11:HEAD:ruby-1.8.6.369-1.fc11.src.rpm:1245760717 ruby-1_8_6_388-6_fc12:HEAD:ruby-1.8.6.388-6.fc12.src.rpm:1264032880 +ruby-1_8_6_388-7_fc12:HEAD:ruby-1.8.6.388-7.fc12.src.rpm:1264596030 diff --git a/ruby.spec b/ruby.spec index e947c4c..541f5af 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 6%{?dist} +Release: 7%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -572,7 +572,11 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog -* Mon Jan 18 2010 Akira TAGOH +* Wed Jan 27 2010 Jeroen van Meeuwen - 1.8.6.388-7 +- Make sure that Red Hat people version their changelog entries +- This is actually release #1, but now needs to be release #7 + +* Mon Jan 18 2010 Akira TAGOH - 1.8.6.388-1 - Add conditional for RHEL. * Wed Jan 13 2010 Mamoru Tasaka - 1.8.6.383-6 diff --git a/sources b/sources index d9a2f79..402aa20 100644 --- a/sources +++ b/sources @@ -1,4 +1,4 @@ +f26cefbc8ab6728650ab9ae773d22bcb ruby-1.8.6-p388.tar.bz2 b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -f26cefbc8ab6728650ab9ae773d22bcb ruby-1.8.6-p388.tar.bz2 From 7c7fbd423908215a4d5b43044bd965f6f736af3a Mon Sep 17 00:00:00 2001 From: Jeroen van Meeuwen Date: Wed, 27 Jan 2010 14:18:18 +0000 Subject: [PATCH 158/529] 1.8.6.388-8 --- import.log | 1 + ruby-1.8.6-simplify-openssl-digest.patch | 239 +++++++++++++++++++++++ ruby.spec | 10 +- 3 files changed, 248 insertions(+), 2 deletions(-) create mode 100644 ruby-1.8.6-simplify-openssl-digest.patch diff --git a/import.log b/import.log index 6d9f528..0f3c183 100644 --- a/import.log +++ b/import.log @@ -6,3 +6,4 @@ ruby-1_8_6_368-2_fc11:HEAD:ruby-1.8.6.368-2.fc11.src.rpm:1245520186 ruby-1_8_6_369-1_fc11:HEAD:ruby-1.8.6.369-1.fc11.src.rpm:1245760717 ruby-1_8_6_388-6_fc12:HEAD:ruby-1.8.6.388-6.fc12.src.rpm:1264032880 ruby-1_8_6_388-7_fc12:HEAD:ruby-1.8.6.388-7.fc12.src.rpm:1264596030 +ruby-1_8_6_388-8_fc12:HEAD:ruby-1.8.6.388-8.fc12.src.rpm:1264601829 diff --git a/ruby-1.8.6-simplify-openssl-digest.patch b/ruby-1.8.6-simplify-openssl-digest.patch new file mode 100644 index 0000000..2636538 --- /dev/null +++ b/ruby-1.8.6-simplify-openssl-digest.patch @@ -0,0 +1,239 @@ +diff --git a/ext/openssl/lib/openssl/digest.rb b/ext/openssl/lib/openssl/digest.rb +index b3e4484..4810f01 100644 +--- a/ext/openssl/lib/openssl/digest.rb ++++ b/ext/openssl/lib/openssl/digest.rb +@@ -19,13 +19,17 @@ + #require 'openssl' + + module OpenSSL +- module Digest ++ class Digest + + alg = %w(DSS DSS1 MD2 MD4 MD5 MDC2 RIPEMD160 SHA SHA1) + if OPENSSL_VERSION_NUMBER > 0x00908000 + alg += %w(SHA224 SHA256 SHA384 SHA512) + end + ++ def self.digest(name, data) ++ super(data, name) ++ end ++ + alg.each{|name| + klass = Class.new(Digest){ + define_method(:initialize){|*data| +@@ -44,6 +48,14 @@ module OpenSSL + const_set(name, klass) + } + ++ # This class is only provided for backwards compatibility. Use OpenSSL::Digest in the future. ++ class Digest < Digest ++ def initialize(*args) ++ # add warning ++ super(*args) ++ end ++ end ++ + end # Digest + end # OpenSSL + +diff --git a/ext/openssl/ossl_digest.c b/ext/openssl/ossl_digest.c +index 4096b09..b0308f0 100644 +--- a/ext/openssl/ossl_digest.c ++++ b/ext/openssl/ossl_digest.c +@@ -40,7 +40,7 @@ GetDigestPtr(VALUE obj) + + SafeGetDigest(obj, ctx); + +- return EVP_MD_CTX_md(ctx); /*== ctx->digest*/ ++ return EVP_MD_CTX_md(ctx); + } + + VALUE +@@ -51,7 +51,6 @@ ossl_digest_new(const EVP_MD *md) + + ret = ossl_digest_alloc(cDigest); + GetDigest(ret, ctx); +- EVP_MD_CTX_init(ctx); + EVP_DigestInit_ex(ctx, md, NULL); + + return ret; +@@ -69,9 +68,8 @@ ossl_digest_alloc(VALUE klass) + ctx = EVP_MD_CTX_create(); + if (ctx == NULL) + ossl_raise(rb_eRuntimeError, "EVP_MD_CTX_create() failed"); +- EVP_MD_CTX_init(ctx); + obj = Data_Wrap_Struct(klass, 0, EVP_MD_CTX_destroy, ctx); +- ++ + return obj; + } + +@@ -86,14 +84,9 @@ ossl_digest_initialize(int argc, VALUE *argv, VALUE self) + VALUE type, data; + + rb_scan_args(argc, argv, "11", &type, &data); +- StringValue(type); ++ md = GetDigestPtr(type); + if (!NIL_P(data)) StringValue(data); +- name = StringValuePtr(type); +- +- md = EVP_get_digestbyname(name); +- if (!md) { +- ossl_raise(rb_eRuntimeError, "Unsupported digest algorithm (%s).", name); +- } ++ + GetDigest(self, ctx); + EVP_DigestInit_ex(ctx, md, NULL); + +@@ -141,75 +134,25 @@ ossl_digest_update(VALUE self, VALUE data) + return self; + } + +-static void +-digest_final(EVP_MD_CTX *ctx, char **buf, int *buf_len) +-{ +- EVP_MD_CTX final; +- +- if (!EVP_MD_CTX_copy(&final, ctx)) { +- ossl_raise(eDigestError, NULL); +- } +- if (!(*buf = OPENSSL_malloc(EVP_MD_CTX_size(&final)))) { +- EVP_MD_CTX_cleanup(&final); +- ossl_raise(eDigestError, "Cannot allocate mem for digest"); +- } +- EVP_DigestFinal_ex(&final, *buf, buf_len); +- EVP_MD_CTX_cleanup(&final); +-} +- +-static VALUE +-ossl_digest_digest(VALUE self) +-{ +- EVP_MD_CTX *ctx; +- char *buf; +- int buf_len; +- VALUE digest; +- +- GetDigest(self, ctx); +- digest_final(ctx, &buf, &buf_len); +- digest = ossl_buf2str(buf, buf_len); +- +- return digest; +-} +- + static VALUE +-ossl_digest_hexdigest(VALUE self) ++ossl_digest_finish(int argc, VALUE *argv, VALUE self) + { + EVP_MD_CTX *ctx; +- char *buf, *hexbuf; +- int buf_len; +- VALUE hexdigest; ++ VALUE str; ++ rb_scan_args(argc, argv, "01", &str); + + GetDigest(self, ctx); +- digest_final(ctx, &buf, &buf_len); +- if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) { +- OPENSSL_free(buf); +- ossl_raise(eDigestError, "Memory alloc error"); ++ if (NIL_P(str)) { ++ str = rb_str_new(NULL, EVP_MD_CTX_size(ctx)); ++ } else { ++ StringValue(str); ++ rb_str_resize(str, EVP_MD_CTX_size(ctx)); + } +- OPENSSL_free(buf); +- hexdigest = ossl_buf2str(hexbuf, 2 * buf_len); + +- return hexdigest; +-} +- +-static VALUE +-ossl_digest_s_digest(VALUE klass, VALUE str, VALUE data) +-{ +- VALUE obj = rb_class_new_instance(1, &str, klass); ++ EVP_DigestFinal_ex(ctx, RSTRING_PTR(str), NULL); + +- ossl_digest_update(obj, data); ++ return str; + +- return ossl_digest_digest(obj); +-} +- +-static VALUE +-ossl_digest_s_hexdigest(VALUE klass, VALUE str, VALUE data) +-{ +- VALUE obj = rb_class_new_instance(1, &str, klass); +- +- ossl_digest_update(obj, data); +- +- return ossl_digest_hexdigest(obj); + } + + static VALUE +@@ -258,41 +201,44 @@ ossl_digest_size(VALUE self) + return INT2NUM(EVP_MD_CTX_size(ctx)); + } + ++static VALUE ++ossl_digest_block_length(VALUE self) ++{ ++ EVP_MD_CTX *ctx; ++ ++ GetDigest(self, ctx); ++ ++ return INT2NUM(EVP_MD_CTX_block_size(ctx)); ++} ++ ++ + /* + * INIT + */ + void + Init_ossl_digest() + { ++ rb_require("openssl"); ++ rb_require("digest"); ++ + #if 0 /* let rdoc know about mOSSL */ + mOSSL = rb_define_module("OpenSSL"); + #endif + +- mDigest = rb_define_module_under(mOSSL, "Digest"); +- +- eDigestError = rb_define_class_under(mDigest, "DigestError", eOSSLError); +- +- cDigest = rb_define_class_under(mDigest, "Digest", rb_cObject); +- ++ cDigest = rb_define_class_under(mOSSL, "Digest", rb_path2class("Digest::Class")); ++ eDigestError = rb_define_class_under(cDigest, "DigestError", eOSSLError); ++ + rb_define_alloc_func(cDigest, ossl_digest_alloc); +- rb_define_singleton_method(cDigest, "digest", ossl_digest_s_digest, 2); +- rb_define_singleton_method(cDigest, "hexdigest", ossl_digest_s_hexdigest, 2); +- ++ + rb_define_method(cDigest, "initialize", ossl_digest_initialize, -1); +- rb_define_method(cDigest, "reset", ossl_digest_reset, 0); +- + rb_define_copy_func(cDigest, ossl_digest_copy); +- +- rb_define_method(cDigest, "digest", ossl_digest_digest, 0); +- rb_define_method(cDigest, "hexdigest", ossl_digest_hexdigest, 0); +- rb_define_alias(cDigest, "inspect", "hexdigest"); +- rb_define_alias(cDigest, "to_s", "hexdigest"); +- ++ rb_define_method(cDigest, "reset", ossl_digest_reset, 0); + rb_define_method(cDigest, "update", ossl_digest_update, 1); + rb_define_alias(cDigest, "<<", "update"); +- +- rb_define_method(cDigest, "==", ossl_digest_equal, 1); +- ++ rb_define_private_method(cDigest, "finish", ossl_digest_finish, -1); ++ rb_define_method(cDigest, "digest_length", ossl_digest_size, 0); ++ rb_define_method(cDigest, "block_length", ossl_digest_block_length, 0); ++ + rb_define_method(cDigest, "name", ossl_digest_name, 0); +- rb_define_method(cDigest, "size", ossl_digest_size, 0); + } ++ diff --git a/ruby.spec b/ruby.spec index 541f5af..b1fadc5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 7%{?dist} +Release: 8%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -56,6 +56,8 @@ Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch # Patch32 from ruby_1_8 branch Patch32: ruby-1.8head-irb-save-history.patch Patch33: ruby-1.8.6-p383-mkmf-use-shared.patch +# Testing +Patch34: ruby-1.8.6-simplify-openssl-digest.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -197,6 +199,8 @@ pushd %{name}-%{arcver} %patch31 -p1 %patch32 -p0 %patch33 -p1 + +%patch34 -p1 popd %build @@ -572,7 +576,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog -* Wed Jan 27 2010 Jeroen van Meeuwen - 1.8.6.388-7 +* Wed Jan 27 2010 Jeroen van Meeuwen - 1.8.6.388-8 +- Backport openssl/digest functions providing digest and hexdigest functions + directly in OpenSSL::Digest.methods - Make sure that Red Hat people version their changelog entries - This is actually release #1, but now needs to be release #7 From e8a9947bd426bc3d876209e6512ac43d5e2fc0d7 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 28 Jan 2010 07:58:41 +0000 Subject: [PATCH 159/529] Kill patch 34 (just commit for now) --- ruby.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index b1fadc5..c83d11b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,8 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 8%{?dist} +# 8.1 is not built yet (not needed because 8 is already untagged) +Release: 8%{?dist}.1 License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -200,7 +201,8 @@ pushd %{name}-%{arcver} %patch32 -p0 %patch33 -p1 -%patch34 -p1 +# Once kill patch34 due to build failure on actionpack +#%%patch34 -p1 popd %build @@ -576,6 +578,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Thu Jan 28 2010 Mamoru Tasaka +- Once revert the previous change (patch34) + * Wed Jan 27 2010 Jeroen van Meeuwen - 1.8.6.388-8 - Backport openssl/digest functions providing digest and hexdigest functions directly in OpenSSL::Digest.methods From 0ab1a34ed93c20e651b4b0d37893975e3acff71b Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 11 Mar 2010 15:42:54 +0000 Subject: [PATCH 160/529] - F-14: rebuild against new gdbm --- ruby.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index c83d11b..8fb0abf 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,8 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -# 8.1 is not built yet (not needed because 8 is already untagged) -Release: 8%{?dist}.1 +Release: 9%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -578,6 +577,9 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Fri Mar 12 2010 Mamoru Tasaka - 1.8.6.388-9 +- F-14: rebuild against new gdbm + * Thu Jan 28 2010 Mamoru Tasaka - Once revert the previous change (patch34) From e68a717cca9fab4c4c469f4cf5af8ee2283c751a Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Mon, 26 Apr 2010 19:02:49 +0000 Subject: [PATCH 161/529] - Update to 1.8.6 p 399 (bug 579675) - Patch to fix gc bug causing open4 crash (bug 580993) --- .cvsignore | 1 + ruby.spec | 15 +- ruby_1_8_7-gc-open4_096segv.patch | 351 ++++++++++++++++++++++++++++++ sources | 1 + 4 files changed, 364 insertions(+), 4 deletions(-) create mode 100644 ruby_1_8_7-gc-open4_096segv.patch diff --git a/.cvsignore b/.cvsignore index 237576f..bcd6a57 100644 --- a/.cvsignore +++ b/.cvsignore @@ -2,3 +2,4 @@ ruby-1.8.6-p388.tar.bz2 ruby-refm-rdp-1.8.2-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz +ruby-1.8.6-p399.tar.bz2 diff --git a/ruby.spec b/ruby.spec index 8fb0abf..1fa8ccb 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %define rubyxver 1.8 %define rubyver 1.8.6 -%define _patchlevel 388 +%define _patchlevel 399 %define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %define patchlevel %{?_patchlevel:-p%{_patchlevel}} %define arcver %{rubyver}%{?patchlevel} @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 9%{?dist} +Release: 1%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -57,7 +57,10 @@ Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch Patch32: ruby-1.8head-irb-save-history.patch Patch33: ruby-1.8.6-p383-mkmf-use-shared.patch # Testing -Patch34: ruby-1.8.6-simplify-openssl-digest.patch +# Patch34 disabled for now +Patch34: ruby-1.8.6-simplify-openssl-digest.patch +# bz 580993 +Patch35: ruby_1_8_7-gc-open4_096segv.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -199,9 +202,9 @@ pushd %{name}-%{arcver} %patch31 -p1 %patch32 -p0 %patch33 -p1 - # Once kill patch34 due to build failure on actionpack #%%patch34 -p1 +%patch35 -p1 popd %build @@ -577,6 +580,10 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Tue Apr 27 2010 Mamoru Tasaka - 1.8.6.399-1 +- Update to 1.8.6 p 399 (bug 579675) +- Patch to fix gc bug causing open4 crash (bug 580993) + * Fri Mar 12 2010 Mamoru Tasaka - 1.8.6.388-9 - F-14: rebuild against new gdbm diff --git a/ruby_1_8_7-gc-open4_096segv.patch b/ruby_1_8_7-gc-open4_096segv.patch new file mode 100644 index 0000000..4514022 --- /dev/null +++ b/ruby_1_8_7-gc-open4_096segv.patch @@ -0,0 +1,351 @@ +Index: ruby_1_8_7/marshal.c +=================================================================== +--- ruby_1_8_7/marshal.c (revision 26075) ++++ ruby_1_8_7/marshal.c (revision 26076) +@@ -85,12 +85,10 @@ + static ID s_getc, s_read, s_write, s_binmode; + + struct dump_arg { +- VALUE obj; + VALUE str, dest; + st_table *symbols; + st_table *data; + int taint; +- VALUE wrapper; + }; + + struct dump_call_arg { +@@ -104,22 +102,32 @@ + struct dump_arg *arg; + ID sym; + { +- if (!DATA_PTR(arg->wrapper)) { ++ if (!arg->symbols) { + rb_raise(rb_eRuntimeError, "Marshal.dump reentered at %s", + rb_id2name(sym)); + } + } + ++static void clear_dump_arg _((struct dump_arg *arg)); ++ + static void + mark_dump_arg(ptr) + void *ptr; + { + struct dump_arg *p = ptr; +- if (!ptr) ++ if (!p->symbols) + return; + rb_mark_set(p->data); + } + ++static void ++free_dump_arg(ptr) ++ void *ptr; ++{ ++ clear_dump_arg(ptr); ++ xfree(ptr); ++} ++ + static VALUE + class2path(klass) + VALUE klass; +@@ -699,32 +707,17 @@ + } + } + +-static VALUE +-dump(arg) +- struct dump_call_arg *arg; +-{ +- w_object(arg->obj, arg->arg, arg->limit); +- if (arg->arg->dest) { +- rb_io_write(arg->arg->dest, arg->arg->str); +- rb_str_resize(arg->arg->str, 0); +- } +- return 0; +-} +- +-static VALUE +-dump_ensure(arg) ++static void ++clear_dump_arg(arg) + struct dump_arg *arg; + { +- if (!DATA_PTR(arg->wrapper)) return 0; ++ if (!arg->symbols) return; + st_free_table(arg->symbols); ++ arg->symbols = 0; + st_free_table(arg->data); +- DATA_PTR(arg->wrapper) = 0; +- arg->wrapper = 0; + if (arg->taint) { + OBJ_TAINT(arg->str); + } +- +- return 0; + } + + /* +@@ -760,8 +753,8 @@ + { + VALUE obj, port, a1, a2; + int limit = -1; +- struct dump_arg arg; +- struct dump_call_arg c_arg; ++ struct dump_arg *arg; ++ VALUE wrapper; + + port = Qnil; + rb_scan_args(argc, argv, "12", &obj, &a1, &a2); +@@ -775,37 +768,40 @@ + else if (NIL_P(a1)) goto type_error; + else port = a1; + } +- arg.dest = 0; +- arg.symbols = st_init_numtable(); +- arg.data = st_init_numtable(); +- arg.taint = Qfalse; +- arg.str = rb_str_buf_new(0); +- RBASIC(arg.str)->klass = 0; +- arg.wrapper = Data_Wrap_Struct(rb_cData, mark_dump_arg, 0, &arg); ++ wrapper = Data_Make_Struct(rb_cData, struct dump_arg, mark_dump_arg, free_dump_arg, arg); ++ arg->dest = 0; ++ arg->symbols = st_init_numtable(); ++ arg->data = st_init_numtable(); ++ arg->taint = Qfalse; ++ arg->str = rb_str_buf_new(0); ++ RBASIC(arg->str)->klass = 0; + if (!NIL_P(port)) { + if (!rb_respond_to(port, s_write)) { + type_error: + rb_raise(rb_eTypeError, "instance of IO needed"); + } +- arg.dest = port; ++ arg->dest = port; + if (rb_respond_to(port, s_binmode)) { + rb_funcall2(port, s_binmode, 0, 0); +- check_dump_arg(&arg, s_binmode); ++ check_dump_arg(arg, s_binmode); + } + } + else { +- port = arg.str; ++ port = arg->str; + } + +- c_arg.obj = obj; +- c_arg.arg = &arg; +- c_arg.limit = limit; ++ w_byte(MARSHAL_MAJOR, arg); ++ w_byte(MARSHAL_MINOR, arg); + +- w_byte(MARSHAL_MAJOR, &arg); +- w_byte(MARSHAL_MINOR, &arg); ++ w_object(obj, arg, limit); ++ if (arg->dest) { ++ rb_io_write(arg->dest, arg->str); ++ rb_str_resize(arg->str, 0); ++ } + +- rb_ensure(dump, (VALUE)&c_arg, dump_ensure, (VALUE)&arg); +- RBASIC(arg.str)->klass = rb_cString; ++ RBASIC(arg->str)->klass = rb_cString; ++ clear_dump_arg(arg); ++ RB_GC_GUARD(wrapper); + + return port; + } +@@ -817,7 +813,6 @@ + st_table *data; + VALUE proc; + int taint; +- VALUE wrapper; + }; + + static void +@@ -825,22 +820,31 @@ + struct load_arg *arg; + ID sym; + { +- if (!DATA_PTR(arg->wrapper)) { ++ if (!arg->symbols) { + rb_raise(rb_eRuntimeError, "Marshal.load reentered at %s", + rb_id2name(sym)); + } + } + ++static void clear_load_arg _((struct load_arg *arg)); ++ + static void + mark_load_arg(ptr) + void *ptr; + { + struct load_arg *p = ptr; +- if (!ptr) ++ if (!p->symbols) + return; + rb_mark_tbl(p->data); + } + ++static void ++free_load_arg(void *ptr) ++{ ++ clear_load_arg(ptr); ++ xfree(ptr); ++} ++ + static VALUE r_object _((struct load_arg *arg)); + + static int +@@ -1415,23 +1419,14 @@ + return r_object0(arg, arg->proc, 0, Qnil); + } + +-static VALUE +-load(arg) ++static void ++clear_load_arg(arg) + struct load_arg *arg; + { +- return r_object(arg); +-} +- +-static VALUE +-load_ensure(arg) +- struct load_arg *arg; +-{ +- if (!DATA_PTR(arg->wrapper)) return 0; ++ if (!arg->symbols) return; + st_free_table(arg->symbols); ++ arg->symbols = 0; + st_free_table(arg->data); +- DATA_PTR(arg->wrapper) = 0; +- arg->wrapper = 0; +- return 0; + } + + /* +@@ -1451,35 +1446,37 @@ + VALUE *argv; + { + VALUE port, proc; +- int major, minor; +- VALUE v; +- struct load_arg arg; ++ int major, minor, taint = Qfalse; ++ VALUE v, wrapper; ++ struct load_arg *arg; + + rb_scan_args(argc, argv, "11", &port, &proc); + v = rb_check_string_type(port); + if (!NIL_P(v)) { +- arg.taint = OBJ_TAINTED(port); /* original taintedness */ ++ taint = OBJ_TAINTED(port); /* original taintedness */ + port = v; + } + else if (rb_respond_to(port, s_getc) && rb_respond_to(port, s_read)) { + if (rb_respond_to(port, s_binmode)) { + rb_funcall2(port, s_binmode, 0, 0); + } +- arg.taint = Qtrue; ++ taint = Qtrue; + } + else { + rb_raise(rb_eTypeError, "instance of IO needed"); + } +- arg.src = port; +- arg.offset = 0; +- arg.symbols = st_init_numtable(); +- arg.data = st_init_numtable(); +- arg.proc = 0; +- arg.wrapper = Data_Wrap_Struct(rb_cData, mark_load_arg, 0, &arg); ++ wrapper = Data_Make_Struct(rb_cData, struct load_arg, mark_load_arg, free_load_arg, arg); ++ arg->src = port; ++ arg->offset = 0; ++ arg->symbols = st_init_numtable(); ++ arg->data = st_init_numtable(); ++ arg->proc = 0; ++ arg->taint = taint; + +- major = r_byte(&arg); +- minor = r_byte(&arg); ++ major = r_byte(arg); ++ minor = r_byte(arg); + if (major != MARSHAL_MAJOR || minor > MARSHAL_MINOR) { ++ clear_load_arg(arg); + rb_raise(rb_eTypeError, "incompatible marshal file format (can't be read)\n\ + \tformat version %d.%d required; %d.%d given", + MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); +@@ -1490,8 +1487,10 @@ + MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); + } + +- if (!NIL_P(proc)) arg.proc = proc; +- v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg); ++ if (!NIL_P(proc)) arg->proc = proc; ++ v = r_object(arg); ++ clear_load_arg(arg); ++ RB_GC_GUARD(wrapper); + + return v; + } +Index: ruby_1_8_7/test/ruby/test_marshal.rb +=================================================================== +--- ruby_1_8_7/test/ruby/test_marshal.rb (revision 26075) ++++ ruby_1_8_7/test/ruby/test_marshal.rb (revision 26076) +@@ -71,4 +71,41 @@ + } + assert_equal("marshal data too short", e.message) + end ++ ++ class DumpTest ++ def marshal_dump ++ loop { Thread.pass } ++ end ++ end ++ ++ class LoadTest ++ def marshal_dump ++ nil ++ end ++ def marshal_load(obj) ++ loop { Thread.pass } ++ end ++ end ++ ++ def test_context_switch ++ o = DumpTest.new ++ Thread.new { Marshal.dump(o) } ++ GC.start ++ assert(true, '[ruby-dev:39425]') ++ ++ o = LoadTest.new ++ m = Marshal.dump(o) ++ Thread.new { Marshal.load(m) } ++ GC.start ++ assert(true, '[ruby-dev:39425]') ++ end ++ ++ def test_taint ++ x = Object.new ++ x.taint ++ s = Marshal.dump(x) ++ assert_equal(true, s.tainted?) ++ y = Marshal.load(s) ++ assert_equal(true, y.tainted?) ++ end + end +Index: ruby_1_8_7/ruby.h +=================================================================== +--- ruby_1_8_7/ruby.h (revision 16014) ++++ ruby_1_8_7/ruby.h (revision 16015) +@@ -224,6 +224,8 @@ + + #define TYPE(x) rb_type((VALUE)(x)) + ++#define RB_GC_GUARD(v) (*(volatile VALUE *)&(v)) ++ + void rb_check_type _((VALUE,int)); + #define Check_Type(v,t) rb_check_type((VALUE)(v),t) + diff --git a/sources b/sources index 402aa20..4217687 100644 --- a/sources +++ b/sources @@ -2,3 +2,4 @@ f26cefbc8ab6728650ab9ae773d22bcb ruby-1.8.6-p388.tar.bz2 b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz +f77c307cb72fb8808b0e85af5d05cefc ruby-1.8.6-p399.tar.bz2 From 75c801898d48195692e3ea31944ec87e3ef76798 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Fri, 14 May 2010 19:10:53 +0000 Subject: [PATCH 162/529] - ruby-1.8.x-null-class-must-be-Qnil.patch (bug 530407) - Recreate some patches using upstream svn when available, and add some comments for patches Tue May 11 2010 Mamoru Tasaka - 1.8.6.399-2 - tcltk: Give up using potentially unmaintained ruby_1_8_6 branch and instead completely replace with ruby_1_8 branch head (at this time, using rev 27738) (seems to fix 560053, 590503) - Fix Japanese encoding strings under ruby-tcltk/ext/tk/sample/ --- .cvsignore | 1 + ruby-1.8.6-p369-ri-gem_multipath.patch | 129 ++++++++++++++++--- ruby-1.8.6-rexml-CVE-2008-3790.patch | 85 +++++++++--- ruby-1.8.x-RHASH_SIZE-def.patch | 16 +++ ruby-1.8.x-ext_tk-flatten-level-revert.patch | 58 +++++++++ ruby-1.8.x-null-class-must-be-Qnil.patch | 21 +++ ruby.spec | 78 ++++++++++- sources | 1 + 8 files changed, 350 insertions(+), 39 deletions(-) create mode 100644 ruby-1.8.x-RHASH_SIZE-def.patch create mode 100644 ruby-1.8.x-ext_tk-flatten-level-revert.patch create mode 100644 ruby-1.8.x-null-class-must-be-Qnil.patch diff --git a/.cvsignore b/.cvsignore index bcd6a57..e4e63dc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -3,3 +3,4 @@ ruby-refm-rdp-1.8.2-ja-html.tar.gz rubyfaq-990927.tar.gz rubyfaq-jp-990927.tar.gz ruby-1.8.6-p399.tar.bz2 +ruby-1.8-rev27738_trunk-ext_tk.tar.gz diff --git a/ruby-1.8.6-p369-ri-gem_multipath.patch b/ruby-1.8.6-p369-ri-gem_multipath.patch index e5b5872..2c069d8 100644 --- a/ruby-1.8.6-p369-ri-gem_multipath.patch +++ b/ruby-1.8.6-p369-ri-gem_multipath.patch @@ -1,35 +1,130 @@ ---- ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb.gemmulti 2007-02-13 08:01:19.000000000 +0900 -+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_options.rb 2009-10-14 23:51:09.000000000 +0900 -@@ -63,7 +63,7 @@ +Mon Dec 24 16:18:57 2007 Eric Hodel + + * lib/rdoc/ri/ri_options.rb: Fix ri --help listing of gem ri paths. + Merge of r14567 and r14569 from trunk. + + * lib/rdoc/ri/ri_paths.rb: Fix duplication of ri data for multiple + gems. Merge of r14567 from trunk + +Index: ruby_1_8/lib/rdoc/ri/ri_options.rb +=================================================================== +--- ruby_1_8/lib/rdoc/ri/ri_options.rb (revision 14581) ++++ ruby_1_8/lib/rdoc/ri/ri_options.rb (revision 14582) +@@ -62,10 +62,11 @@ + (RI::Paths::HOMEDIR || "No ~/.rdoc found") ], [ "--gems", nil, nil, - "Include documentation from Rubygems:\n " + +- "Include documentation from Rubygems:\n " + - (RI::Paths::GEMDIRS ? "#{Gem.path}/doc/*/ri" : -+ (RI::Paths::GEMDIRS ? Gem.path.map {|path| "#{path}/doc/*/ri" }.join(', ') : - "No Rubygems ri found.") ], - +- "No Rubygems ri found.") ], +- ++ "Include documentation from RubyGems:\n" + ++ (RI::Paths::GEMDIRS ? ++ Gem.path.map { |dir| " #{dir}/doc/*/ri" }.join("\n") : ++ "No Rubygems ri found.") ], ++ [ "--format", "-f", "", -@@ -136,7 +136,11 @@ + "Format to use when displaying output:\n" + + " " + RI::TextFormatter.list + "\n" + +@@ -116,7 +117,8 @@ + def OptionList.error(msg) + $stderr.puts + $stderr.puts msg +- $stderr.puts "\nFor help on options, try 'ri --help'\n\n" ++ name = File.basename $PROGRAM_NAME ++ $stderr.puts "\nFor help on options, try '#{name} --help'\n\n" + exit 1 + end + +@@ -136,7 +138,11 @@ RI::Paths::HOMEDIR ] - directories << "#{Gem.path}/doc/*/ri" if RI::Paths::GEMDIRS -+ if RI::Paths::GEMDIRS -+ Gem.path.each {|gempath| -+ directories << "#{gempath}/doc/*/ri" -+ } ++ if RI::Paths::GEMDIRS then ++ Gem.path.each do |dir| ++ directories << "#{dir}/doc/*/ri" ++ end + end directories = directories.join("\n ") ---- ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb.gemmulti 2007-02-13 08:01:19.000000000 +0900 -+++ ruby-1.8.6-p369/lib/rdoc/ri/ri_paths.rb 2009-10-15 00:02:05.000000000 +0900 -@@ -44,7 +44,7 @@ +@@ -157,16 +163,16 @@ + + For example: + +- ri File +- ri File.new +- ri F.n +- ri zip ++ #{name} File ++ #{name} File.new ++ #{name} F.n ++ #{name} zip + + Note that shell quoting may be required for method names + containing punctuation: + +- ri 'Array.[]' +- ri compact\\! ++ #{name} 'Array.[]' ++ #{name} compact\\! + + By default ri searches for documentation in the following + directories: +@@ -180,8 +186,8 @@ + EOT + + if short_form +- puts "For help on options, type 'ri -h'" +- puts "For a list of classes I know about, type 'ri -c'" ++ puts "For help on options, type '#{name} -h'" ++ puts "For a list of classes I know about, type '#{name} -c'" + else + puts "Options:\n\n" + OPTION_LIST.each do|long, short, arg, desc| +Index: ruby_1_8/lib/rdoc/ri/ri_paths.rb +=================================================================== +--- ruby_1_8/lib/rdoc/ri/ri_paths.rb (revision 14581) ++++ ruby_1_8/lib/rdoc/ri/ri_paths.rb (revision 14582) +@@ -44,8 +44,29 @@ begin require 'rubygems' - GEMDIRS = Dir["#{Gem.path}/doc/*/ri"] -+ GEMDIRS = Gem.path.map {|path| Dir["#{path}/doc/*/ri"]}.flatten - GEMDIRS.each { |path| RI::Paths::PATH << path } +- GEMDIRS.each { |path| RI::Paths::PATH << path } ++ ++ # HACK dup'd from Gem.latest_partials and friends ++ all_paths = [] ++ ++ all_paths = Gem.path.map do |dir| ++ Dir[File.join(dir, 'doc', '*', 'ri')] ++ end.flatten ++ ++ ri_paths = {} ++ ++ all_paths.each do |dir| ++ base = File.basename File.dirname(dir) ++ if base =~ /(.*)-((\d+\.)*\d+)/ then ++ name, version = $1, $2 ++ ver = Gem::Version.new version ++ if ri_paths[name].nil? or ver > ri_paths[name][0] then ++ ri_paths[name] = [ver, dir] ++ end ++ end ++ end ++ ++ GEMDIRS = ri_paths.map { |k,v| v.last }.sort ++ GEMDIRS.each { |dir| RI::Paths::PATH << dir } rescue LoadError GEMDIRS = nil + end +@@ -55,7 +76,7 @@ + + def self.path(use_system, use_site, use_home, use_gems, *extra_dirs) + path = raw_path(use_system, use_site, use_home, use_gems, *extra_dirs) +- return path.select { |path| File.directory? path } ++ return path.select { |directory| File.directory? directory } + end + + # Returns the selected documentation directories including nonexistent diff --git a/ruby-1.8.6-rexml-CVE-2008-3790.patch b/ruby-1.8.6-rexml-CVE-2008-3790.patch index 2db8dd6..a0788b2 100644 --- a/ruby-1.8.6-rexml-CVE-2008-3790.patch +++ b/ruby-1.8.6-rexml-CVE-2008-3790.patch @@ -1,7 +1,27 @@ -diff -pruN ruby-1.8.6-p287.orig/lib/rexml/document.rb ruby-1.8.6-p287/lib/rexml/document.rb ---- ruby-1.8.6-p287.orig/lib/rexml/document.rb 2007-11-04 13:50:15.000000000 +0900 -+++ ruby-1.8.6-p287/lib/rexml/document.rb 2008-10-08 22:25:14.000000000 +0900 -@@ -32,6 +32,7 @@ module REXML +Fri Nov 7 02:08:04 2008 Shugo Maeda + + * lib/rexml/entity.rb (unnormalized): do not call + document.record_entity_expansion if document is nil. + see . + Thanks, Naohisa Goto. backported from trunk. + + * test/rexml/test_document.rb: ditto. + +Sat Sep 13 11:05:38 2008 Shugo Maeda + + * lib/rexml/document.rb: limit entity expansion. Thanks, Luka + Treiber, Mitja Kolsek, and Michael Koziarski. backported from + trunk r19033, r19317, r19318. + + * lib/rexml/entity.rb: ditto. + + * test/rexml/test_document.rb: ditto. + +Index: ruby_1_8/lib/rexml/document.rb +=================================================================== +--- ruby_1_8/lib/rexml/document.rb (revision 19319) ++++ ruby_1_8/lib/rexml/document.rb (revision 19320) +@@ -32,6 +32,7 @@ # @param context if supplied, contains the context of the document; # this should be a Hash. def initialize( source = nil, context = {} ) @@ -9,10 +29,10 @@ diff -pruN ruby-1.8.6-p287.orig/lib/rexml/document.rb ruby-1.8.6-p287/lib/rexml/ super() @context = context return if source.nil? -@@ -200,6 +201,27 @@ module REXML +@@ -200,6 +201,27 @@ Parsers::StreamParser.new( source, listener ).parse end - + + @@entity_expansion_limit = 10_000 + + # Set the entity expansion limit. By defualt the limit is set to 10000. @@ -26,7 +46,7 @@ diff -pruN ruby-1.8.6-p287.orig/lib/rexml/document.rb ruby-1.8.6-p287/lib/rexml/ + end + + attr_reader :entity_expansion_count -+ ++ + def record_entity_expansion + @entity_expansion_count += 1 + if @entity_expansion_count > @@entity_expansion_limit @@ -37,21 +57,22 @@ diff -pruN ruby-1.8.6-p287.orig/lib/rexml/document.rb ruby-1.8.6-p287/lib/rexml/ private def build( source ) Parsers::TreeParser.new( source, self ).parse -diff -pruN ruby-1.8.6-p287.orig/lib/rexml/entity.rb ruby-1.8.6-p287/lib/rexml/entity.rb ---- ruby-1.8.6-p287.orig/lib/rexml/entity.rb 2007-07-28 11:46:08.000000000 +0900 -+++ ruby-1.8.6-p287/lib/rexml/entity.rb 2008-10-08 22:25:14.000000000 +0900 -@@ -73,6 +73,7 @@ module REXML +Index: ruby_1_8/lib/rexml/entity.rb +=================================================================== +--- ruby_1_8/lib/rexml/entity.rb (revision 19319) ++++ ruby_1_8/lib/rexml/entity.rb (revision 20121) +@@ -73,6 +73,7 @@ # all entities -- both %ent; and &ent; entities. This differs from # +value()+ in that +value+ only replaces %ent; entities. def unnormalized -+ document.record_entity_expansion unless document.nil? ++ document.record_entity_expansion unless document.nil? v = value() return nil if v.nil? @unnormalized = Text::unnormalize(v, parent) -diff -pruN ruby-1.8.6-p287.orig/test/rexml/test_document.rb ruby-1.8.6-p287/test/rexml/test_document.rb ---- ruby-1.8.6-p287.orig/test/rexml/test_document.rb 1970-01-01 09:00:00.000000000 +0900 -+++ ruby-1.8.6-p287/test/rexml/test_document.rb 2008-10-08 22:25:14.000000000 +0900 -@@ -0,0 +1,42 @@ +=================================================================== +--- ruby_1_8/test/rexml/test_document.rb (revision 0) ++++ ruby_1_8/test/rexml/test_document.rb (revision 20121) +@@ -0,0 +1,66 @@ +require "rexml/document" +require "test/unit" + @@ -80,6 +101,19 @@ diff -pruN ruby-1.8.6-p287.orig/test/rexml/test_document.rb ruby-1.8.6-p287/test + +EOF + ++ XML_WITH_4_ENTITY_EXPANSION = < ++ ++ ++]> ++ ++&a; ++&a2; ++< ++ ++EOF ++ + def test_entity_expansion_limit + doc = REXML::Document.new(XML_WITH_NESTED_ENTITY) + assert_raise(RuntimeError) do @@ -92,5 +126,24 @@ diff -pruN ruby-1.8.6-p287.orig/test/rexml/test_document.rb ruby-1.8.6-p287/test + doc.root.children.first.value + end + assert_equal(101, doc.entity_expansion_count) ++ ++ REXML::Document.entity_expansion_limit = 4 ++ doc = REXML::Document.new(XML_WITH_4_ENTITY_EXPANSION) ++ assert_equal("\na\na a\n<\n", doc.root.children.first.value) ++ REXML::Document.entity_expansion_limit = 3 ++ doc = REXML::Document.new(XML_WITH_4_ENTITY_EXPANSION) ++ assert_raise(RuntimeError) do ++ doc.root.children.first.value ++ end ++ ensure ++ REXML::Document.entity_expansion_limit = 10000 + end +end + +Property changes on: ruby_1_8/test/rexml/test_document.rb +___________________________________________________________________ +Added: svn:keywords + + Author Id Revision +Added: svn:eol-style + + LF + diff --git a/ruby-1.8.x-RHASH_SIZE-def.patch b/ruby-1.8.x-RHASH_SIZE-def.patch new file mode 100644 index 0000000..e7c119a --- /dev/null +++ b/ruby-1.8.x-RHASH_SIZE-def.patch @@ -0,0 +1,16 @@ +Index: ruby_1_8/ruby.h +=================================================================== +--- ruby_1_8/ruby.h (revision 13310) ++++ ruby_1_8/ruby.h (revision 13311) +@@ -374,6 +374,11 @@ + int iter_lev; + VALUE ifnone; + }; ++#define RHASH_TBL(h) (RHASH(h)->tbl) ++#define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev) ++#define RHASH_IFNONE(h) (RHASH(h)->ifnone) ++#define RHASH_SIZE(h) (RHASH(h)->tbl->num_entries) ++#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0) + + struct RFile { + struct RBasic basic; diff --git a/ruby-1.8.x-ext_tk-flatten-level-revert.patch b/ruby-1.8.x-ext_tk-flatten-level-revert.patch new file mode 100644 index 0000000..7d57b37 --- /dev/null +++ b/ruby-1.8.x-ext_tk-flatten-level-revert.patch @@ -0,0 +1,58 @@ +Index: ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb +=================================================================== +--- ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb (revision 27738) ++++ ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb (working copy) +@@ -39,7 +39,23 @@ + end + fail ArgumentError, 'no widget is given' if args.empty? + params = [] +- args.flatten(1).each{|win| params.push(_epath(win))} ++ ++ #args.flatten(1).each{|win| params.push(_epath(win))} ++ # ++ # flatten(level) is ruby >=1.8.7 feature, substituting ++ # ++ args_flatten_one = [] ++ args.each {|args1| ++ if args1.is_a? Array then ++ args1.each {|args2| ++ args_flatten_one << args2 ++ } ++ else ++ args_flatten_one << args1 ++ end ++ } ++ args_flatten_one.each{|win| params.push(_epath(win))} ++ + opts.each{|k, v| + params.push("-#{k}") + params.push(_epath(v)) # have to use 'epath' (hash_kv() is unavailable) +Index: ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb +=================================================================== +--- ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb (revision 27738) ++++ ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb (working copy) +@@ -63,7 +63,23 @@ + end + fail ArgumentError, 'no widget is given' if args.empty? + params = [] +- args.flatten(1).each{|win| ++ ++ #args.flatten(1).each{|win| ++ # ++ # flatten(level) is ruby >=1.8.7 feature, substituting ++ # ++ ++ args_flatten_one = [] ++ args.each {|args1| ++ if args1.is_a? Array then ++ args1.each {|args2| ++ args_flatten_one << args2 ++ } ++ else ++ args_flatten_one << args1 ++ end ++ } ++ args_flatten_one.each{|win| + case win + when '-', ?- # RELATIVE PLACEMENT (increase columnspan) + params.push('-') diff --git a/ruby-1.8.x-null-class-must-be-Qnil.patch b/ruby-1.8.x-null-class-must-be-Qnil.patch new file mode 100644 index 0000000..114a97b --- /dev/null +++ b/ruby-1.8.x-null-class-must-be-Qnil.patch @@ -0,0 +1,21 @@ +Sun Mar 1 03:04:19 2009 Akinori MUSHA + + * class.c (rb_singleton_class_clone): Qnil must be used for a null + class reference when we use NIL_P() to check class reference + validity. The bug was exposed by the spec test of Sequel. + + * eval.c (ruby_init): Use NEW_CREF(). + +Index: ruby_1_8/class.c +=================================================================== +--- ruby_1_8/class.c (revision 22678) ++++ ruby_1_8/class.c (revision 22679) +@@ -153,7 +153,7 @@ + data.klass = obj; + break; + default: +- data.klass = 0; ++ data.klass = Qnil; + break; + } + diff --git a/ruby.spec b/ruby.spec index 1fa8ccb..1e4f1f7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,13 +10,15 @@ %define sitedir2 %{_prefix}/lib/ruby/site_ruby %define _normalized_cpu %(echo `echo %{_target_cpu} | sed 's/^ppc/powerpc/' | sed -e 's|i.86|i386|'`) +%define tk_using_svn_number 27738 + # emacs sitelisp directory %{!?_emacs_sitelispdir: %global _emacs_sitelispdir %{_datadir}/emacs/site-lisp} %{!?_emacs_sitestartdir: %global _emacs_sitestartdir %{_datadir}/emacs/site-lisp/site-start.d} Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 3%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -39,7 +41,14 @@ Source2: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz Source4: irb.1 Source10: ruby-mode-init.el +# +# Source100: contains ext/tk directory of the head of ruby_1_8 branch +# i.e. http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8 +# see bug 560053, 590503, and +# http://lists.fedoraproject.org/pipermail/ruby-sig/2010-May/000096.html +Source100: ruby-1.8-rev%{tk_using_svn_number}_trunk-ext_tk.tar.gz +# Patch1 - Patch23 are Fedora specific Patch1: ruby-deadcode.patch Patch20: ruby-1.8.6-p383-rubyprefix.patch Patch21: ruby-deprecated-sitelib-search-path.patch @@ -47,20 +56,40 @@ Patch22: ruby-deprecated-search-path.patch Patch23: ruby-multilib.patch # Needed in 1.8.6-p287, no longer needed in 1.8.6-p368? #Patch25: ruby-1.8.6.111-gcc43.patch +# ruby_1_8 branch rev 19320, 20121, bug 460134 Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch +# Patch27, 28 could not be found in the upstream VCS +# Need checking?? Patch27: ruby-1.8.6-p287-CVE-2008-5189.patch Patch28: ruby-1.8.6-p287-remove-ssl-rand-range.patch +# Fedora specific +# Change the directory of sitearchdir from i?86 to i386 for upgrade path Patch29: ruby-always-use-i386.patch +# By Tomas Mraz, "seems" already in ruby_1_8 branch head +# (but have not checked yet in detail) Patch30: ruby-openssl-1.0.patch +# bug 528787, patch from in ruby_1_8 branch Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch -# Patch32 from ruby_1_8 branch +# bug 518584, ruby issue 1556, patch from ruby_1_8??? branch Patch32: ruby-1.8head-irb-save-history.patch +# bug 428384, Fedora specific, however needed for Fedora's static +# archive policy Patch33: ruby-1.8.6-p383-mkmf-use-shared.patch -# Testing -# Patch34 disabled for now +# Testing (bug 559158) +# Patch34 disabled for now as this breaks rubygem-actionpack rake test, +# need investigating Patch34: ruby-1.8.6-simplify-openssl-digest.patch -# bz 580993 +# bug 580993, patch from ruby_1_8_7 branch Patch35: ruby_1_8_7-gc-open4_096segv.patch +# +# Patch36, 37: needed to use the head of ext/tk directory of ruby_1_8 branch head +# Patch36: taken from ruby_1_8 branch +Patch36: ruby-1.8.x-RHASH_SIZE-def.patch +# Patch37: flatten(level) feature is in >= 1.8.7, reverting +Patch37: ruby-1.8.x-ext_tk-flatten-level-revert.patch +# From ruby_1_8 branch: bz 530407 +# bz 530407 reproducible with 1.8.7p174, not with 1.8.7p249 +Patch38: ruby-1.8.x-null-class-must-be-Qnil.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -180,12 +209,19 @@ along with a list of the methods the class or module implements. %prep -%setup -q -c -a 2 -a 3 +%setup -q -c -a 2 -a 3 -a 100 mkdir -p ruby-refm-ja pushd ruby-refm-ja tar fxz %{SOURCE1} popd pushd %{name}-%{arcver} + +( cd ext + mv tk .tk.old + cp -a ../../ruby-1.8-rev*/ext/tk tk + find tk -type d -name \.svn | sort -r | xargs rm -rf +) + %patch1 -p1 %patch20 -p1 %patch21 -p1 @@ -205,6 +241,9 @@ pushd %{name}-%{arcver} # Once kill patch34 due to build failure on actionpack #%%patch34 -p1 %patch35 -p1 +%patch36 -p1 +%patch37 -p1 +%patch38 -p1 popd %build @@ -216,7 +255,10 @@ autoconf rb_cv_func_strtod=no export rb_cv_func_strtod + +# bug 489990 CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" + export CFLAGS %configure \ --with-sitedir='%{sitedir}' \ @@ -353,6 +395,18 @@ for i in `find -type f ! -name "*.gif"`; do fi done +# fix Japanese encoding strings for ruby-tcltk/ext/tk/sample/ +pushd ruby-tcltk/ext/tk/ +cd sample +find . -path ./demos-jp/\*.rb -or -path ./tkoptdb\*.rb -or -path ./msgs_rb2/ja.msg | \ + xargs sed -i -e 's|euc-jp|utf-8|' +sed -i \ + -e '/KCODE =/s|euc|utf-8|' -e 's|EUC-JP|UTF-8|' \ + demos-jp/widget +cd .. +sed -i -e 's|EUC-JP|UTF-8|' README.1st +popd + # done cd .. @@ -580,6 +634,18 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Thu May 13 2010 Mamoru Tasaka - 1.8.6.399-3 +- ruby-1.8.x-null-class-must-be-Qnil.patch (bug 530407) +- Recreate some patches using upstream svn when available, and + add some comments for patches + +* Tue May 11 2010 Mamoru Tasaka - 1.8.6.399-2 +- tcltk: Give up using potentially unmaintained ruby_1_8_6 branch + and instead completely replace with ruby_1_8 branch head + (at this time, using rev 27738) + (seems to fix 560053, 590503) +- Fix Japanese encoding strings under ruby-tcltk/ext/tk/sample/ + * Tue Apr 27 2010 Mamoru Tasaka - 1.8.6.399-1 - Update to 1.8.6 p 399 (bug 579675) - Patch to fix gc bug causing open4 crash (bug 580993) diff --git a/sources b/sources index 4217687..b1ee168 100644 --- a/sources +++ b/sources @@ -3,3 +3,4 @@ b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz 634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz 4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz f77c307cb72fb8808b0e85af5d05cefc ruby-1.8.6-p399.tar.bz2 +6a8313c73087513f24e52d8cee5b3804 ruby-1.8-rev27738_trunk-ext_tk.tar.gz From 0ad7b6767800f78da25d693556967c702e147f76 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Mon, 17 May 2010 12:50:20 +0000 Subject: [PATCH 163/529] - Patch36 (ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch) also backport rb_hash_lookup definition (bug 592936) --- ruby-1.8.x-RHASH_SIZE-def.patch | 16 ----- ...-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch | 65 +++++++++++++++++++ ruby.spec | 13 +++- 3 files changed, 75 insertions(+), 19 deletions(-) delete mode 100644 ruby-1.8.x-RHASH_SIZE-def.patch create mode 100644 ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch diff --git a/ruby-1.8.x-RHASH_SIZE-def.patch b/ruby-1.8.x-RHASH_SIZE-def.patch deleted file mode 100644 index e7c119a..0000000 --- a/ruby-1.8.x-RHASH_SIZE-def.patch +++ /dev/null @@ -1,16 +0,0 @@ -Index: ruby_1_8/ruby.h -=================================================================== ---- ruby_1_8/ruby.h (revision 13310) -+++ ruby_1_8/ruby.h (revision 13311) -@@ -374,6 +374,11 @@ - int iter_lev; - VALUE ifnone; - }; -+#define RHASH_TBL(h) (RHASH(h)->tbl) -+#define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev) -+#define RHASH_IFNONE(h) (RHASH(h)->ifnone) -+#define RHASH_SIZE(h) (RHASH(h)->tbl->num_entries) -+#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0) - - struct RFile { - struct RBasic basic; diff --git a/ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch b/ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch new file mode 100644 index 0000000..503a6b4 --- /dev/null +++ b/ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch @@ -0,0 +1,65 @@ +Sat Apr 19 18:42:04 2008 Akinori MUSHA + + * intern.h, hash.c (rb_hash_lookup): New internal function to + check if a key exists in a hash, ignoring #default; backported + from 1.9. + +Thu Aug 30 08:24:18 2007 Tanaka Akira + + * ruby.h (RHASH_TBL): defined for compatibility to 1.9. + * (RHASH_ITER_LEV): ditto. + * (RHASH_IFNONE): ditto. + * (RHASH_SIZE): ditto. + * (RHASH_EMPTY_P): ditto. + +Index: ruby_1_8/ruby.h +=================================================================== +--- ruby_1_8/ruby.h (revision 13310) ++++ ruby_1_8/ruby.h (revision 13311) +@@ -374,6 +374,11 @@ + int iter_lev; + VALUE ifnone; + }; ++#define RHASH_TBL(h) (RHASH(h)->tbl) ++#define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev) ++#define RHASH_IFNONE(h) (RHASH(h)->ifnone) ++#define RHASH_SIZE(h) (RHASH(h)->tbl->num_entries) ++#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0) + + struct RFile { + struct RBasic basic; +Index: ruby_1_8/hash.c +=================================================================== +--- ruby_1_8/hash.c (revision 16077) ++++ ruby_1_8/hash.c (revision 16078) +@@ -454,6 +454,18 @@ + return val; + } + ++VALUE ++rb_hash_lookup(hash, key) ++ VALUE hash, key; ++{ ++ VALUE val; ++ ++ if (!st_lookup(RHASH(hash)->tbl, key, &val)) { ++ return Qnil; /* without Hash#default */ ++ } ++ return val; ++} ++ + /* + * call-seq: + * hsh.fetch(key [, default] ) => obj +Index: ruby_1_8/intern.h +=================================================================== +--- ruby_1_8/intern.h (revision 16077) ++++ ruby_1_8/intern.h (revision 16078) +@@ -270,6 +270,7 @@ + VALUE rb_hash_new _((void)); + VALUE rb_hash_freeze _((VALUE)); + VALUE rb_hash_aref _((VALUE, VALUE)); ++VALUE rb_hash_lookup _((VALUE, VALUE)); + VALUE rb_hash_aset _((VALUE, VALUE, VALUE)); + VALUE rb_hash_delete_if _((VALUE)); + VALUE rb_hash_delete _((VALUE,VALUE)); diff --git a/ruby.spec b/ruby.spec index 1e4f1f7..d6fadb8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -18,7 +18,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 3.1%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -83,8 +83,11 @@ Patch34: ruby-1.8.6-simplify-openssl-digest.patch Patch35: ruby_1_8_7-gc-open4_096segv.patch # # Patch36, 37: needed to use the head of ext/tk directory of ruby_1_8 branch head -# Patch36: taken from ruby_1_8 branch -Patch36: ruby-1.8.x-RHASH_SIZE-def.patch +# Patch36: taken from ruby_1_8 branch, RHASH_SIZE definition is needed +# for ruby_1_8 head ext/tk +# With this change, rb_hash_lookup becomes also needed for rubygem-nokogiri +# (bug 592936) +Patch36: ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch # Patch37: flatten(level) feature is in >= 1.8.7, reverting Patch37: ruby-1.8.x-ext_tk-flatten-level-revert.patch # From ruby_1_8 branch: bz 530407 @@ -634,6 +637,10 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Mon May 17 2010 Mamoru Tasaka - 1.8.6.399-4 +- Patch36 (ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch) + also backport rb_hash_lookup definition (bug 592936) + * Thu May 13 2010 Mamoru Tasaka - 1.8.6.399-3 - ruby-1.8.x-null-class-must-be-Qnil.patch (bug 530407) - Recreate some patches using upstream svn when available, and From d5ad16c60df9ce61bcd0ac985a479c55b98514cc Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Mon, 17 May 2010 12:51:24 +0000 Subject: [PATCH 164/529] fix release --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d6fadb8..d374e40 100644 --- a/ruby.spec +++ b/ruby.spec @@ -18,7 +18,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3.1%{?dist} +Release: 4%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) From ca9335f385f2a71e41ccf7f591a44fdd24ada9dd Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Tue, 18 May 2010 17:42:34 +0000 Subject: [PATCH 165/529] - Retry for bug 559158, Simplify the OpenSSL::Digest class pull more change commits from ruby_1_8 branch --- ...igest-once-revert-for-simplify-patch.patch | 15 ++ ruby-1.8.6-rexml-CVE-2008-3790.patch | 149 ---------- ruby-1.8.6-simplify-openssl-digest.patch | 254 +++++++++++++----- ruby.spec | 25 +- 4 files changed, 225 insertions(+), 218 deletions(-) create mode 100644 ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch delete mode 100644 ruby-1.8.6-rexml-CVE-2008-3790.patch diff --git a/ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch b/ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch new file mode 100644 index 0000000..336254a --- /dev/null +++ b/ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch @@ -0,0 +1,15 @@ +Index: ruby_1_8_6/ext/openssl/ossl_digest.c +=================================================================== +--- ruby_1_8_6/ext/openssl/ossl_digest.c (revision 12042) ++++ ruby_1_8_6/ext/openssl/ossl_digest.c (revision 12043) +@@ -264,6 +264,10 @@ + void + Init_ossl_digest() + { ++#if 0 /* let rdoc know about mOSSL */ ++ mOSSL = rb_define_module("OpenSSL"); ++#endif ++ + mDigest = rb_define_module_under(mOSSL, "Digest"); + + eDigestError = rb_define_class_under(mDigest, "DigestError", eOSSLError); diff --git a/ruby-1.8.6-rexml-CVE-2008-3790.patch b/ruby-1.8.6-rexml-CVE-2008-3790.patch deleted file mode 100644 index a0788b2..0000000 --- a/ruby-1.8.6-rexml-CVE-2008-3790.patch +++ /dev/null @@ -1,149 +0,0 @@ -Fri Nov 7 02:08:04 2008 Shugo Maeda - - * lib/rexml/entity.rb (unnormalized): do not call - document.record_entity_expansion if document is nil. - see . - Thanks, Naohisa Goto. backported from trunk. - - * test/rexml/test_document.rb: ditto. - -Sat Sep 13 11:05:38 2008 Shugo Maeda - - * lib/rexml/document.rb: limit entity expansion. Thanks, Luka - Treiber, Mitja Kolsek, and Michael Koziarski. backported from - trunk r19033, r19317, r19318. - - * lib/rexml/entity.rb: ditto. - - * test/rexml/test_document.rb: ditto. - -Index: ruby_1_8/lib/rexml/document.rb -=================================================================== ---- ruby_1_8/lib/rexml/document.rb (revision 19319) -+++ ruby_1_8/lib/rexml/document.rb (revision 19320) -@@ -32,6 +32,7 @@ - # @param context if supplied, contains the context of the document; - # this should be a Hash. - def initialize( source = nil, context = {} ) -+ @entity_expansion_count = 0 - super() - @context = context - return if source.nil? -@@ -200,6 +201,27 @@ - Parsers::StreamParser.new( source, listener ).parse - end - -+ @@entity_expansion_limit = 10_000 -+ -+ # Set the entity expansion limit. By defualt the limit is set to 10000. -+ def Document::entity_expansion_limit=( val ) -+ @@entity_expansion_limit = val -+ end -+ -+ # Get the entity expansion limit. By defualt the limit is set to 10000. -+ def Document::entity_expansion_limit -+ return @@entity_expansion_limit -+ end -+ -+ attr_reader :entity_expansion_count -+ -+ def record_entity_expansion -+ @entity_expansion_count += 1 -+ if @entity_expansion_count > @@entity_expansion_limit -+ raise "number of entity expansions exceeded, processing aborted." -+ end -+ end -+ - private - def build( source ) - Parsers::TreeParser.new( source, self ).parse -Index: ruby_1_8/lib/rexml/entity.rb -=================================================================== ---- ruby_1_8/lib/rexml/entity.rb (revision 19319) -+++ ruby_1_8/lib/rexml/entity.rb (revision 20121) -@@ -73,6 +73,7 @@ - # all entities -- both %ent; and &ent; entities. This differs from - # +value()+ in that +value+ only replaces %ent; entities. - def unnormalized -+ document.record_entity_expansion unless document.nil? - v = value() - return nil if v.nil? - @unnormalized = Text::unnormalize(v, parent) -=================================================================== ---- ruby_1_8/test/rexml/test_document.rb (revision 0) -+++ ruby_1_8/test/rexml/test_document.rb (revision 20121) -@@ -0,0 +1,66 @@ -+require "rexml/document" -+require "test/unit" -+ -+class REXML::TestDocument < Test::Unit::TestCase -+ def test_new -+ doc = REXML::Document.new(< -+Hello world! -+EOF -+ assert_equal("Hello world!", doc.root.children.first.value) -+ end -+ -+ XML_WITH_NESTED_ENTITY = < -+ -+ -+ -+ -+ -+ -+ -+]> -+ -+&a; -+ -+EOF -+ -+ XML_WITH_4_ENTITY_EXPANSION = < -+ -+ -+]> -+ -+&a; -+&a2; -+< -+ -+EOF -+ -+ def test_entity_expansion_limit -+ doc = REXML::Document.new(XML_WITH_NESTED_ENTITY) -+ assert_raise(RuntimeError) do -+ doc.root.children.first.value -+ end -+ REXML::Document.entity_expansion_limit = 100 -+ assert_equal(100, REXML::Document.entity_expansion_limit) -+ doc = REXML::Document.new(XML_WITH_NESTED_ENTITY) -+ assert_raise(RuntimeError) do -+ doc.root.children.first.value -+ end -+ assert_equal(101, doc.entity_expansion_count) -+ -+ REXML::Document.entity_expansion_limit = 4 -+ doc = REXML::Document.new(XML_WITH_4_ENTITY_EXPANSION) -+ assert_equal("\na\na a\n<\n", doc.root.children.first.value) -+ REXML::Document.entity_expansion_limit = 3 -+ doc = REXML::Document.new(XML_WITH_4_ENTITY_EXPANSION) -+ assert_raise(RuntimeError) do -+ doc.root.children.first.value -+ end -+ ensure -+ REXML::Document.entity_expansion_limit = 10000 -+ end -+end - -Property changes on: ruby_1_8/test/rexml/test_document.rb -___________________________________________________________________ -Added: svn:keywords - + Author Id Revision -Added: svn:eol-style - + LF - diff --git a/ruby-1.8.6-simplify-openssl-digest.patch b/ruby-1.8.6-simplify-openssl-digest.patch index 2636538..21d5ae1 100644 --- a/ruby-1.8.6-simplify-openssl-digest.patch +++ b/ruby-1.8.6-simplify-openssl-digest.patch @@ -1,7 +1,25 @@ -diff --git a/ext/openssl/lib/openssl/digest.rb b/ext/openssl/lib/openssl/digest.rb -index b3e4484..4810f01 100644 ---- a/ext/openssl/lib/openssl/digest.rb -+++ b/ext/openssl/lib/openssl/digest.rb +Mon Feb 25 17:30:29 2008 Technorama Ltd. + * ext/openssl/digest.c ext/openssl/lib/openssl/digest.rb: + Commit patch #9280 from Akinori MUSHA. + Simplify the OpenSSL::Digest class and make use of the + existing Digest framework. + Enhance performance. + +Thu Apr 5 14:58:49 2007 Technorama Ltd. + * ext/openssl/ossl_pkcs5.c: New module. + + * ext/openssl/ossl_{cipher,digest,pkcs7,pkcs12}.c: + Remove redundant module namespace. + + * ext/openssl/lib/openssl/{cipher,digest}.rb + Add backwards compatibile classes for rearranged classes. + + * ext/openssl/ossl_{pkcs7,pkcs12}.c: Add documentation. + +Index: ruby_1_8/ext/openssl/lib/openssl/digest.rb +=================================================================== +--- ruby_1_8/ext/openssl/lib/openssl/digest.rb (revision 11708) ++++ ruby_1_8/ext/openssl/lib/openssl/digest.rb (revision 15600) @@ -19,13 +19,17 @@ #require 'openssl' @@ -21,7 +39,7 @@ index b3e4484..4810f01 100644 alg.each{|name| klass = Class.new(Digest){ define_method(:initialize){|*data| -@@ -44,6 +48,14 @@ module OpenSSL +@@ -44,6 +48,14 @@ const_set(name, klass) } @@ -36,20 +54,46 @@ index b3e4484..4810f01 100644 end # Digest end # OpenSSL -diff --git a/ext/openssl/ossl_digest.c b/ext/openssl/ossl_digest.c -index 4096b09..b0308f0 100644 ---- a/ext/openssl/ossl_digest.c -+++ b/ext/openssl/ossl_digest.c -@@ -40,7 +40,7 @@ GetDigestPtr(VALUE obj) +Index: ruby_1_8/ext/openssl/ossl_digest.c +=================================================================== +--- ruby_1_8/ext/openssl/ossl_digest.c (revision 11708) ++++ ruby_1_8/ext/openssl/ossl_digest.c (revision 15600) +@@ -24,7 +24,6 @@ + /* + * Classes + */ +-VALUE mDigest; + VALUE cDigest; + VALUE eDigestError; - SafeGetDigest(obj, ctx); +@@ -36,11 +35,23 @@ + const EVP_MD * + GetDigestPtr(VALUE obj) + { +- EVP_MD_CTX *ctx; ++ const EVP_MD *md; + +- SafeGetDigest(obj, ctx); ++ if (TYPE(obj) == T_STRING) { ++ const char *name = STR2CSTR(obj); - return EVP_MD_CTX_md(ctx); /*== ctx->digest*/ -+ return EVP_MD_CTX_md(ctx); ++ md = EVP_get_digestbyname(name); ++ if (!md) ++ ossl_raise(rb_eRuntimeError, "Unsupported digest algorithm (%s).", name); ++ } else { ++ EVP_MD_CTX *ctx; ++ ++ SafeGetDigest(obj, ctx); ++ ++ md = EVP_MD_CTX_md(ctx); ++ } ++ ++ return md; } VALUE -@@ -51,7 +51,6 @@ ossl_digest_new(const EVP_MD *md) +@@ -51,7 +62,6 @@ ret = ossl_digest_alloc(cDigest); GetDigest(ret, ctx); @@ -57,7 +101,7 @@ index 4096b09..b0308f0 100644 EVP_DigestInit_ex(ctx, md, NULL); return ret; -@@ -69,9 +68,8 @@ ossl_digest_alloc(VALUE klass) +@@ -69,14 +79,18 @@ ctx = EVP_MD_CTX_create(); if (ctx == NULL) ossl_raise(rb_eRuntimeError, "EVP_MD_CTX_create() failed"); @@ -68,7 +112,17 @@ index 4096b09..b0308f0 100644 return obj; } -@@ -86,14 +84,9 @@ ossl_digest_initialize(int argc, VALUE *argv, VALUE self) + VALUE ossl_digest_update(VALUE, VALUE); + ++/* ++ * call-seq: ++ * Digest.new(string) -> digest ++ * ++ */ + static VALUE + ossl_digest_initialize(int argc, VALUE *argv, VALUE self) + { +@@ -86,14 +100,9 @@ VALUE type, data; rb_scan_args(argc, argv, "11", &type, &data); @@ -85,7 +139,37 @@ index 4096b09..b0308f0 100644 GetDigest(self, ctx); EVP_DigestInit_ex(ctx, md, NULL); -@@ -141,75 +134,25 @@ ossl_digest_update(VALUE self, VALUE data) +@@ -118,6 +127,11 @@ + return self; + } + ++/* ++ * call-seq: ++ * digest.reset -> self ++ * ++ */ + static VALUE + ossl_digest_reset(VALUE self) + { +@@ -129,6 +143,11 @@ + return self; + } + ++/* ++ * call-seq: ++ * digest.update(string) -> aString ++ * ++ */ + VALUE + ossl_digest_update(VALUE self, VALUE data) + { +@@ -136,126 +155,77 @@ + + StringValue(data); + GetDigest(self, ctx); +- EVP_DigestUpdate(ctx, RSTRING(data)->ptr, RSTRING(data)->len); ++ EVP_DigestUpdate(ctx, RSTRING_PTR(data), RSTRING_LEN(data)); + return self; } @@ -105,10 +189,16 @@ index 4096b09..b0308f0 100644 - EVP_MD_CTX_cleanup(&final); -} - --static VALUE ++/* ++ * call-seq: ++ * digest.finish -> aString ++ * ++ */ + static VALUE -ossl_digest_digest(VALUE self) --{ -- EVP_MD_CTX *ctx; ++ossl_digest_finish(int argc, VALUE *argv, VALUE self) + { + EVP_MD_CTX *ctx; - char *buf; - int buf_len; - VALUE digest; @@ -119,16 +209,15 @@ index 4096b09..b0308f0 100644 - - return digest; -} -- - static VALUE ++ VALUE str; + +-static VALUE -ossl_digest_hexdigest(VALUE self) -+ossl_digest_finish(int argc, VALUE *argv, VALUE self) - { - EVP_MD_CTX *ctx; +-{ +- EVP_MD_CTX *ctx; - char *buf, *hexbuf; - int buf_len; - VALUE hexdigest; -+ VALUE str; + rb_scan_args(argc, argv, "01", &str); GetDigest(self, ctx); @@ -136,6 +225,7 @@ index 4096b09..b0308f0 100644 - if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) { - OPENSSL_free(buf); - ossl_raise(eDigestError, "Memory alloc error"); ++ + if (NIL_P(str)) { + str = rb_str_new(NULL, EVP_MD_CTX_size(ctx)); + } else { @@ -147,67 +237,112 @@ index 4096b09..b0308f0 100644 - return hexdigest; -} -- ++ EVP_DigestFinal_ex(ctx, RSTRING_PTR(str), NULL); + -static VALUE -ossl_digest_s_digest(VALUE klass, VALUE str, VALUE data) -{ - VALUE obj = rb_class_new_instance(1, &str, klass); -+ EVP_DigestFinal_ex(ctx, RSTRING_PTR(str), NULL); - -- ossl_digest_update(obj, data); -+ return str; - -- return ossl_digest_digest(obj); --} - --static VALUE +- ossl_digest_update(obj, data); +- +- return ossl_digest_digest(obj); ++ return str; + } + ++/* ++ * call-seq: ++ * digest.name -> string ++ * ++ */ + static VALUE -ossl_digest_s_hexdigest(VALUE klass, VALUE str, VALUE data) --{ ++ossl_digest_name(VALUE self) + { - VALUE obj = rb_class_new_instance(1, &str, klass); - - ossl_digest_update(obj, data); - - return ossl_digest_hexdigest(obj); +-} +- +-static VALUE +-ossl_digest_equal(VALUE self, VALUE other) +-{ + EVP_MD_CTX *ctx; +- VALUE str1, str2; + +- if (rb_obj_is_kind_of(other, cDigest) == Qtrue) { +- str2 = ossl_digest_digest(other); +- } else { +- StringValue(other); +- str2 = other; +- } + GetDigest(self, ctx); +- if (RSTRING(str2)->len == EVP_MD_CTX_size(ctx)) { +- str1 = ossl_digest_digest(self); +- } else { +- str1 = ossl_digest_hexdigest(self); +- } +- if (RSTRING(str1)->len == RSTRING(str2)->len +- && rb_str_cmp(str1, str2) == 0) { +- return Qtrue; +- } + +- return Qfalse; ++ return rb_str_new2(EVP_MD_name(EVP_MD_CTX_md(ctx))); + } + ++/* ++ * call-seq: ++ * digest.digest_size -> integer ++ * ++ * Returns the output size of the digest. ++ */ + static VALUE +-ossl_digest_name(VALUE self) ++ossl_digest_size(VALUE self) + { + EVP_MD_CTX *ctx; + + GetDigest(self, ctx); + +- return rb_str_new2(EVP_MD_name(EVP_MD_CTX_md(ctx))); ++ return INT2NUM(EVP_MD_CTX_size(ctx)); } static VALUE -@@ -258,41 +201,44 @@ ossl_digest_size(VALUE self) - return INT2NUM(EVP_MD_CTX_size(ctx)); +-ossl_digest_size(VALUE self) ++ossl_digest_block_length(VALUE self) + { + EVP_MD_CTX *ctx; + + GetDigest(self, ctx); + +- return INT2NUM(EVP_MD_CTX_size(ctx)); ++ return INT2NUM(EVP_MD_CTX_block_size(ctx)); } -+static VALUE -+ossl_digest_block_length(VALUE self) -+{ -+ EVP_MD_CTX *ctx; -+ -+ GetDigest(self, ctx); -+ -+ return INT2NUM(EVP_MD_CTX_block_size(ctx)); -+} -+ -+ /* - * INIT - */ +@@ -264,31 +234,26 @@ void Init_ossl_digest() { +- mDigest = rb_define_module_under(mOSSL, "Digest"); + rb_require("openssl"); + rb_require("digest"); + - #if 0 /* let rdoc know about mOSSL */ - mOSSL = rb_define_module("OpenSSL"); - #endif - -- mDigest = rb_define_module_under(mOSSL, "Digest"); -- ++#if 0 /* let rdoc know about mOSSL */ ++ mOSSL = rb_define_module("OpenSSL"); ++#endif ++ ++ cDigest = rb_define_class_under(mOSSL, "Digest", rb_path2class("Digest::Class")); ++ eDigestError = rb_define_class_under(cDigest, "DigestError", eOSSLError); + - eDigestError = rb_define_class_under(mDigest, "DigestError", eOSSLError); - - cDigest = rb_define_class_under(mDigest, "Digest", rb_cObject); - -+ cDigest = rb_define_class_under(mOSSL, "Digest", rb_path2class("Digest::Class")); -+ eDigestError = rb_define_class_under(cDigest, "DigestError", eOSSLError); -+ rb_define_alloc_func(cDigest, ossl_digest_alloc); - rb_define_singleton_method(cDigest, "digest", ossl_digest_s_digest, 2); - rb_define_singleton_method(cDigest, "hexdigest", ossl_digest_s_hexdigest, 2); @@ -236,4 +371,3 @@ index 4096b09..b0308f0 100644 rb_define_method(cDigest, "name", ossl_digest_name, 0); - rb_define_method(cDigest, "size", ossl_digest_size, 0); } -+ diff --git a/ruby.spec b/ruby.spec index d374e40..38e16cd 100644 --- a/ruby.spec +++ b/ruby.spec @@ -18,7 +18,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 4%{?dist} +Release: 5%{?dist} License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -57,7 +57,8 @@ Patch23: ruby-multilib.patch # Needed in 1.8.6-p287, no longer needed in 1.8.6-p368? #Patch25: ruby-1.8.6.111-gcc43.patch # ruby_1_8 branch rev 19320, 20121, bug 460134 -Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch +# Included in 1.8.6 p368 +#Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch # Patch27, 28 could not be found in the upstream VCS # Need checking?? Patch27: ruby-1.8.6-p287-CVE-2008-5189.patch @@ -75,9 +76,8 @@ Patch32: ruby-1.8head-irb-save-history.patch # bug 428384, Fedora specific, however needed for Fedora's static # archive policy Patch33: ruby-1.8.6-p383-mkmf-use-shared.patch -# Testing (bug 559158) -# Patch34 disabled for now as this breaks rubygem-actionpack rake test, -# need investigating +# bug 559158, Simplify the OpenSSL::Digest class +# Applying Patch34 needs reversing Patch39 part Patch34: ruby-1.8.6-simplify-openssl-digest.patch # bug 580993, patch from ruby_1_8_7 branch Patch35: ruby_1_8_7-gc-open4_096segv.patch @@ -93,6 +93,8 @@ Patch37: ruby-1.8.x-ext_tk-flatten-level-revert.patch # From ruby_1_8 branch: bz 530407 # bz 530407 reproducible with 1.8.7p174, not with 1.8.7p249 Patch38: ruby-1.8.x-null-class-must-be-Qnil.patch +# Once revert this patch to apply Patch34 cleanly +Patch39: ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages @@ -232,8 +234,8 @@ pushd %{name}-%{arcver} %patch22 -p1 %patch23 -p1 %endif -#%patch25 -p1 -#%patch26 -p1 +#%%patch25 -p1 +#%%patch26 -p1 %patch27 -p0 %patch28 -p1 %patch29 -p1 @@ -241,8 +243,9 @@ pushd %{name}-%{arcver} %patch31 -p1 %patch32 -p0 %patch33 -p1 -# Once kill patch34 due to build failure on actionpack -#%%patch34 -p1 +# To apply patch34, patch39 part must once be reverted +%patch39 -p1 -R +%patch34 -p1 %patch35 -p1 %patch36 -p1 %patch37 -p1 @@ -637,6 +640,10 @@ rm -rf $RPM_BUILD_ROOT %{_emacs_sitestartdir}/ruby-mode-init.el %changelog +* Wed May 19 2010 Mamoru Tasaka - 1.8.6.399-5 +- Retry for bug 559158, Simplify the OpenSSL::Digest class + pull more change commits from ruby_1_8 branch + * Mon May 17 2010 Mamoru Tasaka - 1.8.6.399-4 - Patch36 (ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch) also backport rb_hash_lookup definition (bug 592936) From 84e77dfb4d03c2ab81a1a265845c895f8ed738b1 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Mon, 26 Jul 2010 19:14:51 +0000 Subject: [PATCH 166/529] Update to ruby 1.8.7 patchlevel 299 --- .cvsignore | 8 +- irb.1 | 488 ----------- ...igest-once-revert-for-simplify-patch.patch | 15 - ruby-1.8.6-p287-CVE-2008-5189.patch | 14 - ruby-1.8.6-p287-remove-ssl-rand-range.patch | 100 --- ruby-1.8.6-p369-ri-gem_multipath.patch | 130 --- ruby-1.8.6-p383-rubyprefix.patch | 97 --- ruby-1.8.6-simplify-openssl-digest.patch | 373 --------- ruby-1.8.7-always-use-i386.patch | 11 + ruby-1.8.7-lib-paths.patch | 228 +++++ ruby-1.8.7-multilib.patch | 34 + ...h => ruby-1.8.7-p249-mkmf-use-shared.patch | 6 +- ...-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch | 65 -- ruby-1.8.x-ext_tk-flatten-level-revert.patch | 58 -- ruby-1.8.x-null-class-must-be-Qnil.patch | 21 - ruby-1.8head-irb-save-history.patch | 111 --- ruby-always-use-i386.patch | 11 - ruby-deadcode.patch | 72 -- ruby-deprecated-search-path.patch | 51 -- ruby-deprecated-sitelib-search-path.patch | 39 - ruby-mode-init.el | 20 - ruby-multilib.patch | 12 - ruby-openssl-1.0.patch | 176 ---- ruby.spec | 786 ++++++++---------- ruby_1_8_7-gc-open4_096segv.patch | 351 -------- sources | 8 +- 26 files changed, 625 insertions(+), 2660 deletions(-) delete mode 100644 irb.1 delete mode 100644 ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch delete mode 100644 ruby-1.8.6-p287-CVE-2008-5189.patch delete mode 100644 ruby-1.8.6-p287-remove-ssl-rand-range.patch delete mode 100644 ruby-1.8.6-p369-ri-gem_multipath.patch delete mode 100644 ruby-1.8.6-p383-rubyprefix.patch delete mode 100644 ruby-1.8.6-simplify-openssl-digest.patch create mode 100644 ruby-1.8.7-always-use-i386.patch create mode 100644 ruby-1.8.7-lib-paths.patch create mode 100644 ruby-1.8.7-multilib.patch rename ruby-1.8.6-p383-mkmf-use-shared.patch => ruby-1.8.7-p249-mkmf-use-shared.patch (66%) delete mode 100644 ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch delete mode 100644 ruby-1.8.x-ext_tk-flatten-level-revert.patch delete mode 100644 ruby-1.8.x-null-class-must-be-Qnil.patch delete mode 100644 ruby-1.8head-irb-save-history.patch delete mode 100644 ruby-always-use-i386.patch delete mode 100644 ruby-deadcode.patch delete mode 100644 ruby-deprecated-search-path.patch delete mode 100644 ruby-deprecated-sitelib-search-path.patch delete mode 100644 ruby-mode-init.el delete mode 100644 ruby-multilib.patch delete mode 100644 ruby-openssl-1.0.patch delete mode 100644 ruby_1_8_7-gc-open4_096segv.patch diff --git a/.cvsignore b/.cvsignore index e4e63dc..89ca5b2 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,6 +1,2 @@ -ruby-1.8.6-p388.tar.bz2 -ruby-refm-rdp-1.8.2-ja-html.tar.gz -rubyfaq-990927.tar.gz -rubyfaq-jp-990927.tar.gz -ruby-1.8.6-p399.tar.bz2 -ruby-1.8-rev27738_trunk-ext_tk.tar.gz +ruby-1.8.7-p299.tar.bz2 +ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz diff --git a/irb.1 b/irb.1 deleted file mode 100644 index 7fc9828..0000000 --- a/irb.1 +++ /dev/null @@ -1,488 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! it was generated by rd2 -.TH irb-beta 1 "May 2001" -.SH What is irb? -.PP -irb stands for `interactive ruby'. irb is a tool to execute interactively -ruby expressions read from stdin. -.SH Invoking -.PP -.nf -\& % ruby \-r irb \-e0 -\& % irb -.fi -Either of the aboves. In the former style, options can be specified -as follows: -.nf -\& % ruby \-r irb \-e0 \-\- \-v -.fi -.SH Usage -.PP -Use of irb is easy if you know ruby. Executing irb, prompts are -displayed as follows. Then, enter expression of ruby. A input is -executed when it is syntacticaly completed. -.nf -\& dim% irb -\& irb(main):001:0> 1+2 -\& 3 -\& irb(main):002:0> class Foo -\& irb(main):003:1> def foo -\& irb(main):004:2> print 1 -\& irb(main):005:2> end -\& irb(main):006:1> end -\& nil -\& irb(main):007:0> -.fi -And, Readline extesion module can be used with irb. Using Readline -is the standard default action if Readline is installed. -.SH Command line option -.PP -.nf -\& irb.rb [options] file_name opts -\& options: -\& \-f suppress read ~/.irbrc -\& \-m bc mode (fraction or matrix are available) -\& \-d set $DEBUG to true (same as `ruby \-d') -\& \-r load\-module same as `ruby \-r' -\& \-\-inspect uses `inspect' for output (the default except bc mode) -\& \-\-noinspect doesn't uses inspect for output -\& \-\-readline uses Readline extension module -\& \-\-noreadline doesn't use Readline extension module -\& \-\-prompt prompt\-mode -\& \-\-prompt\-mode prompt\-mode -.fi -.nf -\& switches prompt mode. Pre\-defined prompt modes are -\& `defalut', `simple', `xmp' and `inf\-ruby' -.fi -.nf -\& \-\-inf\-ruby\-mode uses prompt appreciate for inf\-ruby\-mode on emacs. -.fi -.nf -\& Suppresses \-\-readline. -.fi -.nf -\& \-\-simple\-prompt simple prompt mode -\& \-\-noprompt no prompt -\& \-\-tracer display trace for each execution of commands. -\& \-\-back\-trace\-limit n -.fi -.nf -\& displayes backtrace top n and tail n. The default -\& value is 16. -.fi -.nf -\& \-\-irb_debug n sets internal debug level to n (It shouldn't be used) -\& \-v, \-\-version prints the version of irb -.fi -.SH Configurations -.PP -irb reads `~/.irbrc' when it is invoked. If `~/.irbrb' doesn't exist -irb try to read in the order `.irbrc', `irb.rc', `_irbrc' then `$irbrc'. -The following is altanative to the command line option. To use them -type as follows in an irb session. -.nf -\& IRB.conf[:IRB_NAME]="irb" -\& IRB.conf[:MATH_MODE]=false -\& IRB.conf[:USE_TRACER]=false -\& IRB.conf[:USE_LOADER]=false -\& IRB.conf[:IGNORE_SIGINT]=true -\& IRB.conf[:IGNORE_EOF]=false -\& IRB.conf[:INSPECT_MODE]=nil -\& IRB.conf[:IRB_RC] = nil -\& IRB.conf[:BACK_TRACE_LIMIT]=16 -\& IRB.conf[:USE_LOADER] = false -\& IRB.conf[:USE_READLINE] = nil -\& IRB.conf[:USE_TRACER] = false -\& IRB.conf[:IGNORE_SIGINT] = true -\& IRB.conf[:IGNORE_EOF] = false -\& IRB.conf[:PROMPT_MODE] = :DEFALUT -\& IRB.conf[:PROMPT] = {...} -\& IRB.conf[:DEBUG_LEVEL]=0 -\& IRB.conf[:VERBOSE]=true -.fi -.SH Customizing prompt -.PP -To costomize the prompt you set a variable -.nf -\& IRB.conf[:PROMPT] -.fi -For example, describe as follows in `.irbrc'. -.nf -\& IRB.conf[:PROMPT][:MY_PROMPT] = { # name of prompt mode -\& :PROMPT_I => nil, # normal prompt -\& :PROMPT_S => nil, # prompt for continuated strings -\& :PROMPT_C => nil, # prompt for continuated statement -\& :RETURN => " ==>%s\\n" # format to return value -\& } -.fi -Then, invoke irb with the above prompt mode by -.nf -\& % irb \-\-prompt my\-prompt -.fi -Or add the following in `.irbrc'. -.nf -\& IRB.conf[:PROMPT_MODE] = :MY_PROMPT -.fi -Constants PROMPT_I, PROMPT_S and PROMPT_C specifies the format. -In the prompt specification, some special strings are available. -.nf -\& %N command name which is running -\& %m to_s of main object (self) -\& %M inspect of main object (self) -\& %l type of string(", ', /, ]), `]' is inner %w[...] -\& %NNi indent level. NN is degits and means as same as printf("%NNd"). -\& It can be ommited -\& %NNn line number. -\& %% % -.fi -For instance, the default prompt mode is defined as follows: -IRB.conf[:PROMPT_MODE][:DEFAULT] = { - -.TP -.fi -.B -PROMPT_I => "%N(%m):%03n:%i> ", - - -.TP -.fi -.B -PROMPT_S => "%N(%m):%03n:%i%l ", - - -.TP -.fi -.B -PROMPT_C => "%N(%m):%03n:%i* ", - - -.TP -.fi -.B -RETURN => "%s\\n" -} -RETURN is used to printf. -.SH Configurating subirb -.PP -The command line option or IRB.conf specify the default behavior of -(sub)irb. On the other hand, each conf of in the next sction `6. Command' -is used to individually configurate (sub)irb. -If proc is set to IRB.conf[:IRB_RC], its subirb will be invoked after -execution of that proc under giving the context of irb as its -aregument. By this mechanism each subirb can be configurated. -.SH Command -.PP -For irb commands, both simple name and `irb_'\-prefixed name are prepared. - -.TP -.fi -.B -exit, quit, irb_exit -Quits (sub)irb. -if you've done cb (see below), exit from the binding mode. - - -.TP -.fi -.B -conf, irb_context -Displays current configuration. Modifing the configuration is -achieved by sending message to `conf'. - - -.TP -.fi -.B -conf.back_trace_limit -Sets display lines of backtrace as top n and tail n. -The default value is 16. - - -.TP -.fi -.B -conf.debug_level = N -Sets debug level of irb. - - -.TP -.fi -.B -conf.ignore_eof = true/false -Whether ^D (control\-d) will be ignored or not. -If false is set, ^D means quit. - - -.TP -.fi -.B -conf.ignore_sigint= true/false -Whether ^C (control\-c) will be ignored or not. -If false is set, ^D means quit. If true, - -.nf -\& during input: cancel inputing then return to top level. -\& during execute: abondon current execution. -.fi - - -.TP -.fi -.B -conf.inf_ruby_mode = true/false -Whether inf\-ruby\-mode or not. The default value is false. - - -.TP -.fi -.B -conf.inspect_mode = true/false/nil -Specifies inspect mode. -true: display inspect -false: display to_s -nil: inspect mode in non math mode, - -.nf -\& non inspect mode in math mode. -.fi - - -.TP -.fi -.B -conf.irb_level -The level of cb. - - -.TP -.fi -.B -conf.math_mode -Whether bc mode or not. - - -.TP -.fi -.B -conf.use_loader = true/false -Whether irb's own file reader method is used when load/require or not. -This mode is globaly affected (irb wide). - - -.TP -.fi -.B -conf.prompt_c -prompt for a continuating statement (e.g, immediately after of `if') - - -.TP -.fi -.B -conf.prompt_i -standard prompt - - -.TP -.fi -.B -conf.prompt_s -prompt for a continuating string - - -.TP -.fi -.B -conf.rc -Whether ~/.irbrc is read or not. - - -.TP -.fi -.B -conf.use_prompt = true/false -Prompting or not. - - -.TP -.fi -.B -conf.use_readline = true/false/nil -Whether readline is used or not. -true: uses -false: doen't use -nil: intends to use readline except for inf\-reuby\-mode (default) - - -.TP -.fi -.B -conf.verbose=T/F -Whether verbose messages are display or not. - - -.TP -.fi -.B -cb, irb_change_binding [obj] -Enter new binding which has a distinct scope of local variables. -If obj is given, obj will be self. - - -.TP -.fi -.B -irb [obj] -Invoke subirb. If obj is given, obj will be self. - - -.TP -.fi -.B -jobs, irb_jobs -List of subirb - - -.TP -.fi -.B -fg n, irb_fg n -Switch into specified subirb. The following is candidates of n: - -.nf -\& irb number -\& thhread -\& irb object -\& self(obj which is specified of irb obj) -.fi - - -.TP -.fi -.B -kill n, irb_kill n -Kill subirb. The means of n is as same as the case of irb_fg. -.SH System variable -.PP -.nf -\& _ The latest value of evaluation (it is local) -.fi -.SH Session Example -.PP -.nf -\& dim% ruby irb.rb -\& irb(main):001:0> irb # invoke subirb -\& irb#1(main):001:0> jobs # list of subirbs -\& #0\->irb on main (# : stop) -\& #1\->irb#1 on main (# : running) -\& nil -\& irb#1(main):002:0> fg 0 # switch job -\& nil -\& irb(main):002:0> class Foo;end -\& nil -\& irb(main):003:0> irb Foo # invoke subirb which has the -.fi -.nf -\& # context of Foo -.fi -.nf -\& irb#2(Foo):001:0> def foo # define Foo#foo -\& irb#2(Foo):002:1> print 1 -\& irb#2(Foo):003:1> end -\& nil -\& irb#2(Foo):004:0> fg 0 # switch job -\& nil -\& irb(main):004:0> jobs # list of job -\& #0\->irb on main (# : running) -\& #1\->irb#1 on main (# : stop) -\& #2\->irb#2 on Foo (# : stop) -\& nil -\& irb(main):005:0> Foo.instance_methods # Foo#foo is defined asurely -\& ["foo"] -\& irb(main):006:0> fg 2 # switch job -\& nil -\& irb#2(Foo):005:0> def bar # define Foo#bar -\& irb#2(Foo):006:1> print "bar" -\& irb#2(Foo):007:1> end -\& nil -\& irb#2(Foo):010:0> Foo.instance_methods -\& ["bar", "foo"] -\& irb#2(Foo):011:0> fg 0 -\& nil -\& irb(main):007:0> f = Foo.new -\& # -\& irb(main):008:0> irb f # invoke subirb which has the -.fi -.nf -\& # context of f (instance of Foo) -.fi -.nf -\& irb#3(#):001:0> jobs -\& #0\->irb on main (# : stop) -\& #1\->irb#1 on main (# : stop) -\& #2\->irb#2 on Foo (# : stop) -\& #3\->irb#3 on # (# : running) -\& nil -\& irb#3(#):002:0> foo # evaluate f.foo -\& 1nil -\& irb#3(#):003:0> bar # evaluate f.bar -\& barnil -\& irb#3(#):004:0> kill 1, 2, 3# kill job -\& nil -\& irb(main):009:0> jobs -\& #0\->irb on main (# : running) -\& nil -\& irb(main):010:0> exit # exit -\& dim% -.fi -.SH Restrictions -.PP -Because irb evaluates the inputs immediately after the imput is -syntactically completed, irb gives slight different result than -directly use ruby. Known difference is pointed out here. -.SH Declaration of the local variable -.PP -The following causes an error in ruby: -.nf -\& eval "foo = 0" -\& foo -\& \-\- -\& \-:2: undefined local variable or method `foo' for # (NameError) -\& \-\-\- -\& NameError -.fi -Though, the above will successfully done by irb. -.nf -\& >> eval "foo = 0" -.fi -.nf -\& => 0 -\& >> foo -\& => 0 -.fi -Ruby evaluates a code after reading entire of code and determination -of the scope of local variables. On the other hand, irb do -immediately. More precisely, irb evaluate at first -.nf -\& evel "foo = 0" -.fi -then foo is defined on this timing. It is because of this -incompatibility. -If you'd like to detect those differences, begin...end can be used: -.nf -\& >> begin -\& ?> eval "foo = 0" -\& >> foo -\& >> end -\& NameError: undefined local variable or method `foo' for # -\& (irb):3 -\& (irb_local_binding):1:in `eval' -.fi -.SH Here\-document -.PP -Implementation of Here\-document is incomplete. -.SH Symbol -.PP -Irb can not always recognize a symbol as to be Symbol. Concretely, an -expression have completed, however Irb regard it as continuation line. - diff --git a/ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch b/ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch deleted file mode 100644 index 336254a..0000000 --- a/ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: ruby_1_8_6/ext/openssl/ossl_digest.c -=================================================================== ---- ruby_1_8_6/ext/openssl/ossl_digest.c (revision 12042) -+++ ruby_1_8_6/ext/openssl/ossl_digest.c (revision 12043) -@@ -264,6 +264,10 @@ - void - Init_ossl_digest() - { -+#if 0 /* let rdoc know about mOSSL */ -+ mOSSL = rb_define_module("OpenSSL"); -+#endif -+ - mDigest = rb_define_module_under(mOSSL, "Digest"); - - eDigestError = rb_define_class_under(mDigest, "DigestError", eOSSLError); diff --git a/ruby-1.8.6-p287-CVE-2008-5189.patch b/ruby-1.8.6-p287-CVE-2008-5189.patch deleted file mode 100644 index 2854826..0000000 --- a/ruby-1.8.6-p287-CVE-2008-5189.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- lib/cgi.rb (revision 19665) -+++ lib/cgi.rb (working copy) -@@ -546,6 +546,11 @@ - when Hash - options = options.dup - end -+ options.each_value do |value| -+ if /\n(?![ \t])/ === value -+ raise ArgumentError, "potential HTTP header injection detected" -+ end -+ end - - unless options.has_key?("type") - options["type"] = "text/html" diff --git a/ruby-1.8.6-p287-remove-ssl-rand-range.patch b/ruby-1.8.6-p287-remove-ssl-rand-range.patch deleted file mode 100644 index 705f3d3..0000000 --- a/ruby-1.8.6-p287-remove-ssl-rand-range.patch +++ /dev/null @@ -1,100 +0,0 @@ -diff -ur ruby-1.8.6-p287.orig/ext/openssl/openssl_missing.c ruby-1.8.6-p287/ext/openssl/openssl_missing.c ---- ruby-1.8.6-p287.orig/ext/openssl/openssl_missing.c 2007-02-13 00:01:19.000000000 +0100 -+++ ruby-1.8.6-p287/ext/openssl/openssl_missing.c 2009-03-15 05:32:31.000000000 +0100 -@@ -43,7 +43,7 @@ - { - return CRYPTO_set_ex_data(&str->ex_data, idx, data); - } -- -+ - void *X509_STORE_get_ex_data(X509_STORE *str, int idx) - { - return CRYPTO_get_ex_data(&str->ex_data, idx); -@@ -113,7 +113,7 @@ - #endif - - #if !defined(HAVE_EVP_CIPHER_CTX_COPY) --/* -+/* - * this function does not exist in OpenSSL yet... or ever?. - * a future version may break this function. - * tested on 0.9.7d. -@@ -182,12 +182,12 @@ - (ASN1_STRING *)(*a)->serialNumber, - (ASN1_STRING *)(*b)->serialNumber)); - } -- -+ - int - X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) - { - X509_CRL_INFO *inf; -- -+ - inf = crl->crl; - if (!inf->revoked) - inf->revoked = sk_X509_REVOKED_new(OSSL_X509_REVOKED_cmp); -@@ -233,54 +233,6 @@ - } - #endif - --#if !defined(HAVE_BN_RAND_RANGE) || !defined(HAVE_BN_PSEUDO_RAND_RANGE) --static int --bn_rand_range(int pseudo, BIGNUM *r, BIGNUM *range) --{ -- int (*bn_rand)(BIGNUM *, int, int, int) = pseudo ? BN_pseudo_rand : BN_rand; -- int n; -- -- if (range->neg || BN_is_zero(range)) return 0; -- -- n = BN_num_bits(range); -- -- if (n == 1) { -- if (!BN_zero(r)) return 0; -- } else if (!BN_is_bit_set(range, n - 2) && !BN_is_bit_set(range, n - 3)) { -- do { -- if (!bn_rand(r, n + 1, -1, 0)) return 0; -- if (BN_cmp(r ,range) >= 0) { -- if (!BN_sub(r, r, range)) return 0; -- if (BN_cmp(r, range) >= 0) -- if (!BN_sub(r, r, range)) return 0; -- } -- } while (BN_cmp(r, range) >= 0); -- } else { -- do { -- if (!bn_rand(r, n, -1, 0)) return 0; -- } while (BN_cmp(r, range) >= 0); -- } -- -- return 1; --} --#endif -- --#if !defined(HAVE_BN_RAND_RANGE) --int --BN_rand_range(BIGNUM *r, BIGNUM *range) --{ -- return bn_rand_range(0, r, range); --} --#endif -- --#if !defined(HAVE_BN_PSEUDO_RAND_RANGE) --int --BN_pseudo_rand_range(BIGNUM *r, BIGNUM *range) --{ -- return bn_rand_range(1, r, range); --} --#endif -- - #if !defined(HAVE_CONF_GET1_DEFAULT_CONFIG_FILE) - #define OPENSSL_CONF "openssl.cnf" - char * -@@ -315,7 +267,7 @@ - { - int i,j; - const char *prompt; -- -+ - if (key) { - i = strlen(key); - i = (i > num) ? num : i; diff --git a/ruby-1.8.6-p369-ri-gem_multipath.patch b/ruby-1.8.6-p369-ri-gem_multipath.patch deleted file mode 100644 index 2c069d8..0000000 --- a/ruby-1.8.6-p369-ri-gem_multipath.patch +++ /dev/null @@ -1,130 +0,0 @@ -Mon Dec 24 16:18:57 2007 Eric Hodel - - * lib/rdoc/ri/ri_options.rb: Fix ri --help listing of gem ri paths. - Merge of r14567 and r14569 from trunk. - - * lib/rdoc/ri/ri_paths.rb: Fix duplication of ri data for multiple - gems. Merge of r14567 from trunk - -Index: ruby_1_8/lib/rdoc/ri/ri_options.rb -=================================================================== ---- ruby_1_8/lib/rdoc/ri/ri_options.rb (revision 14581) -+++ ruby_1_8/lib/rdoc/ri/ri_options.rb (revision 14582) -@@ -62,10 +62,11 @@ - (RI::Paths::HOMEDIR || "No ~/.rdoc found") ], - - [ "--gems", nil, nil, -- "Include documentation from Rubygems:\n " + -- (RI::Paths::GEMDIRS ? "#{Gem.path}/doc/*/ri" : -- "No Rubygems ri found.") ], -- -+ "Include documentation from RubyGems:\n" + -+ (RI::Paths::GEMDIRS ? -+ Gem.path.map { |dir| " #{dir}/doc/*/ri" }.join("\n") : -+ "No Rubygems ri found.") ], -+ - [ "--format", "-f", "", - "Format to use when displaying output:\n" + - " " + RI::TextFormatter.list + "\n" + -@@ -116,7 +117,8 @@ - def OptionList.error(msg) - $stderr.puts - $stderr.puts msg -- $stderr.puts "\nFor help on options, try 'ri --help'\n\n" -+ name = File.basename $PROGRAM_NAME -+ $stderr.puts "\nFor help on options, try '#{name} --help'\n\n" - exit 1 - end - -@@ -136,7 +138,11 @@ - RI::Paths::HOMEDIR - ] - -- directories << "#{Gem.path}/doc/*/ri" if RI::Paths::GEMDIRS -+ if RI::Paths::GEMDIRS then -+ Gem.path.each do |dir| -+ directories << "#{dir}/doc/*/ri" -+ end -+ end - - directories = directories.join("\n ") - -@@ -157,16 +163,16 @@ - - For example: - -- ri File -- ri File.new -- ri F.n -- ri zip -+ #{name} File -+ #{name} File.new -+ #{name} F.n -+ #{name} zip - - Note that shell quoting may be required for method names - containing punctuation: - -- ri 'Array.[]' -- ri compact\\! -+ #{name} 'Array.[]' -+ #{name} compact\\! - - By default ri searches for documentation in the following - directories: -@@ -180,8 +186,8 @@ - EOT - - if short_form -- puts "For help on options, type 'ri -h'" -- puts "For a list of classes I know about, type 'ri -c'" -+ puts "For help on options, type '#{name} -h'" -+ puts "For a list of classes I know about, type '#{name} -c'" - else - puts "Options:\n\n" - OPTION_LIST.each do|long, short, arg, desc| -Index: ruby_1_8/lib/rdoc/ri/ri_paths.rb -=================================================================== ---- ruby_1_8/lib/rdoc/ri/ri_paths.rb (revision 14581) -+++ ruby_1_8/lib/rdoc/ri/ri_paths.rb (revision 14582) -@@ -44,8 +44,29 @@ - - begin - require 'rubygems' -- GEMDIRS = Dir["#{Gem.path}/doc/*/ri"] -- GEMDIRS.each { |path| RI::Paths::PATH << path } -+ -+ # HACK dup'd from Gem.latest_partials and friends -+ all_paths = [] -+ -+ all_paths = Gem.path.map do |dir| -+ Dir[File.join(dir, 'doc', '*', 'ri')] -+ end.flatten -+ -+ ri_paths = {} -+ -+ all_paths.each do |dir| -+ base = File.basename File.dirname(dir) -+ if base =~ /(.*)-((\d+\.)*\d+)/ then -+ name, version = $1, $2 -+ ver = Gem::Version.new version -+ if ri_paths[name].nil? or ver > ri_paths[name][0] then -+ ri_paths[name] = [ver, dir] -+ end -+ end -+ end -+ -+ GEMDIRS = ri_paths.map { |k,v| v.last }.sort -+ GEMDIRS.each { |dir| RI::Paths::PATH << dir } - rescue LoadError - GEMDIRS = nil - end -@@ -55,7 +76,7 @@ - - def self.path(use_system, use_site, use_home, use_gems, *extra_dirs) - path = raw_path(use_system, use_site, use_home, use_gems, *extra_dirs) -- return path.select { |path| File.directory? path } -+ return path.select { |directory| File.directory? directory } - end - - # Returns the selected documentation directories including nonexistent diff --git a/ruby-1.8.6-p383-rubyprefix.patch b/ruby-1.8.6-p383-rubyprefix.patch deleted file mode 100644 index 1f0fa43..0000000 --- a/ruby-1.8.6-p383-rubyprefix.patch +++ /dev/null @@ -1,97 +0,0 @@ -diff -ur ruby-1.8.6-p383.0-deadcode/configure.in ruby-1.8.6-p383/configure.in ---- ruby-1.8.6-p383.0-deadcode/configure.in 2009-07-20 15:24:22.000000000 +0200 -+++ ruby-1.8.6-p383/configure.in 2009-10-22 16:37:13.729623476 +0200 -@@ -1613,6 +1613,13 @@ - rubyw_install_name="$RUBYW_INSTALL_NAME" - ;; - esac -+ -+AC_ARG_WITH(ruby-prefix, -+ AC_HELP_STRING([--with-ruby-prefix], [build ruby with the special library prefix.]) -+ ,, -+ with_ruby_prefix=no) -+ -+if test "x$with_ruby_prefix" = "x"; then - case "$target_os" in - cygwin*|mingw*|*djgpp*|os2-emx*) - RUBY_LIB_PREFIX="/lib/ruby" -@@ -1621,20 +1628,30 @@ - RUBY_LIB_PREFIX="`eval "echo ${libdir}"`/ruby" - ;; - esac -+else -+ RUBY_LIB_PREFIX="${with_ruby_prefix}/ruby" -+fi - RUBY_LIB_PATH="${RUBY_LIB_PREFIX}/${MAJOR}.${MINOR}" -+RUBY_LIB_PATH2="${libdir}/ruby/${MAJOR}.${MINOR}" - - AC_ARG_WITH(sitedir, - [ --with-sitedir=DIR site libraries in DIR [PREFIX/lib/ruby/site_ruby]], - [sitedir=$withval], - [sitedir="`eval "echo ${libdir}"`/ruby/site_ruby"]) --SITE_DIR=`eval echo \\"${sitedir}\\"` -+SITE_DIR=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` -+_fc_sitedir="\$(DESTDIR)${sitedir}" -+SITE_DIR2=`eval echo \\"${_fc_sitedir}\\"` -+sitedir=`eval echo \\"${sitedir}\\" | sed -e "s/lib64/lib/"` -+ - case "$target_os" in - cygwin*|mingw*|*djgpp*|os2-emx*) - RUBY_SITE_LIB_PATH="`expr "$SITE_DIR" : "$prefix\(/.*\)"`" || - RUBY_SITE_LIB_PATH="$SITE_DIR";; - *) -- RUBY_SITE_LIB_PATH="$SITE_DIR";; -+ RUBY_SITE_LIB_PATH="$SITE_DIR"; -+ RUBY_SITE_LIB_PATH2="$SITE_DIR2";; - esac -+RUBY_SITE_LIB_PATH3="${RUBY_SITE_LIB_PATH2}/${MAJOR}.${MINOR}" - RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}" - - AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") -@@ -1644,6 +1661,7 @@ - AC_SUBST(arch)dnl - AC_SUBST(sitearch)dnl - AC_SUBST(sitedir)dnl -+AC_SUBST(_fc_sitedir)dnl - - configure_args=$ac_configure_args - AC_SUBST(configure_args)dnl -@@ -1652,7 +1670,7 @@ - arch="fat-${target_os}" - - AC_DEFINE_UNQUOTED(RUBY_THIN_ARCHLIB, -- "${RUBY_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") -+ "${RUBY_LIB_PATH2}/" __ARCHITECTURE__ "-${target_os}") - - AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB, - "${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}") -@@ -1667,8 +1685,8 @@ - *) sitearch="${arch}" ;; - esac - --AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}") --AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${sitearch}") -+AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH2}/${arch}") -+AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH3}/${sitearch}") - - AC_ARG_WITH(search-path, - [ --with-search-path=DIR specify the additional search path], -Only in ruby-1.8.6-p383/: configure.in.orig -Only in ruby-1.8.6-p383/: configure.in.rej -diff -ur ruby-1.8.6-p383.0-deadcode/mkconfig.rb ruby-1.8.6-p383/mkconfig.rb ---- ruby-1.8.6-p383.0-deadcode/mkconfig.rb 2008-06-07 18:37:10.000000000 +0200 -+++ ruby-1.8.6-p383/mkconfig.rb 2009-10-22 16:30:55.776872493 +0200 -@@ -139,10 +139,10 @@ - print(*v_others) - print < - * ext/openssl/digest.c ext/openssl/lib/openssl/digest.rb: - Commit patch #9280 from Akinori MUSHA. - Simplify the OpenSSL::Digest class and make use of the - existing Digest framework. - Enhance performance. - -Thu Apr 5 14:58:49 2007 Technorama Ltd. - * ext/openssl/ossl_pkcs5.c: New module. - - * ext/openssl/ossl_{cipher,digest,pkcs7,pkcs12}.c: - Remove redundant module namespace. - - * ext/openssl/lib/openssl/{cipher,digest}.rb - Add backwards compatibile classes for rearranged classes. - - * ext/openssl/ossl_{pkcs7,pkcs12}.c: Add documentation. - -Index: ruby_1_8/ext/openssl/lib/openssl/digest.rb -=================================================================== ---- ruby_1_8/ext/openssl/lib/openssl/digest.rb (revision 11708) -+++ ruby_1_8/ext/openssl/lib/openssl/digest.rb (revision 15600) -@@ -19,13 +19,17 @@ - #require 'openssl' - - module OpenSSL -- module Digest -+ class Digest - - alg = %w(DSS DSS1 MD2 MD4 MD5 MDC2 RIPEMD160 SHA SHA1) - if OPENSSL_VERSION_NUMBER > 0x00908000 - alg += %w(SHA224 SHA256 SHA384 SHA512) - end - -+ def self.digest(name, data) -+ super(data, name) -+ end -+ - alg.each{|name| - klass = Class.new(Digest){ - define_method(:initialize){|*data| -@@ -44,6 +48,14 @@ - const_set(name, klass) - } - -+ # This class is only provided for backwards compatibility. Use OpenSSL::Digest in the future. -+ class Digest < Digest -+ def initialize(*args) -+ # add warning -+ super(*args) -+ end -+ end -+ - end # Digest - end # OpenSSL - -Index: ruby_1_8/ext/openssl/ossl_digest.c -=================================================================== ---- ruby_1_8/ext/openssl/ossl_digest.c (revision 11708) -+++ ruby_1_8/ext/openssl/ossl_digest.c (revision 15600) -@@ -24,7 +24,6 @@ - /* - * Classes - */ --VALUE mDigest; - VALUE cDigest; - VALUE eDigestError; - -@@ -36,11 +35,23 @@ - const EVP_MD * - GetDigestPtr(VALUE obj) - { -- EVP_MD_CTX *ctx; -+ const EVP_MD *md; - -- SafeGetDigest(obj, ctx); -+ if (TYPE(obj) == T_STRING) { -+ const char *name = STR2CSTR(obj); - -- return EVP_MD_CTX_md(ctx); /*== ctx->digest*/ -+ md = EVP_get_digestbyname(name); -+ if (!md) -+ ossl_raise(rb_eRuntimeError, "Unsupported digest algorithm (%s).", name); -+ } else { -+ EVP_MD_CTX *ctx; -+ -+ SafeGetDigest(obj, ctx); -+ -+ md = EVP_MD_CTX_md(ctx); -+ } -+ -+ return md; - } - - VALUE -@@ -51,7 +62,6 @@ - - ret = ossl_digest_alloc(cDigest); - GetDigest(ret, ctx); -- EVP_MD_CTX_init(ctx); - EVP_DigestInit_ex(ctx, md, NULL); - - return ret; -@@ -69,14 +79,18 @@ - ctx = EVP_MD_CTX_create(); - if (ctx == NULL) - ossl_raise(rb_eRuntimeError, "EVP_MD_CTX_create() failed"); -- EVP_MD_CTX_init(ctx); - obj = Data_Wrap_Struct(klass, 0, EVP_MD_CTX_destroy, ctx); -- -+ - return obj; - } - - VALUE ossl_digest_update(VALUE, VALUE); - -+/* -+ * call-seq: -+ * Digest.new(string) -> digest -+ * -+ */ - static VALUE - ossl_digest_initialize(int argc, VALUE *argv, VALUE self) - { -@@ -86,14 +100,9 @@ - VALUE type, data; - - rb_scan_args(argc, argv, "11", &type, &data); -- StringValue(type); -+ md = GetDigestPtr(type); - if (!NIL_P(data)) StringValue(data); -- name = StringValuePtr(type); -- -- md = EVP_get_digestbyname(name); -- if (!md) { -- ossl_raise(rb_eRuntimeError, "Unsupported digest algorithm (%s).", name); -- } -+ - GetDigest(self, ctx); - EVP_DigestInit_ex(ctx, md, NULL); - -@@ -118,6 +127,11 @@ - return self; - } - -+/* -+ * call-seq: -+ * digest.reset -> self -+ * -+ */ - static VALUE - ossl_digest_reset(VALUE self) - { -@@ -129,6 +143,11 @@ - return self; - } - -+/* -+ * call-seq: -+ * digest.update(string) -> aString -+ * -+ */ - VALUE - ossl_digest_update(VALUE self, VALUE data) - { -@@ -136,126 +155,77 @@ - - StringValue(data); - GetDigest(self, ctx); -- EVP_DigestUpdate(ctx, RSTRING(data)->ptr, RSTRING(data)->len); -+ EVP_DigestUpdate(ctx, RSTRING_PTR(data), RSTRING_LEN(data)); - - return self; - } - --static void --digest_final(EVP_MD_CTX *ctx, char **buf, int *buf_len) --{ -- EVP_MD_CTX final; -- -- if (!EVP_MD_CTX_copy(&final, ctx)) { -- ossl_raise(eDigestError, NULL); -- } -- if (!(*buf = OPENSSL_malloc(EVP_MD_CTX_size(&final)))) { -- EVP_MD_CTX_cleanup(&final); -- ossl_raise(eDigestError, "Cannot allocate mem for digest"); -- } -- EVP_DigestFinal_ex(&final, *buf, buf_len); -- EVP_MD_CTX_cleanup(&final); --} -- -+/* -+ * call-seq: -+ * digest.finish -> aString -+ * -+ */ - static VALUE --ossl_digest_digest(VALUE self) -+ossl_digest_finish(int argc, VALUE *argv, VALUE self) - { - EVP_MD_CTX *ctx; -- char *buf; -- int buf_len; -- VALUE digest; -- -- GetDigest(self, ctx); -- digest_final(ctx, &buf, &buf_len); -- digest = ossl_buf2str(buf, buf_len); -- -- return digest; --} -+ VALUE str; - --static VALUE --ossl_digest_hexdigest(VALUE self) --{ -- EVP_MD_CTX *ctx; -- char *buf, *hexbuf; -- int buf_len; -- VALUE hexdigest; -+ rb_scan_args(argc, argv, "01", &str); - - GetDigest(self, ctx); -- digest_final(ctx, &buf, &buf_len); -- if (string2hex(buf, buf_len, &hexbuf, NULL) != 2 * buf_len) { -- OPENSSL_free(buf); -- ossl_raise(eDigestError, "Memory alloc error"); -+ -+ if (NIL_P(str)) { -+ str = rb_str_new(NULL, EVP_MD_CTX_size(ctx)); -+ } else { -+ StringValue(str); -+ rb_str_resize(str, EVP_MD_CTX_size(ctx)); - } -- OPENSSL_free(buf); -- hexdigest = ossl_buf2str(hexbuf, 2 * buf_len); - -- return hexdigest; --} -+ EVP_DigestFinal_ex(ctx, RSTRING_PTR(str), NULL); - --static VALUE --ossl_digest_s_digest(VALUE klass, VALUE str, VALUE data) --{ -- VALUE obj = rb_class_new_instance(1, &str, klass); -- -- ossl_digest_update(obj, data); -- -- return ossl_digest_digest(obj); -+ return str; - } - -+/* -+ * call-seq: -+ * digest.name -> string -+ * -+ */ - static VALUE --ossl_digest_s_hexdigest(VALUE klass, VALUE str, VALUE data) -+ossl_digest_name(VALUE self) - { -- VALUE obj = rb_class_new_instance(1, &str, klass); -- -- ossl_digest_update(obj, data); -- -- return ossl_digest_hexdigest(obj); --} -- --static VALUE --ossl_digest_equal(VALUE self, VALUE other) --{ - EVP_MD_CTX *ctx; -- VALUE str1, str2; - -- if (rb_obj_is_kind_of(other, cDigest) == Qtrue) { -- str2 = ossl_digest_digest(other); -- } else { -- StringValue(other); -- str2 = other; -- } - GetDigest(self, ctx); -- if (RSTRING(str2)->len == EVP_MD_CTX_size(ctx)) { -- str1 = ossl_digest_digest(self); -- } else { -- str1 = ossl_digest_hexdigest(self); -- } -- if (RSTRING(str1)->len == RSTRING(str2)->len -- && rb_str_cmp(str1, str2) == 0) { -- return Qtrue; -- } - -- return Qfalse; -+ return rb_str_new2(EVP_MD_name(EVP_MD_CTX_md(ctx))); - } - -+/* -+ * call-seq: -+ * digest.digest_size -> integer -+ * -+ * Returns the output size of the digest. -+ */ - static VALUE --ossl_digest_name(VALUE self) -+ossl_digest_size(VALUE self) - { - EVP_MD_CTX *ctx; - - GetDigest(self, ctx); - -- return rb_str_new2(EVP_MD_name(EVP_MD_CTX_md(ctx))); -+ return INT2NUM(EVP_MD_CTX_size(ctx)); - } - - static VALUE --ossl_digest_size(VALUE self) -+ossl_digest_block_length(VALUE self) - { - EVP_MD_CTX *ctx; - - GetDigest(self, ctx); - -- return INT2NUM(EVP_MD_CTX_size(ctx)); -+ return INT2NUM(EVP_MD_CTX_block_size(ctx)); - } - - /* -@@ -264,31 +234,26 @@ - void - Init_ossl_digest() - { -- mDigest = rb_define_module_under(mOSSL, "Digest"); -+ rb_require("openssl"); -+ rb_require("digest"); -+ -+#if 0 /* let rdoc know about mOSSL */ -+ mOSSL = rb_define_module("OpenSSL"); -+#endif -+ -+ cDigest = rb_define_class_under(mOSSL, "Digest", rb_path2class("Digest::Class")); -+ eDigestError = rb_define_class_under(cDigest, "DigestError", eOSSLError); - -- eDigestError = rb_define_class_under(mDigest, "DigestError", eOSSLError); -- -- cDigest = rb_define_class_under(mDigest, "Digest", rb_cObject); -- - rb_define_alloc_func(cDigest, ossl_digest_alloc); -- rb_define_singleton_method(cDigest, "digest", ossl_digest_s_digest, 2); -- rb_define_singleton_method(cDigest, "hexdigest", ossl_digest_s_hexdigest, 2); -- -+ - rb_define_method(cDigest, "initialize", ossl_digest_initialize, -1); -- rb_define_method(cDigest, "reset", ossl_digest_reset, 0); -- - rb_define_copy_func(cDigest, ossl_digest_copy); -- -- rb_define_method(cDigest, "digest", ossl_digest_digest, 0); -- rb_define_method(cDigest, "hexdigest", ossl_digest_hexdigest, 0); -- rb_define_alias(cDigest, "inspect", "hexdigest"); -- rb_define_alias(cDigest, "to_s", "hexdigest"); -- -+ rb_define_method(cDigest, "reset", ossl_digest_reset, 0); - rb_define_method(cDigest, "update", ossl_digest_update, 1); - rb_define_alias(cDigest, "<<", "update"); -- -- rb_define_method(cDigest, "==", ossl_digest_equal, 1); -- -+ rb_define_private_method(cDigest, "finish", ossl_digest_finish, -1); -+ rb_define_method(cDigest, "digest_length", ossl_digest_size, 0); -+ rb_define_method(cDigest, "block_length", ossl_digest_block_length, 0); -+ - rb_define_method(cDigest, "name", ossl_digest_name, 0); -- rb_define_method(cDigest, "size", ossl_digest_size, 0); - } diff --git a/ruby-1.8.7-always-use-i386.patch b/ruby-1.8.7-always-use-i386.patch new file mode 100644 index 0000000..ad0dca1 --- /dev/null +++ b/ruby-1.8.7-always-use-i386.patch @@ -0,0 +1,11 @@ +--- ruby-1.8.7-p299/configure.in.orig 2010-06-24 16:09:00.000000000 -0400 ++++ ruby-1.8.7-p299/configure.in 2010-06-24 16:09:13.000000000 -0400 +@@ -1802,6 +1802,8 @@ AC_SUBST(vendordir)dnl + configure_args=$ac_configure_args + AC_SUBST(configure_args)dnl + ++target_cpu=`echo $target_cpu | sed s/i.86/i386/` ++ + if test "$fat_binary" != no ; then + arch="fat-${target_os}" + diff --git a/ruby-1.8.7-lib-paths.patch b/ruby-1.8.7-lib-paths.patch new file mode 100644 index 0000000..4cef830 --- /dev/null +++ b/ruby-1.8.7-lib-paths.patch @@ -0,0 +1,228 @@ +--- ruby-1.8.7-p249/Makefile.in.orig 2010-06-15 17:51:14.000000000 -0400 ++++ ruby-1.8.7-p249/Makefile.in 2010-06-15 17:56:54.000000000 -0400 +@@ -24,6 +24,9 @@ datadir = @datadir@ + arch = @arch@ + sitearch = @sitearch@ + sitedir = @sitedir@ ++sitearchdir = @sitearchdir@ ++vendordir = @vendordir@ ++vendorarchdir = @vendorarchdir@ + + TESTUI = console + TESTS = +--- ruby-1.8.7-p249/mkconfig.rb.orig2 2010-06-15 18:19:29.000000000 -0400 ++++ ruby-1.8.7-p249/mkconfig.rb 2010-06-15 18:19:33.000000000 -0400 +@@ -141,12 +141,12 @@ print(*v_fast) + print(*v_others) + print < "#$LDFLAGS #{ldflags}", 'LIBPATH' => libpathflag(libpath), 'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs", diff --git a/ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch b/ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch deleted file mode 100644 index 503a6b4..0000000 --- a/ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch +++ /dev/null @@ -1,65 +0,0 @@ -Sat Apr 19 18:42:04 2008 Akinori MUSHA - - * intern.h, hash.c (rb_hash_lookup): New internal function to - check if a key exists in a hash, ignoring #default; backported - from 1.9. - -Thu Aug 30 08:24:18 2007 Tanaka Akira - - * ruby.h (RHASH_TBL): defined for compatibility to 1.9. - * (RHASH_ITER_LEV): ditto. - * (RHASH_IFNONE): ditto. - * (RHASH_SIZE): ditto. - * (RHASH_EMPTY_P): ditto. - -Index: ruby_1_8/ruby.h -=================================================================== ---- ruby_1_8/ruby.h (revision 13310) -+++ ruby_1_8/ruby.h (revision 13311) -@@ -374,6 +374,11 @@ - int iter_lev; - VALUE ifnone; - }; -+#define RHASH_TBL(h) (RHASH(h)->tbl) -+#define RHASH_ITER_LEV(h) (RHASH(h)->iter_lev) -+#define RHASH_IFNONE(h) (RHASH(h)->ifnone) -+#define RHASH_SIZE(h) (RHASH(h)->tbl->num_entries) -+#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0) - - struct RFile { - struct RBasic basic; -Index: ruby_1_8/hash.c -=================================================================== ---- ruby_1_8/hash.c (revision 16077) -+++ ruby_1_8/hash.c (revision 16078) -@@ -454,6 +454,18 @@ - return val; - } - -+VALUE -+rb_hash_lookup(hash, key) -+ VALUE hash, key; -+{ -+ VALUE val; -+ -+ if (!st_lookup(RHASH(hash)->tbl, key, &val)) { -+ return Qnil; /* without Hash#default */ -+ } -+ return val; -+} -+ - /* - * call-seq: - * hsh.fetch(key [, default] ) => obj -Index: ruby_1_8/intern.h -=================================================================== ---- ruby_1_8/intern.h (revision 16077) -+++ ruby_1_8/intern.h (revision 16078) -@@ -270,6 +270,7 @@ - VALUE rb_hash_new _((void)); - VALUE rb_hash_freeze _((VALUE)); - VALUE rb_hash_aref _((VALUE, VALUE)); -+VALUE rb_hash_lookup _((VALUE, VALUE)); - VALUE rb_hash_aset _((VALUE, VALUE, VALUE)); - VALUE rb_hash_delete_if _((VALUE)); - VALUE rb_hash_delete _((VALUE,VALUE)); diff --git a/ruby-1.8.x-ext_tk-flatten-level-revert.patch b/ruby-1.8.x-ext_tk-flatten-level-revert.patch deleted file mode 100644 index 7d57b37..0000000 --- a/ruby-1.8.x-ext_tk-flatten-level-revert.patch +++ /dev/null @@ -1,58 +0,0 @@ -Index: ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb -=================================================================== ---- ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb (revision 27738) -+++ ruby-1.8-rev27736_trunk/ext/tk/lib/tk/pack.rb (working copy) -@@ -39,7 +39,23 @@ - end - fail ArgumentError, 'no widget is given' if args.empty? - params = [] -- args.flatten(1).each{|win| params.push(_epath(win))} -+ -+ #args.flatten(1).each{|win| params.push(_epath(win))} -+ # -+ # flatten(level) is ruby >=1.8.7 feature, substituting -+ # -+ args_flatten_one = [] -+ args.each {|args1| -+ if args1.is_a? Array then -+ args1.each {|args2| -+ args_flatten_one << args2 -+ } -+ else -+ args_flatten_one << args1 -+ end -+ } -+ args_flatten_one.each{|win| params.push(_epath(win))} -+ - opts.each{|k, v| - params.push("-#{k}") - params.push(_epath(v)) # have to use 'epath' (hash_kv() is unavailable) -Index: ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb -=================================================================== ---- ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb (revision 27738) -+++ ruby-1.8-rev27736_trunk/ext/tk/lib/tk/grid.rb (working copy) -@@ -63,7 +63,23 @@ - end - fail ArgumentError, 'no widget is given' if args.empty? - params = [] -- args.flatten(1).each{|win| -+ -+ #args.flatten(1).each{|win| -+ # -+ # flatten(level) is ruby >=1.8.7 feature, substituting -+ # -+ -+ args_flatten_one = [] -+ args.each {|args1| -+ if args1.is_a? Array then -+ args1.each {|args2| -+ args_flatten_one << args2 -+ } -+ else -+ args_flatten_one << args1 -+ end -+ } -+ args_flatten_one.each{|win| - case win - when '-', ?- # RELATIVE PLACEMENT (increase columnspan) - params.push('-') diff --git a/ruby-1.8.x-null-class-must-be-Qnil.patch b/ruby-1.8.x-null-class-must-be-Qnil.patch deleted file mode 100644 index 114a97b..0000000 --- a/ruby-1.8.x-null-class-must-be-Qnil.patch +++ /dev/null @@ -1,21 +0,0 @@ -Sun Mar 1 03:04:19 2009 Akinori MUSHA - - * class.c (rb_singleton_class_clone): Qnil must be used for a null - class reference when we use NIL_P() to check class reference - validity. The bug was exposed by the spec test of Sequel. - - * eval.c (ruby_init): Use NEW_CREF(). - -Index: ruby_1_8/class.c -=================================================================== ---- ruby_1_8/class.c (revision 22678) -+++ ruby_1_8/class.c (revision 22679) -@@ -153,7 +153,7 @@ - data.klass = obj; - break; - default: -- data.klass = 0; -+ data.klass = Qnil; - break; - } - diff --git a/ruby-1.8head-irb-save-history.patch b/ruby-1.8head-irb-save-history.patch deleted file mode 100644 index 9349016..0000000 --- a/ruby-1.8head-irb-save-history.patch +++ /dev/null @@ -1,111 +0,0 @@ -Thu Jul 23 15:04:20 2009 Keiju Ishitsuka - -ruby* lib/irb.rb, lib/irb/init.rb, lib/irb/ext/save-history.rb: add -ruby IRB::irb_at_exit. no use finalizer saving history. [ruby-dev-38563] - -Index: lib/irb/ext/save-history.rb -=================================================================== ---- lib/irb/ext/save-history.rb (revision 24225) -+++ lib/irb/ext/save-history.rb (revision 24254) -@@ -50,23 +50,24 @@ - module HistorySavingAbility - include Readline - -- def HistorySavingAbility.create_finalizer -- proc do -- if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) > 0 -- if hf = IRB.conf[:HISTORY_FILE] -- file = File.expand_path(hf) -- end -- file = IRB.rc_file("_history") unless file -- open(file, 'w' ) do |f| -- hist = HISTORY.to_a -- f.puts(hist[-num..-1] || hist) -- end -- end -- end -- end -+# def HistorySavingAbility.create_finalizer -+# proc do -+# if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) > 0 -+# if hf = IRB.conf[:HISTORY_FILE] -+# file = File.expand_path(hf) -+# end -+# file = IRB.rc_file("_history") unless file -+# open(file, 'w' ) do |f| -+# hist = HISTORY.to_a -+# f.puts(hist[-num..-1] || hist) -+# end -+# end -+# end -+# end - - def HistorySavingAbility.extended(obj) -- ObjectSpace.define_finalizer(obj, HistorySavingAbility.create_finalizer) -+# ObjectSpace.define_finalizer(obj, HistorySavingAbility.create_finalizer) -+ IRB.conf[:AT_EXIT].push proc{obj.save_history} - obj.load_history - obj - end -@@ -80,6 +81,19 @@ - end - end - end -+ -+ def save_history -+ if num = IRB.conf[:SAVE_HISTORY] and (num = num.to_i) > 0 -+ if history_file = IRB.conf[:HISTORY_FILE] -+ history_file = File.expand_path(history_file) -+ end -+ history_file = IRB.rc_file("_history") unless history_file -+ open(history_file, 'w' ) do |f| -+ hist = HISTORY.to_a -+ f.puts(hist[-num..-1] || hist) -+ end -+ end -+ end - end - end - -Index: lib/irb/init.rb -=================================================================== ---- lib/irb/init.rb (revision 24225) -+++ lib/irb/init.rb (revision 24254) -@@ -114,6 +114,8 @@ - # @CONF[:LC_MESSAGES] = "en" - @CONF[:LC_MESSAGES] = Locale.new - -+ @CONF[:AT_EXIT] = [] -+ - @CONF[:DEBUG_LEVEL] = 1 - end - -Index: lib/irb.rb -=================================================================== ---- lib/irb.rb (revision 24225) -+++ lib/irb.rb (revision 24254) -@@ -65,13 +65,21 @@ - trap("SIGINT") do - irb.signal_handle - end -- -- catch(:IRB_EXIT) do -- irb.eval_input -+ -+ begin -+ catch(:IRB_EXIT) do -+ irb.eval_input -+ end -+ ensure -+ irb_at_exit - end - # print "\n" - end - -+ def IRB.irb_at_exit -+ @CONF[:AT_EXIT].each{|hook| hook.call} -+ end -+ - def IRB.irb_exit(irb, ret) - throw :IRB_EXIT, ret - end diff --git a/ruby-always-use-i386.patch b/ruby-always-use-i386.patch deleted file mode 100644 index 9dc8c87..0000000 --- a/ruby-always-use-i386.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ruby-1.8.6-p287/configure.in.i386 2009-03-16 00:55:15.000000000 +0900 -+++ ruby-1.8.6-p287/configure.in 2009-03-16 01:42:41.000000000 +0900 -@@ -1662,6 +1662,8 @@ - configure_args=$ac_configure_args - AC_SUBST(configure_args)dnl - -+target_cpu=`echo $target_cpu | sed s/i.86/i386/` -+ - if test "$fat_binary" != no ; then - arch="fat-${target_os}" - diff --git a/ruby-deadcode.patch b/ruby-deadcode.patch deleted file mode 100644 index 2cc3654..0000000 --- a/ruby-deadcode.patch +++ /dev/null @@ -1,72 +0,0 @@ -diff -pruN ruby-1.8.6.orig/ext/bigdecimal/bigdecimal.c ruby-1.8.6/ext/bigdecimal/bigdecimal.c ---- ruby-1.8.6.orig/ext/bigdecimal/bigdecimal.c 2007-02-27 20:51:55.000000000 +0900 -+++ ruby-1.8.6/ext/bigdecimal/bigdecimal.c 2007-03-15 21:14:32.000000000 +0900 -@@ -2167,12 +2167,14 @@ VpGetDoubleNegZero(void) /* Returns the - return nzero; - } - -+#if 0 - VP_EXPORT int - VpIsNegDoubleZero(double v) - { - double z = VpGetDoubleNegZero(); - return MemCmp(&v,&z,sizeof(v))==0; - } -+#endif - - VP_EXPORT int - VpException(unsigned short f, const char *str,int always) -diff -pruN ruby-1.8.6.orig/parse.y ruby-1.8.6/parse.y ---- ruby-1.8.6.orig/parse.y 2007-03-03 16:30:46.000000000 +0900 -+++ ruby-1.8.6/parse.y 2007-03-15 21:15:58.000000000 +0900 -@@ -4511,6 +4511,7 @@ rb_node_newnode(type, a0, a1, a2) - return n; - } - -+#if 0 - static enum node_type - nodetype(node) /* for debug */ - NODE *node; -@@ -4524,6 +4525,7 @@ nodeline(node) - { - return nd_line(node); - } -+#endif - - static NODE* - newline_node(node) -diff -pruN ruby-1.8.6.orig/regex.c ruby-1.8.6/regex.c ---- ruby-1.8.6.orig/regex.c 2007-02-27 20:51:55.000000000 +0900 -+++ ruby-1.8.6/regex.c 2007-03-15 21:16:52.000000000 +0900 -@@ -998,6 +998,7 @@ print_partial_compiled_pattern(start, en - } - - -+#if 0 - static void - print_compiled_pattern(bufp) - struct re_pattern_buffer *bufp; -@@ -1006,6 +1007,7 @@ print_compiled_pattern(bufp) - - print_partial_compiled_pattern(buffer, buffer + bufp->used); - } -+#endif - - static char* - calculate_must_string(start, end) -@@ -2586,6 +2588,7 @@ insert_jump_n(op, from, to, current_end, - - If you call this function, you must zero out pending_exact. */ - -+#if 0 - static void - insert_op(op, there, current_end) - int op; -@@ -2599,6 +2602,7 @@ insert_op(op, there, current_end) - - there[0] = (char)op; - } -+#endif - - - /* Open up space at location THERE, and insert operation OP followed by diff --git a/ruby-deprecated-search-path.patch b/ruby-deprecated-search-path.patch deleted file mode 100644 index aead58e..0000000 --- a/ruby-deprecated-search-path.patch +++ /dev/null @@ -1,51 +0,0 @@ -diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in ---- ruby-1.8.4.orig/configure.in 2006-04-20 12:53:38.000000000 +0900 -+++ ruby-1.8.4/configure.in 2006-04-20 13:06:07.000000000 +0900 -@@ -1472,12 +1472,16 @@ - esac - RUBY_SITE_LIB_PATH3="${RUBY_SITE_LIB_PATH2}/${MAJOR}.${MINOR}" - RUBY_SITE_LIB_PATH2="${RUBY_SITE_LIB_PATH}/${MAJOR}.${MINOR}" -+RUBY_DEPRECATED_SITE_LIB_PATH="${SITE_DIR2}/${MAJOR}.${MINOR}" - - AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") - AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") - AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}") - AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_LIB, "${libdir}/site_ruby") - AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_LIB2, "${libdir}/site_ruby/${MAJOR}.${MINOR}") -+AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_LIB, "${RUBY_LIB_PATH2}") -+AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_SITE_LIB, "${SITE_DIR2}") -+AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_SITE_LIB2, "${RUBY_DEPRECATED_SITE_LIB_PATH}") - - AC_SUBST(arch)dnl - AC_SUBST(sitearch)dnl -diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c ---- ruby-1.8.4.orig/ruby.c 2005-12-12 09:36:52.000000000 +0900 -+++ ruby-1.8.4/ruby.c 2006-04-20 12:59:50.000000000 +0900 -@@ -292,11 +292,17 @@ - #endif - - incpush(RUBY_RELATIVE(RUBY_SITE_LIB2)); -+#ifdef RUBY_DEPRECATED_SITE_LIB -+ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB2)); -+#endif - #ifdef RUBY_SITE_THIN_ARCHLIB - incpush(RUBY_RELATIVE(RUBY_SITE_THIN_ARCHLIB)); - #endif - incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); - incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); -+#ifdef RUBY_DEPRECATED_SITE_LIB -+ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_SITE_LIB)); -+#endif - #ifdef RUBY_DEPRECATED_OLD_SITE_LIB2 - incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); - #endif -@@ -308,6 +314,9 @@ - #endif - - incpush(RUBY_RELATIVE(RUBY_LIB)); -+#ifdef RUBY_DEPRECATED_LIB -+ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_LIB)); -+#endif - #ifdef RUBY_THIN_ARCHLIB - incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB)); - #endif diff --git a/ruby-deprecated-sitelib-search-path.patch b/ruby-deprecated-sitelib-search-path.patch deleted file mode 100644 index 5711727..0000000 --- a/ruby-deprecated-sitelib-search-path.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -ruN ruby-1.8.4.orig/configure.in ruby-1.8.4/configure.in ---- ruby-1.8.4.orig/configure.in 2006-06-07 13:58:03.000000000 +0900 -+++ ruby-1.8.4/configure.in 2006-06-07 15:54:36.000000000 +0900 -@@ -1476,6 +1476,8 @@ - AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}") - AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}") - AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}") -+AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_LIB, "${libdir}/site_ruby") -+AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_LIB2, "${libdir}/site_ruby/${MAJOR}.${MINOR}") - - AC_SUBST(arch)dnl - AC_SUBST(sitearch)dnl -@@ -1506,6 +1508,7 @@ - - AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH2}/${arch}") - AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH3}/${sitearch}") -+AC_DEFINE_UNQUOTED(RUBY_DEPRECATED_OLD_SITE_ARCHLIB, "${libdir}/site_ruby/${MAJOR}.${MINOR}/${sitearch}") - - AC_ARG_WITH(search-path, - [ --with-search-path=DIR specify the additional search path], -diff -ruN ruby-1.8.4.orig/ruby.c ruby-1.8.4/ruby.c ---- ruby-1.8.4.orig/ruby.c 2005-12-12 09:36:52.000000000 +0900 -+++ ruby-1.8.4/ruby.c 2006-06-07 15:56:14.000000000 +0900 -@@ -297,6 +297,15 @@ - #endif - incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB)); - incpush(RUBY_RELATIVE(RUBY_SITE_LIB)); -+#ifdef RUBY_DEPRECATED_OLD_SITE_LIB2 -+ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB2)); -+#endif -+#ifdef RUBY_DEPRECATED_OLD_SITE_ARCHLIB -+ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_ARCHLIB)); -+#endif -+#ifdef RUBY_DEPRECATED_OLD_SITE_LIB -+ incpush(RUBY_RELATIVE(RUBY_DEPRECATED_OLD_SITE_LIB)); -+#endif - - incpush(RUBY_RELATIVE(RUBY_LIB)); - #ifdef RUBY_THIN_ARCHLIB diff --git a/ruby-mode-init.el b/ruby-mode-init.el deleted file mode 100644 index fcd99db..0000000 --- a/ruby-mode-init.el +++ /dev/null @@ -1,20 +0,0 @@ -;; ruby-mode-init.el -;; Created: 2002-02-01 -;; -(if (featurep 'xemacs) - (setq load-path (cons "/usr/lib/xemacs/xemacs-packages/lisp/ruby-mode" load-path)) - (setq load-path (cons "/usr/share/emacs/site-lisp/ruby-mode" load-path))) - - -(autoload 'ruby-mode "ruby-mode" "Mode for editing ruby source files" t) -(setq auto-mode-alist - (cons '("\\.rb$" . ruby-mode) auto-mode-alist)) -(setq interpreter-mode-alist - (cons '("ruby" . ruby-mode) interpreter-mode-alist)) - -(autoload 'run-ruby "inf-ruby" "Run an inferior Ruby process") -(autoload 'inf-ruby-keys "inf-ruby" "Set local key defs for inf-ruby in ruby-mode") - -(add-hook 'ruby-mode-hook - '(lambda () - (inf-ruby-keys))) diff --git a/ruby-multilib.patch b/ruby-multilib.patch deleted file mode 100644 index 5f2f75b..0000000 --- a/ruby-multilib.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN ruby-1.8.3.orig/mkconfig.rb ruby-1.8.3/mkconfig.rb ---- ruby-1.8.3.orig/mkconfig.rb 2005-09-21 15:10:57.000000000 +0900 -+++ ruby-1.8.3/mkconfig.rb 2005-09-21 15:17:32.000000000 +0900 -@@ -74,7 +74,7 @@ - - drive = File::PATH_SEPARATOR == ';' - --prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM -+prefix = '/lib64/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM - print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" - print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" - print " CONFIG = {}\n" diff --git a/ruby-openssl-1.0.patch b/ruby-openssl-1.0.patch deleted file mode 100644 index 508fd75..0000000 --- a/ruby-openssl-1.0.patch +++ /dev/null @@ -1,176 +0,0 @@ -diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c ---- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c.ossl10 2007-02-13 00:01:19.000000000 +0100 -+++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl.c 2009-08-26 12:29:41.000000000 +0200 -@@ -92,7 +92,7 @@ ossl_x509_ary2sk(VALUE ary) - - #define OSSL_IMPL_SK2ARY(name, type) \ - VALUE \ --ossl_##name##_sk2ary(STACK *sk) \ -+ossl_##name##_sk2ary(STACK_OF(type) *sk) \ - { \ - type *t; \ - int i, num; \ -@@ -102,7 +102,7 @@ ossl_##name##_sk2ary(STACK *sk) \ - OSSL_Debug("empty sk!"); \ - return Qnil; \ - } \ -- num = sk_num(sk); \ -+ num = sk_##type##_num(sk); \ - if (num < 0) { \ - OSSL_Debug("items in sk < -1???"); \ - return rb_ary_new(); \ -@@ -110,7 +110,7 @@ ossl_##name##_sk2ary(STACK *sk) \ - ary = rb_ary_new2(num); \ - \ - for (i=0; id.sign->cert; -- crls = pkcs7->d.sign->crl; - break; - case NID_pkcs7_signedAndEnveloped: - certs = pkcs7->d.signed_and_enveloped->cert; -+ break; -+ default: -+ certs = NULL; -+ } -+ -+ return certs; -+} -+ -+static STACK_OF(X509_CRL) * -+pkcs7_get_crls(VALUE self) -+{ -+ PKCS7 *pkcs7; -+ STACK_OF(X509_CRL) *crls; -+ int i; -+ -+ GetPKCS7(self, pkcs7); -+ i = OBJ_obj2nid(pkcs7->type); -+ switch(i){ -+ case NID_pkcs7_signed: -+ crls = pkcs7->d.sign->crl; -+ break; -+ case NID_pkcs7_signedAndEnveloped: - crls = pkcs7->d.signed_and_enveloped->crl; - break; - default: -- certs = crls = NULL; -+ crls = NULL; - } - -- return want_certs ? certs : crls; -+ return crls; - } - - static VALUE -@@ -581,7 +601,7 @@ ossl_pkcs7_set_certificates(VALUE self, - STACK_OF(X509) *certs; - X509 *cert; - -- certs = pkcs7_get_certs_or_crls(self, 1); -+ certs = pkcs7_get_certs(self); - while((cert = sk_X509_pop(certs))) X509_free(cert); - rb_iterate(rb_each, ary, ossl_pkcs7_set_certs_i, self); - -@@ -591,7 +611,7 @@ ossl_pkcs7_set_certificates(VALUE self, - static VALUE - ossl_pkcs7_get_certificates(VALUE self) - { -- return ossl_x509_sk2ary(pkcs7_get_certs_or_crls(self, 1)); -+ return ossl_x509_sk2ary(pkcs7_get_certs(self)); - } - - static VALUE -@@ -621,7 +641,7 @@ ossl_pkcs7_set_crls(VALUE self, VALUE ar - STACK_OF(X509_CRL) *crls; - X509_CRL *crl; - -- crls = pkcs7_get_certs_or_crls(self, 0); -+ crls = pkcs7_get_crls(self); - while((crl = sk_X509_CRL_pop(crls))) X509_CRL_free(crl); - rb_iterate(rb_each, ary, ossl_pkcs7_set_crls_i, self); - -@@ -631,7 +651,7 @@ ossl_pkcs7_set_crls(VALUE self, VALUE ar - static VALUE - ossl_pkcs7_get_crls(VALUE self) - { -- return ossl_x509crl_sk2ary(pkcs7_get_certs_or_crls(self, 0)); -+ return ossl_x509crl_sk2ary(pkcs7_get_crls(self)); - } - - static VALUE -diff -up ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10 ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c ---- ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c.ossl10 2007-03-12 05:12:32.000000000 +0100 -+++ ruby-1.8.6.369/ruby-1.8.6-p369/ext/openssl/ossl_ssl.c 2009-08-26 12:08:48.000000000 +0200 -@@ -89,12 +89,18 @@ static char *ossl_sslctx_attrs[] = { - static char *ossl_ssl_attr_readers[] = { "io", "context", }; - static char *ossl_ssl_attrs[] = { "sync_close", }; - -+#if OPENSSL_VERSION_NUMBER >= 0x10000000L -+#define OSSL_MORE_CONST const -+#define STACK _STACK -+#else -+#define OSSL_MORE_CONST -+#endif - /* - * SSLContext class - */ - struct { - const char *name; -- SSL_METHOD *(*func)(void); -+ OSSL_MORE_CONST SSL_METHOD *(*func)(void); - } ossl_ssl_method_tab[] = { - #define OSSL_SSL_METHOD_ENTRY(name) { #name, name##_method } - OSSL_SSL_METHOD_ENTRY(TLSv1), -@@ -144,7 +150,7 @@ static VALUE - ossl_sslctx_initialize(int argc, VALUE *argv, VALUE self) - { - VALUE ssl_method; -- SSL_METHOD *method = NULL; -+ OSSL_MORE_CONST SSL_METHOD *method = NULL; - SSL_CTX *ctx; - int i; - char *s; -@@ -407,7 +413,7 @@ ossl_sslctx_setup(VALUE self) - } - - static VALUE --ossl_ssl_cipher_to_ary(SSL_CIPHER *cipher) -+ossl_ssl_cipher_to_ary(OSSL_MORE_CONST SSL_CIPHER *cipher) - { - VALUE ary; - int bits, alg_bits; -@@ -805,7 +811,7 @@ static VALUE - ossl_ssl_get_cipher(VALUE self) - { - SSL *ssl; -- SSL_CIPHER *cipher; -+ OSSL_MORE_CONST SSL_CIPHER *cipher; - - Data_Get_Struct(self, SSL, ssl); - if (!ssl) { diff --git a/ruby.spec b/ruby.spec index 38e16cd..144339d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,104 +1,76 @@ -%define rubyxver 1.8 -%define rubyver 1.8.6 -%define _patchlevel 399 -%define dotpatchlevel %{?_patchlevel:.%{_patchlevel}} -%define patchlevel %{?_patchlevel:-p%{_patchlevel}} -%define arcver %{rubyver}%{?patchlevel} -%define sitedir %{_libdir}/ruby/site_ruby -# This is required to ensure that noarch files puts under /usr/lib/... for -# multilib because ruby library is installed under /usr/{lib,lib64}/ruby anyway. -%define sitedir2 %{_prefix}/lib/ruby/site_ruby -%define _normalized_cpu %(echo `echo %{_target_cpu} | sed 's/^ppc/powerpc/' | sed -e 's|i.86|i386|'`) +%global rubyxver 1.8 +%global rubyver 1.8.7 +%global _patchlevel 299 -%define tk_using_svn_number 27738 +%global dotpatchlevel %{?_patchlevel:.%{_patchlevel}} +%global patchlevel %{?_patchlevel:-p%{_patchlevel}} +%global arcver %{rubyver}%{?patchlevel} -# emacs sitelisp directory -%{!?_emacs_sitelispdir: %global _emacs_sitelispdir %{_datadir}/emacs/site-lisp} -%{!?_emacs_sitestartdir: %global _emacs_sitestartdir %{_datadir}/emacs/site-lisp/site-start.d} +%{!?vendorlibbase: %global vendorlibbase %{_prefix}/lib/ruby} +%{!?vendorarchbase: %global vendorarchbase %{_libdir}/ruby} +%{!?sitelibbase: %global sitelibbase %{vendorlibbase}/site_ruby} +%{!?sitearchbase: %global sitearchbase %{vendorarchbase}/site_ruby} + +%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/') +%global ruby_tk_git_revision 415a3ef9ab82c65a7abc Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 5%{?dist} +Release: 4%{?dist} +# Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 -BuildRequires: compat-readline5-devel -%else -BuildRequires: readline readline-devel -%endif -BuildRequires: ncurses ncurses-devel gdbm gdbm-devel glibc-devel tcl-devel tk-devel libX11-devel autoconf gcc unzip openssl-devel db4-devel byacc -# Use bison to recreate parse.c (ref: bug 530275 comment 4) + +BuildRequires: compat-readline5-devel +BuildRequires: db4-devel +BuildRequires: gdbm-devel +BuildRequires: libX11-devel +BuildRequires: ncurses-devel +BuildRequires: openssl-devel +BuildRequires: tcl-devel +BuildRequires: tk-devel + +BuildRequires: autoconf BuildRequires: bison -BuildRequires: emacs +BuildRequires: byacc +# Official ruby source release tarball Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{arcver}.tar.bz2 -## Dead link -##Source1: http://www7.tok2.com/home/misc/files/%{name}/%{name}-refm-rdp-1.8.1-ja-html.tar.gz -#Source1: %{name}-refm-rdp-1.8.1-ja-html.tar.gz -Source1: http://elbereth-hp.hp.infoseek.co.jp/files/ruby/refm/old/2005/%{name}-refm-rdp-1.8.2-ja-html.tar.gz -Source2: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-990927.tar.gz -Source3: ftp://ftp.ruby-lang.org/pub/%{name}/doc/rubyfaq-jp-990927.tar.gz -Source4: irb.1 -Source10: ruby-mode-init.el -# -# Source100: contains ext/tk directory of the head of ruby_1_8 branch -# i.e. http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8 -# see bug 560053, 590503, and -# http://lists.fedoraproject.org/pipermail/ruby-sig/2010-May/000096.html -Source100: ruby-1.8-rev%{tk_using_svn_number}_trunk-ext_tk.tar.gz -# Patch1 - Patch23 are Fedora specific -Patch1: ruby-deadcode.patch -Patch20: ruby-1.8.6-p383-rubyprefix.patch -Patch21: ruby-deprecated-sitelib-search-path.patch -Patch22: ruby-deprecated-search-path.patch -Patch23: ruby-multilib.patch -# Needed in 1.8.6-p287, no longer needed in 1.8.6-p368? -#Patch25: ruby-1.8.6.111-gcc43.patch -# ruby_1_8 branch rev 19320, 20121, bug 460134 -# Included in 1.8.6 p368 -#Patch26: ruby-1.8.6-rexml-CVE-2008-3790.patch -# Patch27, 28 could not be found in the upstream VCS -# Need checking?? -Patch27: ruby-1.8.6-p287-CVE-2008-5189.patch -Patch28: ruby-1.8.6-p287-remove-ssl-rand-range.patch -# Fedora specific -# Change the directory of sitearchdir from i?86 to i386 for upgrade path -Patch29: ruby-always-use-i386.patch -# By Tomas Mraz, "seems" already in ruby_1_8 branch head -# (but have not checked yet in detail) -Patch30: ruby-openssl-1.0.patch -# bug 528787, patch from in ruby_1_8 branch -Patch31: ruby-1.8.6-p369-ri-gem_multipath.patch -# bug 518584, ruby issue 1556, patch from ruby_1_8??? branch -Patch32: ruby-1.8head-irb-save-history.patch -# bug 428384, Fedora specific, however needed for Fedora's static -# archive policy -Patch33: ruby-1.8.6-p383-mkmf-use-shared.patch -# bug 559158, Simplify the OpenSSL::Digest class -# Applying Patch34 needs reversing Patch39 part -Patch34: ruby-1.8.6-simplify-openssl-digest.patch -# bug 580993, patch from ruby_1_8_7 branch -Patch35: ruby_1_8_7-gc-open4_096segv.patch -# -# Patch36, 37: needed to use the head of ext/tk directory of ruby_1_8 branch head -# Patch36: taken from ruby_1_8 branch, RHASH_SIZE definition is needed -# for ruby_1_8 head ext/tk -# With this change, rb_hash_lookup becomes also needed for rubygem-nokogiri -# (bug 592936) -Patch36: ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch -# Patch37: flatten(level) feature is in >= 1.8.7, reverting -Patch37: ruby-1.8.x-ext_tk-flatten-level-revert.patch -# From ruby_1_8 branch: bz 530407 -# bz 530407 reproducible with 1.8.7p174, not with 1.8.7p249 -Patch38: ruby-1.8.x-null-class-must-be-Qnil.patch -# Once revert this patch to apply Patch34 cleanly -Patch39: ruby-1.8.6-openssl-digest-once-revert-for-simplify-patch.patch +# Source100: contains ext/tk directory of the ruby source head +# see http://lists.fedoraproject.org/pipermail/ruby-sig/2010-May/000096.html +# and bug 560053, 590503. +# To checkout, run the following commands +# (replacing 'ruby_tk_git_revision' with the value of the macro above): +# * git clone http://github.com/ruby/ruby.git +# * cd ruby +# * git checkout %%{ruby_tk_git_revision} ext/tk +# * tar czvf ruby-rev%%{ruby_tk_git_revision}-ext_tk.tar.gz ext/tk +Source100: ruby-rev%{ruby_tk_git_revision}-ext_tk.tar.gz + +# Patches 23, 29, and 33 brought over from ruby 1.8.6 +# (updated to apply against 1.8.7 source) +# If building against a 64bit arch, use 64bit libdir +Patch23: ruby-1.8.7-multilib.patch +# Mark all i.86 arch's (eg i586, i686, etc) as i386 +Patch29: ruby-1.8.7-always-use-i386.patch +# Use shared libs as opposed to static for mkmf +# See bug 428384 +Patch33: ruby-1.8.7-p249-mkmf-use-shared.patch +# Change ruby load path to conform to Fedora/ruby +# library placement (various 1.8.6 patches consolidated into this) +Patch100: ruby-1.8.7-lib-paths.patch Summary: An interpreter of object-oriented scripting language Group: Development/Languages -Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +# emacs-23.2.x itself now provides the ruby mode +# And no Provides here +Obsoletes: %{name}-mode < 1.8.7 +# remove old documentation +# And no Provides here +Obsoletes: %{name}-docs < 1.8.7 %description Ruby is the interpreted scripting language for quick and easy @@ -107,7 +79,7 @@ files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible. -%package libs +%package libs Summary: Libraries necessary to run Ruby Group: Development/Libraries # ext/bigdecimal/bigdecimal.{c,h} are under (GPL+ or Artistic) which @@ -115,64 +87,54 @@ Group: Development/Libraries License: (Ruby or GPLv2) and (GPL+ or Artistic) Provides: ruby(abi) = %{rubyxver} Provides: libruby = %{version}-%{release} -Obsoletes: libruby <= %{version}-%{release} +Obsoletes: libruby < %{version}-%{release} %description libs This package includes the libruby, necessary to run Ruby. -%package devel +%package devel Summary: A Ruby development environment Group: Development/Languages -Requires: %{name}-libs = %{version}-%{release} -#Provides: %{name}-libs-static = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} -%description devel +%description devel Header files and libraries for building a extension library for the Ruby or an application embedded Ruby. -%package static +%package static Summary: Static libraries for Ruby development environment Group: Development/Languages -Requires: %{name}-devel = %{version}-%{release} +Requires: %{name}-devel%{?_isa} = %{version}-%{release} -%description static +%description static Static libraries for for building a extension library for the Ruby or an application embedded Ruby. -%package tcltk -Summary: Tcl/Tk interface for scripting language Ruby -Group: Development/Languages -# Many files under ext/tk/sample/ are under TCL -License: (Ruby or GPLv2) and TCL -Requires: %{name}-libs = %{version}-%{release} - -%description tcltk -Tcl/Tk interface for the object-oriented scripting language Ruby. - - -%package irb +%package irb Summary: The Interactive Ruby Group: Development/Languages +# No isa specific Requires: %{name} = %{version}-%{release} Provides: irb = %{version}-%{release} -Obsoletes: irb <= %{version}-%{release} +Obsoletes: irb < %{version}-%{release} +BuildArch: noarch %description irb The irb is acronym for Interactive Ruby. It evaluates ruby expression from the terminal. -%package rdoc +%package rdoc Summary: A tool to generate documentation from Ruby source files Group: Development/Languages # generators/template/html/html.rb is under CC-BY License: (GPLv2 or Ruby) and CC-BY -## ruby-irb requires ruby -#Requires: %{name} = %{version}-%{release} +# No isa specific Requires: %{name}-irb = %{version}-%{release} Provides: rdoc = %{version}-%{release} -Obsoletes: rdoc <= %{version}-%{release} +Obsoletes: rdoc < %{version}-%{release} +BuildArch: noarch %description rdoc The rdoc is a tool to generate the documentation from Ruby source files. @@ -180,31 +142,17 @@ It supports some output formats, like HTML, Ruby interactive reference (ri), XML and Windows Help file (chm). -%package docs -Summary: Manuals and FAQs for scripting language Ruby -Group: Documentation - -%description docs -Manuals and FAQs for the object-oriented scripting language Ruby. - - -%package mode -Summary: Emacs Lisp for the scripting language Ruby -Group: Applications/Editors -Requires: emacs-common - -%description mode -Emacs Lisp ruby-mode for the object-oriented scripting language Ruby. - - -%package ri +%package ri Summary: Ruby interactive reference Group: Documentation ## ruby-irb requires ruby, which ruby-rdoc requires -#Requires: %{name} = %{version}-%{release} +#Requires: %%{name} = %%{version}-%%{release} +# No isa specific Requires: %{name}-rdoc = %{version}-%{release} Provides: ri = %{version}-%{release} -Obsoletes: ri <= %{version}-%{release} +Obsoletes: ri < %{version}-%{release} +# FIXME: Make ruby-ri really arch independent +# BuildArch: noarch # Currently commented out %description ri ri is a command line tool that displays descriptions of built-in @@ -212,50 +160,38 @@ Ruby methods, classes and modules. For methods, it shows you the calling sequence and a description. For classes and modules, it shows a synopsis along with a list of the methods the class or module implements. +## +## ruby-tcltk +## +%package tcltk +Summary: Tcl/Tk interface for scripting language Ruby +Group: Development/Languages +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description tcltk +Tcl/Tk interface for the object-oriented scripting language Ruby. %prep -%setup -q -c -a 2 -a 3 -a 100 -mkdir -p ruby-refm-ja -pushd ruby-refm-ja -tar fxz %{SOURCE1} -popd +%setup -q -c -a 100 pushd %{name}-%{arcver} - -( cd ext - mv tk .tk.old - cp -a ../../ruby-1.8-rev*/ext/tk tk - find tk -type d -name \.svn | sort -r | xargs rm -rf -) - -%patch1 -p1 -%patch20 -p1 -%patch21 -p1 -%ifarch ppc64 s390x sparc64 x86_64 -%patch22 -p1 %patch23 -p1 -%endif -#%%patch25 -p1 -#%%patch26 -p1 -%patch27 -p0 -%patch28 -p1 %patch29 -p1 -%patch30 -p2 -%patch31 -p1 -%patch32 -p0 %patch33 -p1 -# To apply patch34, patch39 part must once be reverted -%patch39 -p1 -R -%patch34 -p1 -%patch35 -p1 -%patch36 -p1 -%patch37 -p1 -%patch38 -p1 +%patch100 -p1 + +( + cd ext + rm -rf tk + cp -a ../../ext/tk tk + find tk -type d -name \.svn | sort -r | xargs rm -rf +) + popd %build pushd %{name}-%{arcver} for i in config.sub config.guess; do - test -f %{_datadir}/libtool/$i && cp %{_datadir}/libtool/$i . + test -f %{_datadir}/libtool/$i && cp -p %{_datadir}/libtool/$i . done autoconf @@ -264,35 +200,33 @@ export rb_cv_func_strtod # bug 489990 CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" - export CFLAGS + %configure \ - --with-sitedir='%{sitedir}' \ - --with-default-kcode=none \ - --with-bundled-sha1 \ - --with-bundled-md5 \ - --with-bundled-rmd160 \ - --enable-shared \ - --enable-ipv6 \ - --enable-pthread \ - --with-lookup-order-hack=INET \ - --disable-rpath \ -%if 0%{?fedora} >= 12 || 0%{?rhel} >= 6 - --with-readline-include=%{_includedir}/readline5 \ - --with-readline-lib=%{_libdir}/readline5 \ -%endif - --with-ruby-prefix=%{_prefix}/lib + --with-default-kcode=none \ + --enable-shared \ + --enable-pthread \ + --disable-rpath \ + --with-readline-include=%{_includedir}/readline5 \ + --with-readline-lib=%{_libdir}/readline5 \ + --with-sitedir='%{sitelibbase}' \ + --with-sitearchdir='%{sitearchbase}' \ + --with-vendordir='%{vendorlibbase}' \ + --with-vendorarchdir='%{vendorarchbase}' # For example ext/socket/extconf.rb uses try_run (for getaddrinfo test), # which executes conftest and setting LD_LIBRARY_PATH for libruby.so is # needed. export LD_LIBRARY_PATH=$(pwd) -make RUBY_INSTALL_NAME=ruby %{?_smp_mflags} COPY="cp -p" %{?_smp_mflags} +make RUBY_INSTALL_NAME=ruby \ + COPY="cp -p" \ + %{?_smp_mflags} %ifarch ia64 # Miscompilation? Buggy code? rm -f parse.o -make OPT=-O0 RUBY_INSTALL_NAME=ruby %{?_smp_mflags} +make OPT=-O0 RUBY_INSTALL_NAME=ruby \ + %{?_smp_mflags} %endif popd @@ -300,158 +234,115 @@ popd %check pushd %{name}-%{arcver} %ifarch ppc64 -make test || : +make test || true %else make test %endif popd %install -rm -rf $RPM_BUILD_ROOT - -mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir}/ruby-mode -mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir} - -# installing documents and exapmles... +# install documenation in tmp directory to be +# picked up by %%doc macros in %%files sections rm -rf tmp-ruby-docs mkdir tmp-ruby-docs -cd tmp-ruby-docs +pushd tmp-ruby-docs -# for ruby.rpm -mkdir ruby ruby-libs ruby-devel ruby-tcltk ruby-docs irb -cd ruby -(cd ../../%{name}-%{arcver} && tar cf - sample) | tar xvf - -cd .. +mkdir \ + ruby ruby-libs ruby-tcltk irb -# for ruby-libs +# First gather all samples +cp -a ../%{name}-%{arcver}/sample/ ruby +cp -a \ + ../%{name}-%{arcver}/lib/README* ../%{name}-%{arcver}/doc/ \ + ruby-libs +# Use tar to keep directory hierarchy cd ruby-libs -(cd ../../%{name}-%{arcver} && tar cf - lib/README*) | tar xf - -(cd ../../%{name}-%{arcver}/doc && tar cf - .) | tar xf - -(cd ../../%{name}-%{arcver} && - tar cf - `find ext \ - -mindepth 1 \ - \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ - \( -name '*.rb' -not -path '*/lib/*' -not -name extconf.rb \) -o \ - \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \)`) | tar xf - +( + cd ../../%{name}-%{arcver} ; \ + find ext \ + -mindepth 1 \ + \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ + \( -name '*.rb' -not -path '*/lib/*' -not -name extconf.rb \) -o \ + \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \) \ + \ + | xargs tar cf - +) \ + | tar xf - cd .. -# for irb -cd irb -mv ../ruby-libs/irb/* . -rmdir ../ruby-libs/irb -cd .. - -# for ruby-devel -cd ruby-devel - -cd .. - -# for ruby-tcltk -cd ruby-tcltk -for target in tcltklib tk -do - (cd ../ruby-libs && - tar cf - `find . -path "*/$target/*"`) | tar xf - - (cd ../ruby-libs && - rm -rf `find . -name "$target" -type d`) -done -cd .. - -# for ruby-docs -cd ruby-docs -mkdir refm-ja faq-en faq-ja -(cd ../../ruby-refm-ja && tar cf - .) | (cd refm-ja && tar xf -) -(cd ../../rubyfaq && tar cf - .) | (cd faq-en && tar xf -) -(cd ../../rubyfaq-jp && tar cf - .) | (cd faq-ja && tar xf -) - -(cd faq-ja && - for f in rubyfaq-jp*.html - do - sed -e 's/\(/dev/null || { iconv -f euc-jp -t utf-8 $i > $i.new && mv $i.new $i || status=1 ; } - if [ $status = 0 ]; then - if dirname $i | grep -q refm-ja ; then - sed -i -e '/encoding/s|EUC-JP|UTF-8|' -e '/charset/s|EUC-JP|UTF-8|' $i - fi - else - iconv -f iso8859-1 -t utf-8 $i > $.new && mv $i.new $i || rm -f $i.new - fi +# Fix shebang +grep -rl '#![ \t]*%{_prefix}/local/bin' . | \ + xargs sed -i -e 's|\(#![ \t]*\)%{_prefix}/local/bin|\1%{_bindir}|' +# Fix encoding +# Suppress message +set +x +find . -type f | while read f ; do + file $f | grep -q 'text' || continue + iconv -f UTF-8 -t UTF-8 $f &> /dev/null && continue + for encoding in \ + EUC-JP ISO-8859-1 + do + iconv -f $encoding -t UTF-8 $f -o $f.tmp 2>/dev/null && \ + { touch -r $f $f.tmp ; mv $f.tmp $f ; \ + echo -e "$f\t: converted from $encoding -t UTF-8" ; continue 2; } || \ + rm -f $f.tmp + done done +# Enable message +set -x -# fix Japanese encoding strings for ruby-tcltk/ext/tk/sample/ -pushd ruby-tcltk/ext/tk/ +# irb +mv ruby-libs/doc/irb/* irb +rm -rf ruby-libs/doc/irb + +# tcltk +mv ruby-libs/ext/tk/* ruby-tcltk/ +rmdir ruby-libs/ext/tk + +## Fix encodings +pushd ruby-tcltk cd sample find . -path ./demos-jp/\*.rb -or -path ./tkoptdb\*.rb -or -path ./msgs_rb2/ja.msg | \ - xargs sed -i -e 's|euc-jp|utf-8|' + xargs sed -i -e 's|euc-jp|utf-8|' sed -i \ - -e '/KCODE =/s|euc|utf-8|' -e 's|EUC-JP|UTF-8|' \ - demos-jp/widget + -e '/KCODE =/s|euc|utf-8|' -e 's|EUC-JP|UTF-8|' \ + demos-jp/widget cd .. sed -i -e 's|EUC-JP|UTF-8|' README.1st popd -# done -cd .. +# done w/ docs +popd # installing binaries ... -make -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} DESTDIR=$RPM_BUILD_ROOT install +make \ + -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} \ + DESTDIR=$RPM_BUILD_ROOT \ + install # generate ri doc rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} rm -rf %{name}-%{arcver}/.ext/rdoc -LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} RUBYLIB=$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}:$RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} make -C $rubybuilddir DESTDIR=$RPM_BUILD_ROOT install-doc -#DESTDIR=$RPM_BUILD_ROOT LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_bindir}/ruby -I $rubybuilddir -I $RPM_BUILD_ROOT%{_libdir}/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/ -I $rubybuilddir/lib $RPM_BUILD_ROOT%{_bindir}/rdoc --all --ri-system $rubybuilddir +env \ + LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} \ + RUBYLIB=$RPM_BUILD_ROOT%{vendorarchbase}/%{rubyxver}:$RPM_BUILD_ROOT%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} \ + make \ + -C $rubybuilddir DESTDIR=$RPM_BUILD_ROOT \ + install-doc -mkdir -p $RPM_BUILD_ROOT%{sitedir2}/%{rubyxver} -mkdir -p $RPM_BUILD_ROOT%{sitedir}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} - -# XXX: installing irb -install -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/ - -# installing ruby-mode -cd %{name}-%{arcver} -cp -p misc/*.el $RPM_BUILD_ROOT%{_emacs_sitelispdir}/ruby-mode - -## for ruby-mode -pushd $RPM_BUILD_ROOT%{_emacs_sitelispdir}/ruby-mode -cat < path.el -(setq load-path (cons "." load-path) byte-compile-warnings nil) -EOF -emacs --no-site-file -q -batch -l path.el -f batch-byte-compile *.el -rm -f path.el* -popd -install -p -m 644 %{SOURCE10} \ - $RPM_BUILD_ROOT%{_emacs_sitestartdir} - -cd .. +mkdir -p $RPM_BUILD_ROOT%{sitelibbase}/%{rubyxver} +mkdir -p $RPM_BUILD_ROOT%{sitearchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} # remove shebang -for i in $RPM_BUILD_ROOT%{_prefix}/lib/ruby/1.8/{abbrev,generator,irb/{cmd/subirb,ext/save-history},matrix,rdoc/{markup/sample/rdoc2latex,parsers/parse_rb},set,tsort}.rb; do +for i in \ + $RPM_BUILD_ROOT%{vendorlibbase}/1.8/{abbrev,generator,irb/{cmd/subirb,ext/save-history},matrix,rdoc/{markup/sample/rdoc2latex,parsers/parse_rb},set,tsort}.rb; \ + do sed -i -e '/^#!.*/,1D' $i done +chmod 0644 $RPM_BUILD_ROOT%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/*.h find $RPM_BUILD_ROOT/ -name "*.so" -exec chmod 755 {} \; @@ -464,182 +355,195 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc %{name}-%{arcver}/NEWS -%doc %{name}-%{arcver}/README -%lang(ja) %doc %{name}-%{arcver}/README.ja -%doc %{name}-%{arcver}/ToDo -%doc %{name}-%{arcver}/doc/ChangeLog-1.8.0 -%doc %{name}-%{arcver}/doc/NEWS-1.8.0 -%doc tmp-ruby-docs/ruby/* +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%doc %{name}-%{arcver}/NEWS +%doc %{name}-%{arcver}/README +%lang(ja) %doc %{name}-%{arcver}/README.ja +%doc %{name}-%{arcver}/ToDo +%doc tmp-ruby-docs/ruby/* %{_bindir}/ruby %{_bindir}/erb %{_bindir}/testrb %{_mandir}/man1/ruby.1* -%files devel +%files devel %defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc %{name}-%{arcver}/README.EXT -%lang(ja) %doc %{name}-%{arcver}/README.EXT.ja +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%doc %{name}-%{arcver}/README.EXT +%lang(ja) %doc %{name}-%{arcver}/README.EXT.ja %{_libdir}/libruby.so -#%%{_libdir}/libruby-static.a -%{_libdir}/ruby/%{rubyxver}/*/*.h +%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/*.h -%files static +%files static %defattr(-, root, root, -) %{_libdir}/libruby-static.a -%files libs +%files libs %defattr(-, root, root, -) %doc %{name}-%{arcver}/README -%lang(ja) %doc %{name}-%{arcver}/README.ja -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%dir %{_prefix}/lib/ruby -%dir %{_prefix}/lib/ruby/%{rubyxver} -%ifnarch ppc64 s390x sparc64 x86_64 -%if "%{_gnu}" == "-gnueabi" -%dir %{_prefix}/lib/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os}-eabi -%else -%dir %{_prefix}/lib/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} -%endif -%endif +%lang(ja) %doc %{name}-%{arcver}/README.ja +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%doc tmp-ruby-docs/ruby-libs/* +%dir %{vendorlibbase} +%dir %{vendorlibbase}/%{rubyxver} +%{sitelibbase} %ifarch ppc64 s390x sparc64 x86_64 -%dir %{_libdir}/ruby -%dir %{_libdir}/ruby/%{rubyxver} -%dir %{_libdir}/ruby/%{rubyxver}/%{_normalized_cpu}-%{_target_os} -%{sitedir} +%dir %{vendorarchbase} +%dir %{vendorarchbase}/%{rubyxver} +%{sitearchbase} %endif -%{sitedir2} ## the following files should goes into ruby-tcltk package. -%exclude %{_prefix}/lib/ruby/%{rubyxver}/*tk.rb -%exclude %{_prefix}/lib/ruby/%{rubyxver}/tcltk.rb -%exclude %{_prefix}/lib/ruby/%{rubyxver}/tk -%exclude %{_prefix}/lib/ruby/%{rubyxver}/tk*.rb -%exclude %{_prefix}/lib/ruby/%{rubyxver}/tkextlib -%exclude %{_libdir}/ruby/%{rubyxver}/*/tcltklib.so -%exclude %{_libdir}/ruby/%{rubyxver}/*/tkutil.so +%exclude %{vendorlibbase}/%{rubyxver}/*tk.rb +%exclude %{vendorlibbase}/%{rubyxver}/tcltk.rb +%exclude %{vendorlibbase}/%{rubyxver}/tk +%exclude %{vendorlibbase}/%{rubyxver}/tk*.rb +%exclude %{vendorlibbase}/%{rubyxver}/tkextlib +%exclude %{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/tcltklib.so +%exclude %{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/tkutil.so ## the following files should goes into ruby-rdoc package. -%exclude %{_prefix}/lib/ruby/%{rubyxver}/rdoc +%exclude %{vendorlibbase}/%{rubyxver}/rdoc ## the following files should goes into ruby-irb package. -%exclude %{_prefix}/lib/ruby/%{rubyxver}/irb.rb -%exclude %{_prefix}/lib/ruby/%{rubyxver}/irb +%exclude %{vendorlibbase}/%{rubyxver}/irb.rb +%exclude %{vendorlibbase}/%{rubyxver}/irb ## files in ruby-libs from here -%{_prefix}/lib/ruby/%{rubyxver}/*.rb -%{_prefix}/lib/ruby/%{rubyxver}/bigdecimal -%{_prefix}/lib/ruby/%{rubyxver}/cgi -%{_prefix}/lib/ruby/%{rubyxver}/date -%{_prefix}/lib/ruby/%{rubyxver}/digest -%{_prefix}/lib/ruby/%{rubyxver}/dl -%{_prefix}/lib/ruby/%{rubyxver}/drb -%{_prefix}/lib/ruby/%{rubyxver}/io -%{_prefix}/lib/ruby/%{rubyxver}/net -%{_prefix}/lib/ruby/%{rubyxver}/openssl -%{_prefix}/lib/ruby/%{rubyxver}/optparse -%{_prefix}/lib/ruby/%{rubyxver}/racc -%{_prefix}/lib/ruby/%{rubyxver}/rexml -%{_prefix}/lib/ruby/%{rubyxver}/rinda -%{_prefix}/lib/ruby/%{rubyxver}/rss -%{_prefix}/lib/ruby/%{rubyxver}/runit -%{_prefix}/lib/ruby/%{rubyxver}/shell -%{_prefix}/lib/ruby/%{rubyxver}/soap -%{_prefix}/lib/ruby/%{rubyxver}/test -%{_prefix}/lib/ruby/%{rubyxver}/uri -%{_prefix}/lib/ruby/%{rubyxver}/webrick -%{_prefix}/lib/ruby/%{rubyxver}/wsdl -%{_prefix}/lib/ruby/%{rubyxver}/xmlrpc -%{_prefix}/lib/ruby/%{rubyxver}/xsd -%{_prefix}/lib/ruby/%{rubyxver}/yaml +%{vendorlibbase}/%{rubyxver}/*.rb +%{vendorlibbase}/%{rubyxver}/bigdecimal +%{vendorlibbase}/%{rubyxver}/cgi +%{vendorlibbase}/%{rubyxver}/date +%{vendorlibbase}/%{rubyxver}/digest +%{vendorlibbase}/%{rubyxver}/dl +%{vendorlibbase}/%{rubyxver}/drb +%{vendorlibbase}/%{rubyxver}/io +%{vendorlibbase}/%{rubyxver}/net +%{vendorlibbase}/%{rubyxver}/openssl +%{vendorlibbase}/%{rubyxver}/optparse +%{vendorlibbase}/%{rubyxver}/racc +%{vendorlibbase}/%{rubyxver}/rexml +%{vendorlibbase}/%{rubyxver}/rinda +%{vendorlibbase}/%{rubyxver}/rss +%{vendorlibbase}/%{rubyxver}/runit +%{vendorlibbase}/%{rubyxver}/shell +%{vendorlibbase}/%{rubyxver}/soap +%{vendorlibbase}/%{rubyxver}/test +%{vendorlibbase}/%{rubyxver}/uri +%{vendorlibbase}/%{rubyxver}/webrick +%{vendorlibbase}/%{rubyxver}/wsdl +%{vendorlibbase}/%{rubyxver}/xmlrpc +%{vendorlibbase}/%{rubyxver}/xsd +%{vendorlibbase}/%{rubyxver}/yaml %{_libdir}/libruby.so.* -%{_libdir}/ruby/%{rubyxver}/*/*.so -%{_libdir}/ruby/%{rubyxver}/*/digest -%{_libdir}/ruby/%{rubyxver}/*/io -%{_libdir}/ruby/%{rubyxver}/*/racc -%{_libdir}/ruby/%{rubyxver}/*/rbconfig.rb +%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/*.so +%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/digest +%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/io +%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/racc +%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/rbconfig.rb %files tcltk %defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc tmp-ruby-docs/ruby-tcltk/ext/* -%{_prefix}/lib/ruby/%{rubyxver}/*-tk.rb -%{_prefix}/lib/ruby/%{rubyxver}/tcltk.rb -%{_prefix}/lib/ruby/%{rubyxver}/tk -%{_prefix}/lib/ruby/%{rubyxver}/tk*.rb -%{_prefix}/lib/ruby/%{rubyxver}/tkextlib -%{_libdir}/ruby/%{rubyxver}/*/tcltklib.so -%{_libdir}/ruby/%{rubyxver}/*/tkutil.so +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%doc tmp-ruby-docs/ruby-tcltk/* +%{vendorlibbase}/%{rubyxver}/*-tk.rb +%{vendorlibbase}/%{rubyxver}/tcltk.rb +%{vendorlibbase}/%{rubyxver}/tk +%{vendorlibbase}/%{rubyxver}/tk*.rb +%{vendorlibbase}/%{rubyxver}/tkextlib +%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/tcltklib.so +%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/tkutil.so -%files rdoc +%files rdoc %defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL %{_bindir}/rdoc -%{_prefix}/lib/ruby/%{rubyxver}/rdoc +%{vendorlibbase}/%{rubyxver}/rdoc %files irb %defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc tmp-ruby-docs/irb/* +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL +%doc tmp-ruby-docs/irb/* %{_bindir}/irb -%{_prefix}/lib/ruby/%{rubyxver}/irb.rb -%{_prefix}/lib/ruby/%{rubyxver}/irb -%{_mandir}/man1/irb.1* +%{vendorlibbase}/%{rubyxver}/irb.rb +%{vendorlibbase}/%{rubyxver}/irb %files ri %defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL +%doc %{name}-%{arcver}/COPYING* +%doc %{name}-%{arcver}/ChangeLog +%doc %{name}-%{arcver}/GPL +%doc %{name}-%{arcver}/LEGAL +%doc %{name}-%{arcver}/LGPL %{_bindir}/ri %{_datadir}/ri -%files docs -%defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc tmp-ruby-docs/ruby-docs/* -%doc tmp-ruby-docs/ruby-libs/* - -%files mode -%defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc %{name}-%{arcver}/misc/README -%{_emacs_sitelispdir}/ruby-mode -%{_emacs_sitestartdir}/ruby-mode-init.el - %changelog +* Mon Jul 26 2010 Mamoru Tasaka - 1.8.7.299-4 +- Cleanup spec file +- Make -irb, -rdoc subpackage noarch +- Make dependencies between arch-dependent subpackages isa specific +- Improve sample documentation gathering + +* Mon Jul 12 2010 Mohammed Morsi - 1.8.7.299-3 +- updated packaged based on feedback (from mtasaka) +- added comments to all patches / sources +- obsoleted ruby-mode, as it's now provided by the emacs package itself +- readded missing documentation +- various small compatability/regression fixes + +* Tue Jul 06 2010 Mohammed Morsi - 1.8.7.299-2 +- readded bits to pull tk package from upstream source branch +- removed unecessary .tk.old dir +- renamed macros which may cause confusion, removed unused ones + +* Thu Jun 24 2010 Mohammed Morsi - 1.8.7.299-1 +- integrate more of jmeyering's and mtaska's feedback +- removed emacs bits that are now shipped with the emacs package +- various patch and spec cleanup +- rebased to ruby 1.8.7 patch 299, removed patches no longer needed: + ruby-1.8.7-openssl-1.0.patch, ruby-1.8.7-rb_gc_guard_ptr-optimization.patch + +* Wed Jun 23 2010 Mohammed Morsi - 1.8.7.249-5 +- Various fixes + +* Wed Jun 23 2010 Mohammed Morsi - 1.8.7.249-4 +- Fixed incorrect paths in 1.8.7 rpm + +* Tue Jun 22 2010 Mohammed Morsi - 1.8.7.249-3 +- Integrated Jim Meyering's feedback and changes in to: +- remove trailing blanks +- placate rpmlint +- ruby_* definitions: do not use trailing slashes in directory names +- _normalized_cpu: simplify definition + +* Mon Jun 21 2010 Mohammed Morsi - 1.8.7.249-2 +- Integrate mtasaka's feedback and changes +- patch101 ruby_1_8_7-rb_gc_guard_ptr-optimization.patch + +* Tue Jun 15 2010 Mohammed Morsi - 1.8.7.249-1 +- Initial Ruby 1.8.7 specfile + * Wed May 19 2010 Mamoru Tasaka - 1.8.6.399-5 - Retry for bug 559158, Simplify the OpenSSL::Digest class pull more change commits from ruby_1_8 branch @@ -709,7 +613,7 @@ rm -rf $RPM_BUILD_ROOT * Thu Jul 23 2009 Mamoru Tasaka - 1.8.6.369-2 - Make sure that readline.so is linked against readline 5 because - Ruby is under GPLv2 + Ruby is under GPLv2 * Sat Jun 20 2009 Jeroen van Meeuwen - 1.8.6.369-1 - New patchlevel fixing CVE-2009-1904 diff --git a/ruby_1_8_7-gc-open4_096segv.patch b/ruby_1_8_7-gc-open4_096segv.patch deleted file mode 100644 index 4514022..0000000 --- a/ruby_1_8_7-gc-open4_096segv.patch +++ /dev/null @@ -1,351 +0,0 @@ -Index: ruby_1_8_7/marshal.c -=================================================================== ---- ruby_1_8_7/marshal.c (revision 26075) -+++ ruby_1_8_7/marshal.c (revision 26076) -@@ -85,12 +85,10 @@ - static ID s_getc, s_read, s_write, s_binmode; - - struct dump_arg { -- VALUE obj; - VALUE str, dest; - st_table *symbols; - st_table *data; - int taint; -- VALUE wrapper; - }; - - struct dump_call_arg { -@@ -104,22 +102,32 @@ - struct dump_arg *arg; - ID sym; - { -- if (!DATA_PTR(arg->wrapper)) { -+ if (!arg->symbols) { - rb_raise(rb_eRuntimeError, "Marshal.dump reentered at %s", - rb_id2name(sym)); - } - } - -+static void clear_dump_arg _((struct dump_arg *arg)); -+ - static void - mark_dump_arg(ptr) - void *ptr; - { - struct dump_arg *p = ptr; -- if (!ptr) -+ if (!p->symbols) - return; - rb_mark_set(p->data); - } - -+static void -+free_dump_arg(ptr) -+ void *ptr; -+{ -+ clear_dump_arg(ptr); -+ xfree(ptr); -+} -+ - static VALUE - class2path(klass) - VALUE klass; -@@ -699,32 +707,17 @@ - } - } - --static VALUE --dump(arg) -- struct dump_call_arg *arg; --{ -- w_object(arg->obj, arg->arg, arg->limit); -- if (arg->arg->dest) { -- rb_io_write(arg->arg->dest, arg->arg->str); -- rb_str_resize(arg->arg->str, 0); -- } -- return 0; --} -- --static VALUE --dump_ensure(arg) -+static void -+clear_dump_arg(arg) - struct dump_arg *arg; - { -- if (!DATA_PTR(arg->wrapper)) return 0; -+ if (!arg->symbols) return; - st_free_table(arg->symbols); -+ arg->symbols = 0; - st_free_table(arg->data); -- DATA_PTR(arg->wrapper) = 0; -- arg->wrapper = 0; - if (arg->taint) { - OBJ_TAINT(arg->str); - } -- -- return 0; - } - - /* -@@ -760,8 +753,8 @@ - { - VALUE obj, port, a1, a2; - int limit = -1; -- struct dump_arg arg; -- struct dump_call_arg c_arg; -+ struct dump_arg *arg; -+ VALUE wrapper; - - port = Qnil; - rb_scan_args(argc, argv, "12", &obj, &a1, &a2); -@@ -775,37 +768,40 @@ - else if (NIL_P(a1)) goto type_error; - else port = a1; - } -- arg.dest = 0; -- arg.symbols = st_init_numtable(); -- arg.data = st_init_numtable(); -- arg.taint = Qfalse; -- arg.str = rb_str_buf_new(0); -- RBASIC(arg.str)->klass = 0; -- arg.wrapper = Data_Wrap_Struct(rb_cData, mark_dump_arg, 0, &arg); -+ wrapper = Data_Make_Struct(rb_cData, struct dump_arg, mark_dump_arg, free_dump_arg, arg); -+ arg->dest = 0; -+ arg->symbols = st_init_numtable(); -+ arg->data = st_init_numtable(); -+ arg->taint = Qfalse; -+ arg->str = rb_str_buf_new(0); -+ RBASIC(arg->str)->klass = 0; - if (!NIL_P(port)) { - if (!rb_respond_to(port, s_write)) { - type_error: - rb_raise(rb_eTypeError, "instance of IO needed"); - } -- arg.dest = port; -+ arg->dest = port; - if (rb_respond_to(port, s_binmode)) { - rb_funcall2(port, s_binmode, 0, 0); -- check_dump_arg(&arg, s_binmode); -+ check_dump_arg(arg, s_binmode); - } - } - else { -- port = arg.str; -+ port = arg->str; - } - -- c_arg.obj = obj; -- c_arg.arg = &arg; -- c_arg.limit = limit; -+ w_byte(MARSHAL_MAJOR, arg); -+ w_byte(MARSHAL_MINOR, arg); - -- w_byte(MARSHAL_MAJOR, &arg); -- w_byte(MARSHAL_MINOR, &arg); -+ w_object(obj, arg, limit); -+ if (arg->dest) { -+ rb_io_write(arg->dest, arg->str); -+ rb_str_resize(arg->str, 0); -+ } - -- rb_ensure(dump, (VALUE)&c_arg, dump_ensure, (VALUE)&arg); -- RBASIC(arg.str)->klass = rb_cString; -+ RBASIC(arg->str)->klass = rb_cString; -+ clear_dump_arg(arg); -+ RB_GC_GUARD(wrapper); - - return port; - } -@@ -817,7 +813,6 @@ - st_table *data; - VALUE proc; - int taint; -- VALUE wrapper; - }; - - static void -@@ -825,22 +820,31 @@ - struct load_arg *arg; - ID sym; - { -- if (!DATA_PTR(arg->wrapper)) { -+ if (!arg->symbols) { - rb_raise(rb_eRuntimeError, "Marshal.load reentered at %s", - rb_id2name(sym)); - } - } - -+static void clear_load_arg _((struct load_arg *arg)); -+ - static void - mark_load_arg(ptr) - void *ptr; - { - struct load_arg *p = ptr; -- if (!ptr) -+ if (!p->symbols) - return; - rb_mark_tbl(p->data); - } - -+static void -+free_load_arg(void *ptr) -+{ -+ clear_load_arg(ptr); -+ xfree(ptr); -+} -+ - static VALUE r_object _((struct load_arg *arg)); - - static int -@@ -1415,23 +1419,14 @@ - return r_object0(arg, arg->proc, 0, Qnil); - } - --static VALUE --load(arg) -+static void -+clear_load_arg(arg) - struct load_arg *arg; - { -- return r_object(arg); --} -- --static VALUE --load_ensure(arg) -- struct load_arg *arg; --{ -- if (!DATA_PTR(arg->wrapper)) return 0; -+ if (!arg->symbols) return; - st_free_table(arg->symbols); -+ arg->symbols = 0; - st_free_table(arg->data); -- DATA_PTR(arg->wrapper) = 0; -- arg->wrapper = 0; -- return 0; - } - - /* -@@ -1451,35 +1446,37 @@ - VALUE *argv; - { - VALUE port, proc; -- int major, minor; -- VALUE v; -- struct load_arg arg; -+ int major, minor, taint = Qfalse; -+ VALUE v, wrapper; -+ struct load_arg *arg; - - rb_scan_args(argc, argv, "11", &port, &proc); - v = rb_check_string_type(port); - if (!NIL_P(v)) { -- arg.taint = OBJ_TAINTED(port); /* original taintedness */ -+ taint = OBJ_TAINTED(port); /* original taintedness */ - port = v; - } - else if (rb_respond_to(port, s_getc) && rb_respond_to(port, s_read)) { - if (rb_respond_to(port, s_binmode)) { - rb_funcall2(port, s_binmode, 0, 0); - } -- arg.taint = Qtrue; -+ taint = Qtrue; - } - else { - rb_raise(rb_eTypeError, "instance of IO needed"); - } -- arg.src = port; -- arg.offset = 0; -- arg.symbols = st_init_numtable(); -- arg.data = st_init_numtable(); -- arg.proc = 0; -- arg.wrapper = Data_Wrap_Struct(rb_cData, mark_load_arg, 0, &arg); -+ wrapper = Data_Make_Struct(rb_cData, struct load_arg, mark_load_arg, free_load_arg, arg); -+ arg->src = port; -+ arg->offset = 0; -+ arg->symbols = st_init_numtable(); -+ arg->data = st_init_numtable(); -+ arg->proc = 0; -+ arg->taint = taint; - -- major = r_byte(&arg); -- minor = r_byte(&arg); -+ major = r_byte(arg); -+ minor = r_byte(arg); - if (major != MARSHAL_MAJOR || minor > MARSHAL_MINOR) { -+ clear_load_arg(arg); - rb_raise(rb_eTypeError, "incompatible marshal file format (can't be read)\n\ - \tformat version %d.%d required; %d.%d given", - MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); -@@ -1490,8 +1487,10 @@ - MARSHAL_MAJOR, MARSHAL_MINOR, major, minor); - } - -- if (!NIL_P(proc)) arg.proc = proc; -- v = rb_ensure(load, (VALUE)&arg, load_ensure, (VALUE)&arg); -+ if (!NIL_P(proc)) arg->proc = proc; -+ v = r_object(arg); -+ clear_load_arg(arg); -+ RB_GC_GUARD(wrapper); - - return v; - } -Index: ruby_1_8_7/test/ruby/test_marshal.rb -=================================================================== ---- ruby_1_8_7/test/ruby/test_marshal.rb (revision 26075) -+++ ruby_1_8_7/test/ruby/test_marshal.rb (revision 26076) -@@ -71,4 +71,41 @@ - } - assert_equal("marshal data too short", e.message) - end -+ -+ class DumpTest -+ def marshal_dump -+ loop { Thread.pass } -+ end -+ end -+ -+ class LoadTest -+ def marshal_dump -+ nil -+ end -+ def marshal_load(obj) -+ loop { Thread.pass } -+ end -+ end -+ -+ def test_context_switch -+ o = DumpTest.new -+ Thread.new { Marshal.dump(o) } -+ GC.start -+ assert(true, '[ruby-dev:39425]') -+ -+ o = LoadTest.new -+ m = Marshal.dump(o) -+ Thread.new { Marshal.load(m) } -+ GC.start -+ assert(true, '[ruby-dev:39425]') -+ end -+ -+ def test_taint -+ x = Object.new -+ x.taint -+ s = Marshal.dump(x) -+ assert_equal(true, s.tainted?) -+ y = Marshal.load(s) -+ assert_equal(true, y.tainted?) -+ end - end -Index: ruby_1_8_7/ruby.h -=================================================================== ---- ruby_1_8_7/ruby.h (revision 16014) -+++ ruby_1_8_7/ruby.h (revision 16015) -@@ -224,6 +224,8 @@ - - #define TYPE(x) rb_type((VALUE)(x)) - -+#define RB_GC_GUARD(v) (*(volatile VALUE *)&(v)) -+ - void rb_check_type _((VALUE,int)); - #define Check_Type(v,t) rb_check_type((VALUE)(v),t) - diff --git a/sources b/sources index b1ee168..bc9abd7 100644 --- a/sources +++ b/sources @@ -1,6 +1,2 @@ -f26cefbc8ab6728650ab9ae773d22bcb ruby-1.8.6-p388.tar.bz2 -b6dd396f513efeb7864685c840f9643a ruby-refm-rdp-1.8.2-ja-html.tar.gz -634c25b14e19925d10af3720d72e8741 rubyfaq-990927.tar.gz -4fcec898f51d8371cc42d0a013940469 rubyfaq-jp-990927.tar.gz -f77c307cb72fb8808b0e85af5d05cefc ruby-1.8.6-p399.tar.bz2 -6a8313c73087513f24e52d8cee5b3804 ruby-1.8-rev27738_trunk-ext_tk.tar.gz +244439a87d75ab24170a9c2b451ce351 ruby-1.8.7-p299.tar.bz2 +b49ba42587b06e5f23501456e29a6d18 ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz From eaf2933aa8e2e0a258cbd8290f6f956e0250d1a9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 11:44:14 +0000 Subject: [PATCH 167/529] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 9 --------- 3 files changed, 30 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 9141959..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: ruby -# $Id: Makefile,v 1.2 2007/10/15 19:21:20 notting Exp $ -NAME := ruby -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index 0f3c183..0000000 --- a/import.log +++ /dev/null @@ -1,9 +0,0 @@ -ruby-1_8_6_287-4_fc10:HEAD:ruby-1.8.6.287-4.fc10.src.rpm:1237096558 -ruby-1_8_6_287-5_fc10:HEAD:ruby-1.8.6.287-5.fc10.src.rpm:1237096677 -ruby-1_8_6_287-7_fc11:HEAD:ruby-1.8.6.287-7.fc11.src.rpm:1237351812 -ruby-1_8_6_368-1_fc11:HEAD:ruby-1.8.6.368-1.fc11.src.rpm:1243759307 -ruby-1_8_6_368-2_fc11:HEAD:ruby-1.8.6.368-2.fc11.src.rpm:1245520186 -ruby-1_8_6_369-1_fc11:HEAD:ruby-1.8.6.369-1.fc11.src.rpm:1245760717 -ruby-1_8_6_388-6_fc12:HEAD:ruby-1.8.6.388-6.fc12.src.rpm:1264032880 -ruby-1_8_6_388-7_fc12:HEAD:ruby-1.8.6.388-7.fc12.src.rpm:1264596030 -ruby-1_8_6_388-8_fc12:HEAD:ruby-1.8.6.388-8.fc12.src.rpm:1264601829 From cd6ff90af529953429e42396a3af2e6dbba0f7df Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Mon, 2 Aug 2010 02:37:54 +0900 Subject: [PATCH 168/529] * Mon Aug 2 2010 Mamoru Tasaka - 1.8.7.299-5 - More cleanup of spec file, expecially for rpmlint issue - build ri files in %build --- ruby.spec | 38 ++++++++++++++++++++++++-------------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/ruby.spec b/ruby.spec index 144339d..cc8af8f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -16,7 +16,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 4%{?dist} +Release: 5%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -229,6 +229,14 @@ make OPT=-O0 RUBY_INSTALL_NAME=ruby \ %{?_smp_mflags} %endif +# Generate ri doc +rm -rf .ext/rdoc +rm -rf ./RI_TMPDIR +mkdir ./RI_TMPDIR +make \ + DESTDIR=$(pwd)/RI_TMPDIR \ + install-doc + popd %check @@ -261,9 +269,9 @@ cd ruby-libs cd ../../%{name}-%{arcver} ; \ find ext \ -mindepth 1 \ - \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ + \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ \( -name '*.rb' -not -path '*/lib/*' -not -name extconf.rb \) -o \ - \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \) \ + \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \) \ \ | xargs tar cf - ) \ @@ -275,7 +283,10 @@ find -type f | xargs chmod 0644 # Fix shebang grep -rl '#![ \t]*%{_prefix}/local/bin' . | \ - xargs sed -i -e 's|\(#![ \t]*\)%{_prefix}/local/bin|\1%{_bindir}|' + xargs sed -i -e '1s|\(#![ \t]*\)%{_prefix}/local/bin|\1%{_bindir}|' +grep -rl '#![ \t]*\./ruby' . | \ + xargs sed -i -e '1s|\(#![ \t]*\)\./ruby|%{_bindir}/ruby|' + # Fix encoding # Suppress message set +x @@ -323,25 +334,20 @@ make \ DESTDIR=$RPM_BUILD_ROOT \ install -# generate ri doc -rubybuilddir=$RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} -rm -rf %{name}-%{arcver}/.ext/rdoc -env \ - LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} \ - RUBYLIB=$RPM_BUILD_ROOT%{vendorarchbase}/%{rubyxver}:$RPM_BUILD_ROOT%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} \ - make \ - -C $rubybuilddir DESTDIR=$RPM_BUILD_ROOT \ - install-doc +# install ri doc +cp -a ./%{name}-%{arcver}/RI_TMPDIR/* $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{sitelibbase}/%{rubyxver} mkdir -p $RPM_BUILD_ROOT%{sitearchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} # remove shebang for i in \ - $RPM_BUILD_ROOT%{vendorlibbase}/1.8/{abbrev,generator,irb/{cmd/subirb,ext/save-history},matrix,rdoc/{markup/sample/rdoc2latex,parsers/parse_rb},set,tsort}.rb; \ + $RPM_BUILD_ROOT%{vendorlibbase}/%{rubyxver}/{abbrev,generator,irb/{cmd/subirb,ext/save-history},matrix,rdoc/{markup/sample/rdoc2latex,parsers/parse_rb},set,tsort}.rb; \ do sed -i -e '/^#!.*/,1D' $i done +# The following can be executable +chmod 0755 $RPM_BUILD_ROOT%{vendorlibbase}/%{rubyxver}/tkextlib/pkg_checker.rb chmod 0644 $RPM_BUILD_ROOT%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/*.h find $RPM_BUILD_ROOT/ -name "*.so" -exec chmod 755 {} \; @@ -499,6 +505,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Mon Aug 2 2010 Mamoru Tasaka - 1.8.7.299-5 +- More cleanup of spec file, expecially for rpmlint issue +- build ri files in %%build + * Mon Jul 26 2010 Mamoru Tasaka - 1.8.7.299-4 - Cleanup spec file - Make -irb, -rdoc subpackage noarch From 1f8d8f93ae03337725b74738f021196344700ccc Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Mon, 23 Aug 2010 02:26:59 +0900 Subject: [PATCH 169/529] - Update to 1.8.7.302 - CVE-2010-0541 (bug 587731) is fixed in this version - Update ext/tk to the latest head --- .gitignore | 2 ++ ruby.spec | 12 +++++++++--- sources | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 89ca5b2..8c2f352 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ ruby-1.8.7-p299.tar.bz2 ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz +/ruby-1.8.7-p302.tar.bz2 +/ruby-rev54f344095916f83a2755a177f94e65a1c390a612-ext_tk.tar.gz diff --git a/ruby.spec b/ruby.spec index cc8af8f..bc837f5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global rubyxver 1.8 %global rubyver 1.8.7 -%global _patchlevel 299 +%global _patchlevel 302 %global dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %global patchlevel %{?_patchlevel:-p%{_patchlevel}} @@ -12,11 +12,12 @@ %{!?sitearchbase: %global sitearchbase %{vendorarchbase}/site_ruby} %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/') -%global ruby_tk_git_revision 415a3ef9ab82c65a7abc +# Sun Aug 22 15:24:07 2010 +0000 +%global ruby_tk_git_revision 54f344095916f83a2755a177f94e65a1c390a612 Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 5%{?dist} +Release: 1%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -505,6 +506,11 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Mon Aug 23 2010 Mamoru Tasaka - 1.8.7.302-1 +- Update to 1.8.7.302 +- CVE-2010-0541 (bug 587731) is fixed in this version +- Update ext/tk to the latest head + * Mon Aug 2 2010 Mamoru Tasaka - 1.8.7.299-5 - More cleanup of spec file, expecially for rpmlint issue - build ri files in %%build diff --git a/sources b/sources index bc9abd7..f5fb30a 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -244439a87d75ab24170a9c2b451ce351 ruby-1.8.7-p299.tar.bz2 -b49ba42587b06e5f23501456e29a6d18 ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz +a6a9e37079ed8cf8726b455dad3de939 ruby-1.8.7-p302.tar.bz2 +8f0b8b855f6b18592ac7a76a73c8ec6c ruby-rev54f344095916f83a2755a177f94e65a1c390a612-ext_tk.tar.gz From 8a9a71d5bdaecc0071cc2b5308e53880b5897b78 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 4 Nov 2010 04:25:56 +0900 Subject: [PATCH 170/529] - Avoid multilib conflict on -libs subpackage (bug 649174) --- ruby.spec | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index bc837f5..ae34854 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,7 +17,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -230,6 +230,22 @@ make OPT=-O0 RUBY_INSTALL_NAME=ruby \ %{?_smp_mflags} %endif +# Avoid multilib conflict on -libs (bug 649174) +# Maybe dlconfig.rb is unneeded anyway, however for now moving +# dlconfig.rb and add wrapper (need checking) +CONFIGARCH=$(./miniruby -rrbconfig -e "puts Config::CONFIG['arch']") +[ -z "$CONFIGARCH" ] && exit 1 +pushd ext/dl +mkdir $CONFIGARCH +mv dlconfig.rb $CONFIGARCH/ +cat > dlconfig.rb < - 1.8.7.302-2 +- Avoid multilib conflict on -libs subpackage (bug 649174) + * Mon Aug 23 2010 Mamoru Tasaka - 1.8.7.302-1 - Update to 1.8.7.302 - CVE-2010-0541 (bug 587731) is fixed in this version From ca286f57ff04964b32aebd47f40b0d81fd5b0ef0 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 26 Dec 2010 03:12:28 +0900 Subject: [PATCH 171/529] - Update to 1.8.7 p330 - ext/tk updated to the newest header --- .gitignore | 2 ++ ruby-1.8.7-p330-multilib.patch | 33 +++++++++++++++++++++++++++++++++ ruby.spec | 14 +++++++++----- sources | 4 ++-- 4 files changed, 46 insertions(+), 7 deletions(-) create mode 100644 ruby-1.8.7-p330-multilib.patch diff --git a/.gitignore b/.gitignore index 8c2f352..543c5bd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ ruby-1.8.7-p299.tar.bz2 ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.8.7-p302.tar.bz2 /ruby-rev54f344095916f83a2755a177f94e65a1c390a612-ext_tk.tar.gz +/ruby-1.8.7-p330.tar.bz2 +/ruby-revf30eca26639ce538339bc488c7ed1fd397b0c13f-ext_tk.tar.gz diff --git a/ruby-1.8.7-p330-multilib.patch b/ruby-1.8.7-p330-multilib.patch new file mode 100644 index 0000000..481e6a8 --- /dev/null +++ b/ruby-1.8.7-p330-multilib.patch @@ -0,0 +1,33 @@ +--- ruby-1.8.7-p330/mkconfig.rb.multilib 2010-11-24 16:38:41.000000000 +0900 ++++ ruby-1.8.7-p330/mkconfig.rb 2010-12-26 02:16:32.000000000 +0900 +@@ -40,6 +40,7 @@ + has_patchlevel = false + continued_name = nil + continued_line = nil ++lib_64 = '' + File.foreach "config.status" do |line| + next if /^#/ =~ line + name = nil +@@ -102,13 +103,21 @@ + when "PATCHLEVEL" + has_patchlevel = true + end ++ ++ # If the target architecture is one of the following, ++ # ppc64 s390x sparc64 x86_64 ++ # then use "lib64", not "lib" in prefix. ++ if name == "target_cpu" and (/64"$/ =~ val or val == '"s390x"') ++ lib_64 = '64' ++ end + end + # break if /^CEOF/ + end + + drive = File::PATH_SEPARATOR == ';' + +-prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM ++prefix = "/lib#{lib_64}/ruby/" \ ++ + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM + print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" + print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" + print " CONFIG = {}\n" diff --git a/ruby.spec b/ruby.spec index ae34854..2ca27e6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global rubyxver 1.8 %global rubyver 1.8.7 -%global _patchlevel 302 +%global _patchlevel 330 %global dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %global patchlevel %{?_patchlevel:-p%{_patchlevel}} @@ -12,12 +12,12 @@ %{!?sitearchbase: %global sitearchbase %{vendorarchbase}/site_ruby} %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/') -# Sun Aug 22 15:24:07 2010 +0000 -%global ruby_tk_git_revision 54f344095916f83a2755a177f94e65a1c390a612 +# Sun Dec 25 17:00:00 2010 +0000 +%global ruby_tk_git_revision f30eca26639ce538339bc488c7ed1fd397b0c13f Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 1%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -52,7 +52,7 @@ Source100: ruby-rev%{ruby_tk_git_revision}-ext_tk.tar.gz # Patches 23, 29, and 33 brought over from ruby 1.8.6 # (updated to apply against 1.8.7 source) # If building against a 64bit arch, use 64bit libdir -Patch23: ruby-1.8.7-multilib.patch +Patch23: ruby-1.8.7-p330-multilib.patch # Mark all i.86 arch's (eg i586, i686, etc) as i386 Patch29: ruby-1.8.7-always-use-i386.patch # Use shared libs as opposed to static for mkmf @@ -522,6 +522,10 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Sun Dec 26 2010 Mamoru Tasaka - 1.8.7.330-1 +- Update to 1.8.7 p330 +- ext/tk updated to the newest header + * Thu Nov 4 2010 Mamoru Tasaka - 1.8.7.302-2 - Avoid multilib conflict on -libs subpackage (bug 649174) diff --git a/sources b/sources index f5fb30a..66a9c0f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -a6a9e37079ed8cf8726b455dad3de939 ruby-1.8.7-p302.tar.bz2 -8f0b8b855f6b18592ac7a76a73c8ec6c ruby-rev54f344095916f83a2755a177f94e65a1c390a612-ext_tk.tar.gz +2689719fb42c8cf0aa336f8c8933f413 ruby-1.8.7-p330.tar.bz2 +fcc35655da3047f64650a526c179ade8 ruby-revf30eca26639ce538339bc488c7ed1fd397b0c13f-ext_tk.tar.gz From 1d47f9e33b7fd44f6e7c5f26b019d62e24552beb Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 2 Jan 2011 22:31:47 -0600 Subject: [PATCH 172/529] * Sun Jan 02 2011 Dennis Gilmore - 1.8.7.330-2 - nomalise the 32 bit sparc archs to sparc --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 2ca27e6..dfa52fa 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,13 +11,13 @@ %{!?sitelibbase: %global sitelibbase %{vendorlibbase}/site_ruby} %{!?sitearchbase: %global sitearchbase %{vendorarchbase}/site_ruby} -%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/') +%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') # Sun Dec 25 17:00:00 2010 +0000 %global ruby_tk_git_revision f30eca26639ce538339bc488c7ed1fd397b0c13f Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -522,6 +522,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Sun Jan 02 2011 Dennis Gilmore - 1.8.7.330-2 +- nomalise the 32 bit sparc archs to sparc + * Sun Dec 26 2010 Mamoru Tasaka - 1.8.7.330-1 - Update to 1.8.7 p330 - ext/tk updated to the newest header From edf17a3a09d06017abb5b0ea14369174e0c916e3 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 9 Feb 2011 02:59:52 -0600 Subject: [PATCH 173/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index dfa52fa..9286b78 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,7 +17,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 3%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -522,6 +522,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Wed Feb 09 2011 Fedora Release Engineering - 1.8.7.330-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sun Jan 02 2011 Dennis Gilmore - 1.8.7.330-2 - nomalise the 32 bit sparc archs to sparc From 156edf52c69e44187d70d52d1dcf63caa0ece6ea Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 19 Feb 2011 19:33:28 +0900 Subject: [PATCH 174/529] Update to 1.8.7 p334 --- .gitignore | 1 + ruby.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 543c5bd..c944fa7 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-rev54f344095916f83a2755a177f94e65a1c390a612-ext_tk.tar.gz /ruby-1.8.7-p330.tar.bz2 /ruby-revf30eca26639ce538339bc488c7ed1fd397b0c13f-ext_tk.tar.gz +/ruby-1.8.7-p334.tar.bz2 diff --git a/ruby.spec b/ruby.spec index 9286b78..d2f385d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global rubyxver 1.8 %global rubyver 1.8.7 -%global _patchlevel 330 +%global _patchlevel 334 %global dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %global patchlevel %{?_patchlevel:-p%{_patchlevel}} @@ -17,7 +17,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 1%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -522,6 +522,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Sat Feb 19 2011 Mamoru Tasaka - 1.8.7.334-1 +- Update to 1.8.7 p334 + * Wed Feb 09 2011 Fedora Release Engineering - 1.8.7.330-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index 66a9c0f..0b3c463 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -2689719fb42c8cf0aa336f8c8933f413 ruby-1.8.7-p330.tar.bz2 fcc35655da3047f64650a526c179ade8 ruby-revf30eca26639ce538339bc488c7ed1fd397b0c13f-ext_tk.tar.gz +2f14f604bf981bb938ab5fc8b09eb1a6 ruby-1.8.7-p334.tar.bz2 From 7fb63417992204ffb7a92bcf68621bf180ed479c Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Mon, 30 May 2011 23:34:14 +0900 Subject: [PATCH 175/529] Own %{_normalized_cpu}-%{_target_os} directory (bug 708816) --- ruby.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d2f385d..845aa02 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,7 +17,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -425,7 +425,10 @@ rm -rf $RPM_BUILD_ROOT %ifarch ppc64 s390x sparc64 x86_64 %dir %{vendorarchbase} %dir %{vendorarchbase}/%{rubyxver} +%dir %{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} %{sitearchbase} +%else +%dir %{vendorlibbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} %endif ## the following files should goes into ruby-tcltk package. %exclude %{vendorlibbase}/%{rubyxver}/*tk.rb @@ -522,6 +525,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Mon May 30 2011 Mamoru Tasaka - 1.8.7.334-2 +- Own %%{_normalized_cpu}-%%{_target_os} directory (bug 708816) + * Sat Feb 19 2011 Mamoru Tasaka - 1.8.7.334-1 - Update to 1.8.7 p334 From afa951ce793e7bd4e56c63268c58164af02ca8d0 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 11 Jul 2011 20:18:28 -0500 Subject: [PATCH 176/529] normalise arm cpus to arm --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 845aa02..3d178dc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,13 +11,13 @@ %{!?sitelibbase: %global sitelibbase %{vendorlibbase}/site_ruby} %{!?sitearchbase: %global sitearchbase %{vendorarchbase}/site_ruby} -%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') +%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/') # Sun Dec 25 17:00:00 2010 +0000 %global ruby_tk_git_revision f30eca26639ce538339bc488c7ed1fd397b0c13f Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 3%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -525,6 +525,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Mon Jul 11 2011 Dennis Gilmore - 1.8.7.334-3 +- normalise arm cpus to arm + * Mon May 30 2011 Mamoru Tasaka - 1.8.7.334-2 - Own %%{_normalized_cpu}-%%{_target_os} directory (bug 708816) From 13bbaded9051d90afba8c753d69894a727eab667 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 14 Jul 2011 01:16:14 +0900 Subject: [PATCH 177/529] Once fix FTBFS (bug 716021) --- ruby.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 3d178dc..1d9f8bd 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,7 +17,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 4%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -189,6 +189,11 @@ pushd %{name}-%{arcver} popd +# Once fix FTBTS issue (bug 716021). Remove the below +# when it is no longer needed. +sed -i.redirect -e '\@RUBY@s@\.rb >@\.rb | cat >@' %{name}-%{arcver}/ext/dl/depend + + %build pushd %{name}-%{arcver} for i in config.sub config.guess; do @@ -525,6 +530,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Thu Jul 14 2011 Mamoru Tasaka - 1.8.7.334-4 +- Once fix FTBFS (bug 716021) + * Mon Jul 11 2011 Dennis Gilmore - 1.8.7.334-3 - normalise arm cpus to arm From ace4eca58689704e9488355a6ac2a5b7d24234d3 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 16 Jul 2011 10:31:19 +0900 Subject: [PATCH 178/529] Update to 1.8.7 p352 CVE-2011-2686 is fixed in this version (bug 722415) Update ext/tk to the latest git Remove duplicate path entry (bug 718695) --- .gitignore | 2 ++ ruby-1.8.7-p352-path-uniq.patch | 54 +++++++++++++++++++++++++++++++++ ruby.spec | 21 ++++++++++--- sources | 2 ++ 4 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 ruby-1.8.7-p352-path-uniq.patch diff --git a/.gitignore b/.gitignore index c944fa7..a4c19e9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.8.7-p330.tar.bz2 /ruby-revf30eca26639ce538339bc488c7ed1fd397b0c13f-ext_tk.tar.gz /ruby-1.8.7-p334.tar.bz2 +/ruby-1.8.7-p352.tar.bz2 +/ruby-revc2dfaa7d40531aef3706bcc16f38178b0c6633ee-ext_tk.tar.gz diff --git a/ruby-1.8.7-p352-path-uniq.patch b/ruby-1.8.7-p352-path-uniq.patch new file mode 100644 index 0000000..f930de1 --- /dev/null +++ b/ruby-1.8.7-p352-path-uniq.patch @@ -0,0 +1,54 @@ +--- ruby-1.8.7-p352/array.c.pathuniq 2009-02-05 08:55:33.000000000 +0900 ++++ ruby-1.8.7-p352/array.c 2011-07-16 09:44:35.000000000 +0900 +@@ -2954,7 +2954,7 @@ + * b.uniq! #=> nil + */ + +-static VALUE ++GCC_VISIBILITY_HIDDEN VALUE + rb_ary_uniq_bang(ary) + VALUE ary; + { +@@ -2987,7 +2987,7 @@ + * a.uniq #=> ["a", "b", "c"] + */ + +-static VALUE ++GCC_VISIBILITY_HIDDEN VALUE + rb_ary_uniq(ary) + VALUE ary; + { +--- ruby-1.8.7-p352/intern.h.pathuniq 2011-05-23 13:49:40.000000000 +0900 ++++ ruby-1.8.7-p352/intern.h 2011-07-16 09:43:10.000000000 +0900 +@@ -18,6 +18,11 @@ + */ + + #define ID_ALLOCATOR 1 ++#ifdef __GNUC__ ++#define GCC_VISIBILITY_HIDDEN __attribute__ ((visibility("hidden"))) ++#else ++#define GCC_VISIBILITY_HIDDEN ++#endif + + /* array.c */ + void rb_mem_clear _((register VALUE*, register long)); +@@ -44,6 +49,8 @@ + VALUE rb_ary_reverse _((VALUE)); + VALUE rb_ary_sort _((VALUE)); + VALUE rb_ary_sort_bang _((VALUE)); ++GCC_VISIBILITY_HIDDEN VALUE rb_ary_uniq _((VALUE)); ++GCC_VISIBILITY_HIDDEN VALUE rb_ary_uniq_bang _((VALUE)); + VALUE rb_ary_delete _((VALUE, VALUE)); + VALUE rb_ary_delete_at _((VALUE, long)); + VALUE rb_ary_clear _((VALUE)); +--- ruby-1.8.7-p352/ruby.c.pathuniq 2011-07-16 08:54:11.000000000 +0900 ++++ ruby-1.8.7-p352/ruby.c 2011-07-16 09:36:13.000000000 +0900 +@@ -341,6 +341,8 @@ + if (rb_safe_level() == 0) { + incpush("."); + } ++ ++ rb_load_path = rb_ary_uniq(rb_load_path); + } + + struct req_list { diff --git a/ruby.spec b/ruby.spec index 1d9f8bd..f8c992b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global rubyxver 1.8 %global rubyver 1.8.7 -%global _patchlevel 334 +%global _patchlevel 352 %global dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %global patchlevel %{?_patchlevel:-p%{_patchlevel}} @@ -12,12 +12,12 @@ %{!?sitearchbase: %global sitearchbase %{vendorarchbase}/site_ruby} %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/') -# Sun Dec 25 17:00:00 2010 +0000 -%global ruby_tk_git_revision f30eca26639ce538339bc488c7ed1fd397b0c13f +# Fri Jul 15 21:28:10 2011 +0000 +%global ruby_tk_git_revision c2dfaa7d40531aef3706bcc16f38178b0c6633ee Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 4%{?dist} +Release: 1%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -58,6 +58,9 @@ Patch29: ruby-1.8.7-always-use-i386.patch # Use shared libs as opposed to static for mkmf # See bug 428384 Patch33: ruby-1.8.7-p249-mkmf-use-shared.patch +# Remove duplicate path entry +# bug 718695 +Patch34: ruby-1.8.7-p352-path-uniq.patch # Change ruby load path to conform to Fedora/ruby # library placement (various 1.8.6 patches consolidated into this) Patch100: ruby-1.8.7-lib-paths.patch @@ -178,6 +181,7 @@ pushd %{name}-%{arcver} %patch23 -p1 %patch29 -p1 %patch33 -p1 +%patch34 -p1 %patch100 -p1 ( @@ -185,6 +189,9 @@ pushd %{name}-%{arcver} rm -rf tk cp -a ../../ext/tk tk find tk -type d -name \.svn | sort -r | xargs rm -rf + +# Remove rpath + sed -i.rpath -e 's|-Wl,-R|-L|g' tk/extconf.rb ) popd @@ -530,6 +537,12 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Sat Jul 16 2011 Mamoru Tasaka - 1.8.7.352-1 +- Update to 1.8.7 p352 +- CVE-2011-2686 is fixed in this version (bug 722415) +- Update ext/tk to the latest git +- Remove duplicate path entry (bug 718695) + * Thu Jul 14 2011 Mamoru Tasaka - 1.8.7.334-4 - Once fix FTBFS (bug 716021) diff --git a/sources b/sources index 0b3c463..e7e916e 100644 --- a/sources +++ b/sources @@ -1,2 +1,4 @@ fcc35655da3047f64650a526c179ade8 ruby-revf30eca26639ce538339bc488c7ed1fd397b0c13f-ext_tk.tar.gz 2f14f604bf981bb938ab5fc8b09eb1a6 ruby-1.8.7-p334.tar.bz2 +0c61ea41d1b1183b219b9afe97f18f52 ruby-1.8.7-p352.tar.bz2 +01b1053cf357459349bf74363756ad41 ruby-revc2dfaa7d40531aef3706bcc16f38178b0c6633ee-ext_tk.tar.gz From 473f80e4808741760d068aebc6d14400b68904e7 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 1 Oct 2011 00:13:51 +0900 Subject: [PATCH 179/529] F-17: rebuild against new gdbm --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index f8c992b..ab388e0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,7 +17,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -537,6 +537,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Sat Oct 1 2011 Mamoru Tasaka - 1.8.7.352-2 +- F-17: rebuild against new gdbm + * Sat Jul 16 2011 Mamoru Tasaka - 1.8.7.352-1 - Update to 1.8.7 p352 - CVE-2011-2686 is fixed in this version (bug 722415) From 87d17f048eb05ee2b84123537e34fd32141ad9ad Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 20 Nov 2011 02:01:00 +0900 Subject: [PATCH 180/529] F-17: kill gdbm support for now due to licensing compatibility issue --- ruby.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index ab388e0..8afa4a1 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,14 +17,16 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} +Release: 3%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ BuildRequires: compat-readline5-devel BuildRequires: db4-devel +%if 0%{?fedora} < 17 BuildRequires: gdbm-devel +%endif BuildRequires: libX11-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel @@ -200,6 +202,11 @@ popd # when it is no longer needed. sed -i.redirect -e '\@RUBY@s@\.rb >@\.rb | cat >@' %{name}-%{arcver}/ext/dl/depend +# Disable gdbm support on F-17 for now +%if 0%{?fedora} >= 17 +sed -i '\@dblib =@s|gdbm[^ ]*||g' ext/dbm/extconf.rb +%endif + %build pushd %{name}-%{arcver} @@ -537,6 +544,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Thu Nov 16 2011 Mamoru Tasaka - 1.8.7.352-3 +- F-17: kill gdbm support for now due to licensing compatibility issue + * Sat Oct 1 2011 Mamoru Tasaka - 1.8.7.352-2 - F-17: rebuild against new gdbm From b959b0277fc5874c99dcaa59d37e3a3c36bdfe3c Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 20 Nov 2011 03:34:59 +0900 Subject: [PATCH 181/529] Fix sed line --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 8afa4a1..a993613 100644 --- a/ruby.spec +++ b/ruby.spec @@ -204,7 +204,7 @@ sed -i.redirect -e '\@RUBY@s@\.rb >@\.rb | cat >@' %{name}-%{arcver}/ext/dl/dep # Disable gdbm support on F-17 for now %if 0%{?fedora} >= 17 -sed -i '\@dblib =@s|gdbm[^ ]*||g' ext/dbm/extconf.rb +sed -i '\@dblib =@s|gdbm[^ ]*||g' %{name}-%{arcver}/ext/dbm/extconf.rb %endif From 139d71a9fbe832e520358759f88c4ea4310e7a68 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Fri, 30 Dec 2011 00:36:28 +0900 Subject: [PATCH 182/529] Update to 1.8.7p352 Randomize hash on process startup (CVE-2011-4815, bug 750564) --- .gitignore | 1 + ruby.spec | 14 +++++++++++--- sources | 4 +--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index a4c19e9..c1f83dd 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.8.7-p334.tar.bz2 /ruby-1.8.7-p352.tar.bz2 /ruby-revc2dfaa7d40531aef3706bcc16f38178b0c6633ee-ext_tk.tar.gz +/ruby-1.8.7-p357.tar.bz2 diff --git a/ruby.spec b/ruby.spec index a993613..9c74507 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global rubyxver 1.8 %global rubyver 1.8.7 -%global _patchlevel 352 +%global _patchlevel 357 %global dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %global patchlevel %{?_patchlevel:-p%{_patchlevel}} @@ -11,13 +11,13 @@ %{!?sitelibbase: %global sitelibbase %{vendorlibbase}/site_ruby} %{!?sitearchbase: %global sitearchbase %{vendorarchbase}/site_ruby} -%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/') +%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') # Fri Jul 15 21:28:10 2011 +0000 %global ruby_tk_git_revision c2dfaa7d40531aef3706bcc16f38178b0c6633ee Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 3%{?dist} +Release: 1%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -544,6 +544,14 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Thu Dec 29 2011 Mamoru Tasaka - 1.8.7.357-1 +- Update to 1.8.7p352 +- Randomize hash on process startup (CVE-2011-4815, bug 750564) + +* Fri Dec 23 2011 Dennis Gilmore - 1.8.7.352-2 +- dont normalise arm cpus to arm +- there is something weird about how ruby choses where to put bits + * Thu Nov 16 2011 Mamoru Tasaka - 1.8.7.352-3 - F-17: kill gdbm support for now due to licensing compatibility issue diff --git a/sources b/sources index e7e916e..1d94212 100644 --- a/sources +++ b/sources @@ -1,4 +1,2 @@ -fcc35655da3047f64650a526c179ade8 ruby-revf30eca26639ce538339bc488c7ed1fd397b0c13f-ext_tk.tar.gz -2f14f604bf981bb938ab5fc8b09eb1a6 ruby-1.8.7-p334.tar.bz2 -0c61ea41d1b1183b219b9afe97f18f52 ruby-1.8.7-p352.tar.bz2 +3abd9e2a29f756a0d30c7bfca578cdeb ruby-1.8.7-p357.tar.bz2 01b1053cf357459349bf74363756ad41 ruby-revc2dfaa7d40531aef3706bcc16f38178b0c6633ee-ext_tk.tar.gz From 4830bd02412df0428c913c5f9f946a72f500d65b Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Fri, 30 Dec 2011 00:38:49 +0900 Subject: [PATCH 183/529] Fix changelog --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 9c74507..78519d7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -545,7 +545,7 @@ rm -rf $RPM_BUILD_ROOT %changelog * Thu Dec 29 2011 Mamoru Tasaka - 1.8.7.357-1 -- Update to 1.8.7p352 +- Update to 1.8.7p357 - Randomize hash on process startup (CVE-2011-4815, bug 750564) * Fri Dec 23 2011 Dennis Gilmore - 1.8.7.352-2 From 2272bb7315f971b7a79317630d14421c695a7f51 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 20:58:52 -0600 Subject: [PATCH 184/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 78519d7..be7066a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,7 +17,7 @@ Name: ruby Version: %{rubyver}%{?dotpatchlevel} -Release: 1%{?dist} +Release: 2%{?dist} # Please check if ruby upstream changes this to "Ruby or GPLv2+" License: Ruby or GPLv2 URL: http://www.ruby-lang.org/ @@ -544,6 +544,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/ri %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 1.8.7.357-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Thu Dec 29 2011 Mamoru Tasaka - 1.8.7.357-1 - Update to 1.8.7p357 - Randomize hash on process startup (CVE-2011-4815, bug 750564) From 117278abd02a5bf1a482753a93fbe47c52752f6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 18 Jan 2012 15:54:01 +0100 Subject: [PATCH 185/529] Update to Ruby 1.9.3. --- .gitignore | 1 + operating_system.rb | 70 ++ ruby-1.8.7-always-use-i386.patch | 11 - ruby-1.8.7-lib-paths.patch | 228 ---- ruby-1.8.7-multilib.patch | 34 - ruby-1.8.7-p249-mkmf-use-shared.patch | 11 - ruby-1.8.7-p330-multilib.patch | 33 - ruby-1.8.7-p352-path-uniq.patch | 54 - ...9.3-added-site-and-vendor-arch-flags.patch | 188 +++ ruby-1.9.3-always-use-i386.patch | 11 + ruby-1.9.3-arch-specific-dir.patch | 132 ++ ruby-1.9.3-bignum-test-fix.patch | 31 + ruby-1.9.3-custom-rubygems-location.patch | 97 ++ ruby-1.9.3-disable-versioned-paths.patch | 149 +++ ruby-1.9.3-fix-json-parser.patch | 40 + ruby-1.9.3-fix-s390x-build.patch | 12 + ruby-1.9.3-prevent-optimizing-sp.patch | 53 + ruby-1.9.3-rubygems-1.8.11-uninstaller.patch | 76 ++ ruby-1.9.3-webrick-test-fix.patch | 24 + ruby.spec | 1088 ++++++++++------- rubygems-1.8.11-binary-extensions.patch | 296 +++++ sources | 3 +- 22 files changed, 1815 insertions(+), 827 deletions(-) create mode 100644 operating_system.rb delete mode 100644 ruby-1.8.7-always-use-i386.patch delete mode 100644 ruby-1.8.7-lib-paths.patch delete mode 100644 ruby-1.8.7-multilib.patch delete mode 100644 ruby-1.8.7-p249-mkmf-use-shared.patch delete mode 100644 ruby-1.8.7-p330-multilib.patch delete mode 100644 ruby-1.8.7-p352-path-uniq.patch create mode 100644 ruby-1.9.3-added-site-and-vendor-arch-flags.patch create mode 100644 ruby-1.9.3-always-use-i386.patch create mode 100644 ruby-1.9.3-arch-specific-dir.patch create mode 100644 ruby-1.9.3-bignum-test-fix.patch create mode 100644 ruby-1.9.3-custom-rubygems-location.patch create mode 100644 ruby-1.9.3-disable-versioned-paths.patch create mode 100644 ruby-1.9.3-fix-json-parser.patch create mode 100644 ruby-1.9.3-fix-s390x-build.patch create mode 100644 ruby-1.9.3-prevent-optimizing-sp.patch create mode 100644 ruby-1.9.3-rubygems-1.8.11-uninstaller.patch create mode 100644 ruby-1.9.3-webrick-test-fix.patch create mode 100644 rubygems-1.8.11-binary-extensions.patch diff --git a/.gitignore b/.gitignore index c1f83dd..03a0175 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.8.7-p352.tar.bz2 /ruby-revc2dfaa7d40531aef3706bcc16f38178b0c6633ee-ext_tk.tar.gz /ruby-1.8.7-p357.tar.bz2 +/ruby-1.9.3-p0.tar.gz diff --git a/operating_system.rb b/operating_system.rb new file mode 100644 index 0000000..b81425f --- /dev/null +++ b/operating_system.rb @@ -0,0 +1,70 @@ +module Gem + class << self + + ## + # Returns a string representing that part or the directory tree that is + # common to all specified directories. + + def common_path(dirs) + paths = dirs.collect {|dir| dir.split(File::SEPARATOR)} + uncommon_idx = paths.transpose.each_with_index.find {|dirnames, idx| dirnames.uniq.length > 1}.last + paths[0][0 ... uncommon_idx].join(File::SEPARATOR) + end + private :common_path + + ## + # Default gems locations allowed on FHS system (/usr, /usr/share). + # The locations are derived from directories specified during build + # configuration. + + def default_locations + @default_locations ||= { + :system => common_path([ConfigMap[:vendorlibdir], ConfigMap[:vendorarchdir]]), + :local => common_path([ConfigMap[:sitelibdir], ConfigMap[:sitearchdir]]) + } + end + + ## + # For each location provides set of directories for binaries (:bin_dir) + # platform independent (:gem_dir) and dependent (:ext_dir) files. + + def default_dirs + @default_dirs ||= Hash[default_locations.collect do |destination, path| + [destination, { + :bin_dir => File.join(path, ConfigMap[:bindir].split(File::SEPARATOR).last), + :gem_dir => File.join(path, ConfigMap[:datadir].split(File::SEPARATOR).last, 'gems'), + :ext_dir => File.join(path, ConfigMap[:libdir].split(File::SEPARATOR).last, 'gems') + }] + end] + end + + ## + # RubyGems default overrides. + + def default_dir + if Process.uid == 0 + Gem.default_dirs[:local][:gem_dir] + else + Gem.user_dir + end + end + + def default_path + path = default_dirs.collect {|location, paths| paths[:gem_dir]} + path.unshift Gem.user_dir if File.exist? Gem.user_home + end + + def default_bindir + if Process.uid == 0 + Gem.default_dirs[:local][:bin_dir] + else + File.join [Dir.home, 'bin'] + end + end + + def default_ext_dir_for base_dir + dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} + dirs && File.join(dirs.last[:ext_dir], 'exts') + end + end +end diff --git a/ruby-1.8.7-always-use-i386.patch b/ruby-1.8.7-always-use-i386.patch deleted file mode 100644 index ad0dca1..0000000 --- a/ruby-1.8.7-always-use-i386.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ruby-1.8.7-p299/configure.in.orig 2010-06-24 16:09:00.000000000 -0400 -+++ ruby-1.8.7-p299/configure.in 2010-06-24 16:09:13.000000000 -0400 -@@ -1802,6 +1802,8 @@ AC_SUBST(vendordir)dnl - configure_args=$ac_configure_args - AC_SUBST(configure_args)dnl - -+target_cpu=`echo $target_cpu | sed s/i.86/i386/` -+ - if test "$fat_binary" != no ; then - arch="fat-${target_os}" - diff --git a/ruby-1.8.7-lib-paths.patch b/ruby-1.8.7-lib-paths.patch deleted file mode 100644 index 4cef830..0000000 --- a/ruby-1.8.7-lib-paths.patch +++ /dev/null @@ -1,228 +0,0 @@ ---- ruby-1.8.7-p249/Makefile.in.orig 2010-06-15 17:51:14.000000000 -0400 -+++ ruby-1.8.7-p249/Makefile.in 2010-06-15 17:56:54.000000000 -0400 -@@ -24,6 +24,9 @@ datadir = @datadir@ - arch = @arch@ - sitearch = @sitearch@ - sitedir = @sitedir@ -+sitearchdir = @sitearchdir@ -+vendordir = @vendordir@ -+vendorarchdir = @vendorarchdir@ - - TESTUI = console - TESTS = ---- ruby-1.8.7-p249/mkconfig.rb.orig2 2010-06-15 18:19:29.000000000 -0400 -+++ ruby-1.8.7-p249/mkconfig.rb 2010-06-15 18:19:33.000000000 -0400 -@@ -141,12 +141,12 @@ print(*v_fast) - print(*v_others) - print < "#$LDFLAGS #{ldflags}", - 'LIBPATH' => libpathflag(libpath), - 'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs", -- 'LIBS' => "#$LIBRUBYARG_STATIC #{opt} #$LIBS") -+ 'LIBS' => "#$LIBRUBYARG_SHARED #{opt} #$LIBS") - Config::expand(TRY_LINK.dup, conf) - end - diff --git a/ruby-1.8.7-p330-multilib.patch b/ruby-1.8.7-p330-multilib.patch deleted file mode 100644 index 481e6a8..0000000 --- a/ruby-1.8.7-p330-multilib.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- ruby-1.8.7-p330/mkconfig.rb.multilib 2010-11-24 16:38:41.000000000 +0900 -+++ ruby-1.8.7-p330/mkconfig.rb 2010-12-26 02:16:32.000000000 +0900 -@@ -40,6 +40,7 @@ - has_patchlevel = false - continued_name = nil - continued_line = nil -+lib_64 = '' - File.foreach "config.status" do |line| - next if /^#/ =~ line - name = nil -@@ -102,13 +103,21 @@ - when "PATCHLEVEL" - has_patchlevel = true - end -+ -+ # If the target architecture is one of the following, -+ # ppc64 s390x sparc64 x86_64 -+ # then use "lib64", not "lib" in prefix. -+ if name == "target_cpu" and (/64"$/ =~ val or val == '"s390x"') -+ lib_64 = '64' -+ end - end - # break if /^CEOF/ - end - - drive = File::PATH_SEPARATOR == ';' - --prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM -+prefix = "/lib#{lib_64}/ruby/" \ -+ + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM - print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" - print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" - print " CONFIG = {}\n" diff --git a/ruby-1.8.7-p352-path-uniq.patch b/ruby-1.8.7-p352-path-uniq.patch deleted file mode 100644 index f930de1..0000000 --- a/ruby-1.8.7-p352-path-uniq.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- ruby-1.8.7-p352/array.c.pathuniq 2009-02-05 08:55:33.000000000 +0900 -+++ ruby-1.8.7-p352/array.c 2011-07-16 09:44:35.000000000 +0900 -@@ -2954,7 +2954,7 @@ - * b.uniq! #=> nil - */ - --static VALUE -+GCC_VISIBILITY_HIDDEN VALUE - rb_ary_uniq_bang(ary) - VALUE ary; - { -@@ -2987,7 +2987,7 @@ - * a.uniq #=> ["a", "b", "c"] - */ - --static VALUE -+GCC_VISIBILITY_HIDDEN VALUE - rb_ary_uniq(ary) - VALUE ary; - { ---- ruby-1.8.7-p352/intern.h.pathuniq 2011-05-23 13:49:40.000000000 +0900 -+++ ruby-1.8.7-p352/intern.h 2011-07-16 09:43:10.000000000 +0900 -@@ -18,6 +18,11 @@ - */ - - #define ID_ALLOCATOR 1 -+#ifdef __GNUC__ -+#define GCC_VISIBILITY_HIDDEN __attribute__ ((visibility("hidden"))) -+#else -+#define GCC_VISIBILITY_HIDDEN -+#endif - - /* array.c */ - void rb_mem_clear _((register VALUE*, register long)); -@@ -44,6 +49,8 @@ - VALUE rb_ary_reverse _((VALUE)); - VALUE rb_ary_sort _((VALUE)); - VALUE rb_ary_sort_bang _((VALUE)); -+GCC_VISIBILITY_HIDDEN VALUE rb_ary_uniq _((VALUE)); -+GCC_VISIBILITY_HIDDEN VALUE rb_ary_uniq_bang _((VALUE)); - VALUE rb_ary_delete _((VALUE, VALUE)); - VALUE rb_ary_delete_at _((VALUE, long)); - VALUE rb_ary_clear _((VALUE)); ---- ruby-1.8.7-p352/ruby.c.pathuniq 2011-07-16 08:54:11.000000000 +0900 -+++ ruby-1.8.7-p352/ruby.c 2011-07-16 09:36:13.000000000 +0900 -@@ -341,6 +341,8 @@ - if (rb_safe_level() == 0) { - incpush("."); - } -+ -+ rb_load_path = rb_ary_uniq(rb_load_path); - } - - struct req_list { diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch new file mode 100644 index 0000000..9dff272 --- /dev/null +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -0,0 +1,188 @@ +From b0a875862d14244ca41cd1e1e9090f87757aaeb9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 5 Sep 2011 13:10:47 +0200 +Subject: [PATCH] Added configuration flags for site and vendor architecture + specific directories. + +--- + Makefile.in | 3 +++ + configure.in | 40 ++++++++++++++++++++++++++++++++++++++++ + tool/mkconfig.rb | 8 ++++++-- + version.c | 4 ++++ + 4 files changed, 53 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index bcdaf5f..f57e4c4 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -34,6 +34,9 @@ datadir = @datadir@ + archdir = @archdir@ + sitearch = @sitearch@ + sitedir = @sitedir@ ++sitearchdir= @sitearchdir@ ++vendordir = @vendordir@ ++vendorarchdir = @vendorarchdir@ + ruby_version = @ruby_version@ + + TESTUI = console +diff --git a/configure.in b/configure.in +index 83e5d76..31532bd 100644 +--- a/configure.in ++++ b/configure.in +@@ -2801,6 +2801,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do + dir="${SITE_DIR}" + done + ++AC_ARG_WITH(sitearchdir, ++ AS_HELP_STRING([--with-sitearchdir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]), ++ [sitearchdir=$withval], ++ [sitearchdir='${rubylibprefix}/site_ruby/${arch}']) ++dir="${sitearchdir}" ++until SITEARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITEARCH_DIR}"; do ++ dir="${SITEARCH_DIR}" ++done ++ + AC_ARG_WITH(vendordir, + AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]), + [vendordir=$withval], +@@ -2810,19 +2819,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do + dir="${VENDOR_DIR}" + done + ++AC_ARG_WITH(vendorarchdir, ++ AS_HELP_STRING([--with-vendorarchdir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]), ++ [vendorarchdir=$withval], ++ [vendorarchdir='${rubylibprefix}/vendor_ruby/${arch}']) ++dir="${vendorarchdir}" ++until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_DIR}"; do ++ dir="${VENDORARCH_DIR}" ++done ++ + if test "${LOAD_RELATIVE+set}"; then + AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) + RUBY_EXEC_PREFIX="" + RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" ++ RUBY_SITE_ARCHLIB_PATH="`eval echo "$SITEARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" ++ RUBY_VENDOR_ARCHLIB_PATH="`eval echo "$VENDORARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + else + RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`" + RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`" + RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" ++ RUBY_SITE_ARCHLIB_PATH="`eval echo \\"$SITEARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" ++ RUBY_VENDOR_ARCHLIB_PATH="`eval echo \\"$VENDORARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + fi + + pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' +@@ -2840,6 +2862,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], + [ + RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" + ]) ++AS_CASE(["$RUBY_SITE_ARCHLIB_PATH"], ++ ["$RUBY_LIB_PREFIX/"*], [ ++ RUBY_SITE_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_ARCHLIB_PATH\" : \"$pat\"`"'"' ++ ], ++ [ ++ RUBY_SITE_ARCHLIB_PATH="\"${RUBY_SITE_ARCHLIB_PATH}\"" ++ ]) + AS_CASE(["$RUBY_VENDOR_LIB_PATH"], + ["$RUBY_LIB_PREFIX/"*], [ + RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' +@@ -2847,6 +2876,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], + [ + RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" + ]) ++AS_CASE(["$RUBY_VENDOR_ARCHLIB_PATH"], ++ ["$RUBY_LIB_PREFIX/"*], [ ++ RUBY_VENDOR_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_ARCHLIB_PATH\" : \"$pat\"`"'"' ++ ], ++ [ ++ RUBY_VENDOR_ARCHLIB_PATH="\"${RUBY_VENDOR_ARCHLIB_PATH}\"" ++ ]) + pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' + AS_CASE(["$RUBY_LIB_PREFIX"], + ["$RUBY_EXEC_PREFIX/"*], [ +@@ -2868,19 +2904,23 @@ if test "x$SITE_DIR" = xno; then + AC_DEFINE(NO_RUBY_SITE_LIB) + else + AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH}) ++ AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, ${RUBY_SITE_ARCHLIB_PATH}) + fi + if test "x$VENDOR_DIR" = xno; then + AC_DEFINE(NO_RUBY_VENDOR_LIB) + else + AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH}) ++ AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, ${RUBY_VENDOR_ARCHLIB_PATH}) + fi + + AC_SUBST(arch)dnl + AC_SUBST(sitearch)dnl + AC_SUBST(ruby_version)dnl + AC_SUBST(archdir)dnl + AC_SUBST(sitedir)dnl ++AC_SUBST(sitearchdir)dnl + AC_SUBST(vendordir)dnl ++AC_SUBST(vendorarchdir)dnl + + configure_args=$ac_configure_args + AC_SUBST(configure_args)dnl +diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb +index b707c4b..6230720 100755 +--- a/tool/mkconfig.rb ++++ b/tool/mkconfig.rb +@@ -44,6 +44,8 @@ v_others = [] + continued_line = nil + path_version = "/$(ruby_version)" + archdir_override = "$(vendorlibdir)/$(sitearch)" ++sitearchdir_override = "$(sitelibdir)/$(sitearch)" ++vendorarchdir_override = "$(vendorlibdir)/$(sitearch)" + File.foreach "config.status" do |line| + next if /^#/ =~ line + name = nil +@@ -79,6 +81,8 @@ File.foreach "config.status" do |line| + when /^RUBY_SO_NAME$/; next if $so_name + when /^arch$/; if val.empty? then val = arch else arch = val end + when /^archdir$/; archdir_override = val; next ++ when /^sitearchdir$/; sitearchdir_override = val; next ++ when /^vendorarchdir$/; vendorarchdir_override = val; next + when /^sitearch/; val = '$(arch)' if val.empty? + end + case val +@@ -213,11 +217,11 @@ print < +Date: Thu, 8 Sep 2011 15:30:05 +0200 +Subject: [PATCH] Add configuration arch specific dir flag. + +--- + Makefile.in | 1 + + configure.in | 20 ++++++++++++++++++++ + tool/mkconfig.rb | 4 +++- + version.c | 2 ++ + 4 files changed, 26 insertions(+), 1 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index bcdaf5f..d61b2ee 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -31,6 +31,7 @@ libexecdir = @libexecdir@ + datarootdir = @datarootdir@ + datadir = @datadir@ + arch = @arch@ ++archdir = @archdir@ + sitearch = @sitearch@ + sitedir = @sitedir@ + ruby_version = @ruby_version@ +diff --git a/configure.in b/configure.in +index 83e5d76..e6dc38c 100644 +--- a/configure.in ++++ b/configure.in +@@ -2783,6 +2783,15 @@ else + RUBY_LIB_VERSION="\"${ruby_version}\"" + fi + ++AC_ARG_WITH(archdir, ++ AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]), ++ [archdir=$withval], ++ [archdir='${rubylibprefix}/${arch}']) ++dir="${archdir}" ++until ARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${ARCH_DIR}"; do ++ dir="${ARCH_DIR}" ++done ++ + AC_ARG_WITH(sitedir, + AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]), + [sitedir=$withval], +@@ -2805,16 +2814,25 @@ if test "${LOAD_RELATIVE+set}"; then + AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) + RUBY_EXEC_PREFIX="" + RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" ++ RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" + else + RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`" + RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`" ++ RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" + fi + + pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' ++AS_CASE(["$RUBY_ARCH_LIB_PATH"], ++ ["$RUBY_LIB_PREFIX/"*], [ ++ RUBY_ARCH_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_ARCH_LIB_PATH\" : \"$pat\"`"'"' ++ ], ++ [ ++ RUBY_ARCH_LIB_PATH="\"${RUBY_ARCH_LIB_PATH}\"" ++ ]) + AS_CASE(["$RUBY_SITE_LIB_PATH"], + ["$RUBY_LIB_PREFIX/"*], [ + RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' +@@ -2845,6 +2863,7 @@ else + fi + AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") + AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX}) ++AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, ${RUBY_ARCH_LIB_PATH}) + if test "x$SITE_DIR" = xno; then + AC_DEFINE(NO_RUBY_SITE_LIB) + else +@@ -2859,6 +2878,7 @@ fi + AC_SUBST(arch)dnl + AC_SUBST(sitearch)dnl + AC_SUBST(ruby_version)dnl ++AC_SUBST(archdir)dnl + AC_SUBST(sitedir)dnl + AC_SUBST(vendordir)dnl + +diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb +index b707c4b..9780ef2 100755 +--- a/tool/mkconfig.rb ++++ b/tool/mkconfig.rb +@@ -43,6 +43,7 @@ v_others = [] + continued_name = nil + continued_line = nil + path_version = "/$(ruby_version)" ++archdir_override = "$(vendorlibdir)/$(sitearch)" + File.foreach "config.status" do |line| + next if /^#/ =~ line + name = nil +@@ -77,6 +78,7 @@ File.foreach "config.status" do |line| + when /^RUBY_INSTALL_NAME$/; next if $install_name + when /^RUBY_SO_NAME$/; next if $so_name + when /^arch$/; if val.empty? then val = arch else arch = val end ++ when /^archdir$/; archdir_override = val; next + when /^sitearch/; val = '$(arch)' if val.empty? + end + case val +@@ -207,7 +209,7 @@ print(*v_fast) + print(*v_others) + print < +Date: Fri, 11 Nov 2011 13:14:45 +0100 +Subject: [PATCH] Allow to install RubyGems into custom location, outside of + Ruby tree. + +--- + configure.in | 8 ++++++++ + tool/mkconfig.rb | 1 + + tool/rbinstall.rb | 9 +++++++++ + version.c | 4 ++++ + 4 files changed, 22 insertions(+), 0 deletions(-) + +diff --git a/configure.in b/configure.in +index b1bc951..91c5d0d 100644 +--- a/configure.in ++++ b/configure.in +@@ -2828,6 +2828,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do + dir="${VENDORARCH_DIR}" + done + ++AC_ARG_WITH(rubygemsdir, ++ AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]), ++ [rubygemsdir=$withval]) ++if test "$rubygemsdir" != ""; then ++ AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir") ++fi ++ + if test "${LOAD_RELATIVE+set}"; then + AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) + RUBY_EXEC_PREFIX="" +@@ -2921,6 +2928,7 @@ AC_SUBST(sitearch)dnl + AC_SUBST(sitearchdir)dnl + AC_SUBST(vendordir)dnl + AC_SUBST(vendorarchdir)dnl ++AC_SUBST(rubygemsdir)dnl + + configure_args=$ac_configure_args + AC_SUBST(configure_args)dnl +diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb +index b707c4b..9fecbfb 100755 +--- a/tool/mkconfig.rb ++++ b/tool/mkconfig.rb +@@ -84,6 +84,7 @@ File.foreach "config.status" do |line| + when /^sitearchdir$/; sitearchdir_override = val; next + when /^vendorarchdir$/; vendorarchdir_override = val; next + when /^sitearch/; val = '$(arch)' if val.empty? ++ when /^rubygemsdir/; next if val.empty? + end + case val + when /^\$\(ac_\w+\)$/; next +diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb +index 6bfc73e..31dc446 100755 +--- a/tool/rbinstall.rb ++++ b/tool/rbinstall.rb +@@ -300,6 +300,7 @@ sitelibdir = CONFIG["sitelibdir"] + sitearchlibdir = CONFIG["sitearchdir"] + vendorlibdir = CONFIG["vendorlibdir"] + vendorarchlibdir = CONFIG["vendorarchdir"] ++rubygemsdir = CONFIG["rubygemsdir"] + mandir = CONFIG["mandir"] + capidir = CONFIG["docdir"] + configure_args = Shellwords.shellwords(CONFIG["configure_args"]) +@@ -487,7 +488,15 @@ end + install?(:local, :comm, :lib) do + prepare "library scripts", rubylibdir + noinst = %w[README* *.txt *.rdoc] ++ noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir + install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode) ++ if rubygemsdir ++ noinst = %w[obsolete.rb] ++ install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode) ++ install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode) ++ install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode) ++ install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode) ++ end + end + + install?(:local, :arch, :lib) do +diff --git a/version.c b/version.c +index 59d4e5e..12ba7e9 100644 +--- a/version.c ++++ b/version.c +@@ -103,6 +103,10 @@ const char ruby_initial_load_paths[] = + #endif + #endif + ++#ifdef RUBYGEMS_DIR ++ RUBYGEMS_DIR "\0" ++#endif ++ + RUBY_LIB "\0" + #ifdef RUBY_THIN_ARCHLIB + RUBY_THIN_ARCHLIB "\0" +-- +1.7.7 + diff --git a/ruby-1.9.3-disable-versioned-paths.patch b/ruby-1.9.3-disable-versioned-paths.patch new file mode 100644 index 0000000..afafb04 --- /dev/null +++ b/ruby-1.9.3-disable-versioned-paths.patch @@ -0,0 +1,149 @@ +From fa1a50ad10814f724b8713865dc222724cb955ab Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 25 Aug 2011 14:33:51 +0200 +Subject: [PATCH] Allow to disable versioned paths. + +--- + configure.in | 11 +++++++++++ + tool/mkconfig.rb | 9 ++++++--- + version.c | 10 ++++++++++ + 3 files changed, 27 insertions(+), 3 deletions(-) + +diff --git a/configure.in b/configure.in +index e742e74..86cb68f 100644 +--- a/configure.in ++++ b/configure.in +@@ -2953,6 +2953,17 @@ else + fi + AC_SUBST(USE_RUBYGEMS) + ++AC_ARG_ENABLE(versioned-paths, ++ AS_HELP_STRING([--disable-versioned-paths], [disable paths with version number]), ++ [enable_versioned_paths="$enableval"], [enable_versioned_paths=yes]) ++if test x"$enable_versioned_paths" = xno; then ++ AC_DEFINE(DISABLE_VERSIONED_PATHS, 1) ++ USE_VERSIONED_PATHS=NO ++else ++ USE_VERSIONED_PATHS=YES ++fi ++AC_SUBST(USE_VERSIONED_PATHS) ++ + arch_hdrdir="${EXTOUT}/include/${arch}/ruby" + AS_MKDIR_P("${arch_hdrdir}") + config_h="${arch_hdrdir}/config.h" +diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb +index a2221f0..47d8c8f 100755 +--- a/tool/mkconfig.rb ++++ b/tool/mkconfig.rb +@@ -42,6 +42,7 @@ v_others = [] + vars = {} + continued_name = nil + continued_line = nil ++path_version = "/$(ruby_version)" + File.foreach "config.status" do |line| + next if /^#/ =~ line + name = nil +@@ -138,6 +139,8 @@ File.foreach "config.status" do |line| + case name + when "ruby_version" + version = val[/\A"(.*)"\z/, 1] ++ when /^USE_VERSIONED_PATHS$/ ++ path_version = nil if /NO/ =~ val + end + end + # break if /^CEOF/ +@@ -203,15 +206,15 @@ end + print(*v_fast) + print(*v_others) + print < $data_mode) + end +-- +1.7.6 + diff --git a/ruby-1.9.3-fix-json-parser.patch b/ruby-1.9.3-fix-json-parser.patch new file mode 100644 index 0000000..9621c72 --- /dev/null +++ b/ruby-1.9.3-fix-json-parser.patch @@ -0,0 +1,40 @@ +diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c +index d1d14c7..1773616 100644 +--- a/ext/json/parser/parser.c ++++ b/ext/json/parser/parser.c +@@ -1293,6 +1293,7 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd) + { + char *p = string, *pe = string, *unescape; + int unescape_len; ++ char buf[4]; + + while (pe < stringEnd) { + if (*pe == '\\') { +@@ -1325,7 +1326,6 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd) + if (pe > stringEnd - 4) { + return Qnil; + } else { +- char buf[4]; + UTF32 ch = unescape_unicode((unsigned char *) ++pe); + pe += 3; + if (UNI_SUR_HIGH_START == (ch & 0xFC00)) { +diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl +index e7d47e1..33e775c 100644 +--- a/ext/json/parser/parser.rl ++++ b/ext/json/parser/parser.rl +@@ -393,6 +393,7 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd) + { + char *p = string, *pe = string, *unescape; + int unescape_len; ++ char buf[4]; + + while (pe < stringEnd) { + if (*pe == '\\') { +@@ -425,7 +426,6 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd) + if (pe > stringEnd - 4) { + return Qnil; + } else { +- char buf[4]; + UTF32 ch = unescape_unicode((unsigned char *) ++pe); + pe += 3; + if (UNI_SUR_HIGH_START == (ch & 0xFC00)) { diff --git a/ruby-1.9.3-fix-s390x-build.patch b/ruby-1.9.3-fix-s390x-build.patch new file mode 100644 index 0000000..d0ade91 --- /dev/null +++ b/ruby-1.9.3-fix-s390x-build.patch @@ -0,0 +1,12 @@ +diff -up ruby-1.9.3-p0/ext/tk/extconf.rb.orig ruby-1.9.3-p0/ext/tk/extconf.rb +--- ruby-1.9.3-p0/ext/tk/extconf.rb.orig 2011-06-29 16:11:19.000000000 +0200 ++++ ruby-1.9.3-p0/ext/tk/extconf.rb 2011-10-18 16:15:59.406299659 +0200 +@@ -114,7 +114,7 @@ def is_macosx? + end + + def maybe_64bit? +- /64|universal/ =~ RUBY_PLATFORM ++ /64|universal|s390x/ =~ RUBY_PLATFORM + end + + def check_tcltk_version(version) diff --git a/ruby-1.9.3-prevent-optimizing-sp.patch b/ruby-1.9.3-prevent-optimizing-sp.patch new file mode 100644 index 0000000..085d7f8 --- /dev/null +++ b/ruby-1.9.3-prevent-optimizing-sp.patch @@ -0,0 +1,53 @@ +Index: ChangeLog +=================================================================== +--- ChangeLog (revision 34277) ++++ ChangeLog (revision 34278) +@@ -1,3 +1,13 @@ ++Thu Jan 12 13:51:00 2012 NARUSE, Yui ++ ++ * cont.c (cont_restore_0): prevent optimizing out `sp'. sp is used for ++ reserving a memory space with ALLOCA_N for restoring machine stack ++ stored in cont->machine_stack, but clang optimized out it (and ++ maybe #5851 is also caused by this). ++ This affected TestContinuation#test_check_localvars. ++ ++ * cont.c (cont_restore_1): revert workaround introduced in r32201. ++ + Mon Oct 10 22:33:12 2011 KOSAKI Motohiro + + * test/-ext-/old_thread_select/test_old_thread_select.rb: +Index: cont.c +=================================================================== +--- cont.c (revision 34277) ++++ cont.c (revision 34278) +@@ -669,10 +669,9 @@ + } + #endif + if (cont->machine_stack_src) { +- size_t i; + FLUSH_REGISTER_WINDOWS; +- for (i = 0; i < cont->machine_stack_size; i++) +- cont->machine_stack_src[i] = cont->machine_stack[i]; ++ MEMCPY(cont->machine_stack_src, cont->machine_stack, ++ VALUE, cont->machine_stack_size); + } + + #ifdef __ia64 +@@ -742,7 +741,7 @@ + if (&space[0] > end) { + # ifdef HAVE_ALLOCA + volatile VALUE *sp = ALLOCA_N(VALUE, &space[0] - end); +- (void)sp; ++ space[0] = *sp; + # else + cont_restore_0(cont, &space[0]); + # endif +@@ -758,7 +757,7 @@ + if (&space[STACK_PAD_SIZE] < end) { + # ifdef HAVE_ALLOCA + volatile VALUE *sp = ALLOCA_N(VALUE, end - &space[STACK_PAD_SIZE]); +- (void)sp; ++ space[0] = *sp; + # else + cont_restore_0(cont, &space[STACK_PAD_SIZE-1]); + # endif diff --git a/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch b/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch new file mode 100644 index 0000000..af1cff2 --- /dev/null +++ b/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch @@ -0,0 +1,76 @@ +--- ruby-1.9.3-p0/lib/rubygems/uninstaller.rb.orig 2011-10-31 10:22:36.321579483 +0100 ++++ ruby-1.9.3-p0/lib/rubygems/uninstaller.rb 2011-10-31 10:34:25.563626119 +0100 +@@ -51,15 +51,14 @@ + @bin_dir = options[:bin_dir] + @format_executable = options[:format_executable] + ++ if options[:force] ++ @force_all = true ++ @force_ignore = true ++ end ++ + # only add user directory if install_dir is not set + @user_install = false + @user_install = options[:user_install] unless options[:install_dir] +- +- if @user_install then +- Gem.use_paths Gem.user_dir, @gem_home +- else +- Gem.use_paths @gem_home +- end + end + + ## +@@ -69,10 +68,24 @@ + def uninstall + list = Gem::Specification.find_all_by_name(@gem, @version) + ++ list, other_repo_specs = list.partition do |spec| ++ @gem_home == spec.base_dir or ++ (@user_install and spec.base_dir == Gem.user_dir) ++ end ++ + if list.empty? then +- raise Gem::InstallError, "gem #{@gem.inspect} is not installed" ++ raise Gem::InstallError, "gem #{@gem.inspect} is not installed" if ++ other_repo_specs.empty? ++ ++ other_repos = other_repo_specs.map { |spec| spec.base_dir }.uniq ++ ++ message = ["#{@gem} is not installed in GEM_HOME, try:"] ++ message.concat other_repos.map { |repo| ++ "\tgem uninstall -i #{repo} #{@gem}" ++ } + +- elsif list.size > 1 and @force_all then ++ raise Gem::InstallError, message.join("\n") ++ elsif @force_all then + remove_all list + + elsif list.size > 1 then +@@ -250,12 +263,10 @@ + msg << "\t#{spec.full_name}" + + spec.dependent_gems.each do |dep_spec, dep, satlist| +- msg << +- ("#{dep_spec.name}-#{dep_spec.version} depends on " + +- "[#{dep.name} (#{dep.requirement})]") ++ msg << "#{dep_spec.name}-#{dep_spec.version} depends on #{dep}" + end + +- msg << 'If you remove this gems, one or more dependencies will not be met.' ++ msg << 'If you remove this gem, one or more dependencies will not be met.' + msg << 'Continue with Uninstall?' + return ask_yes_no(msg.join("\n"), true) + end + +--- ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb.orig 2011-11-03 08:58:31.411272176 +0100 ++++ ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb 2011-11-03 08:58:43.010272351 +0100 +@@ -225,7 +225,7 @@ + + uninstaller = Gem::Uninstaller.new('a') + +- use_ui Gem::MockGemUi.new("2\n") do ++ use_ui Gem::MockGemUi.new("2\ny\n") do + uninstaller.uninstall + end diff --git a/ruby-1.9.3-webrick-test-fix.patch b/ruby-1.9.3-webrick-test-fix.patch new file mode 100644 index 0000000..c6eb3fa --- /dev/null +++ b/ruby-1.9.3-webrick-test-fix.patch @@ -0,0 +1,24 @@ +diff --git a/test/webrick/test_cgi.rb b/test/webrick/test_cgi.rb +index 1185316..0ef1b37 100644 +--- a/test/webrick/test_cgi.rb ++++ b/test/webrick/test_cgi.rb +@@ -14,6 +14,7 @@ class TestWEBrickCGI < Test::Unit::TestCase + def req.meta_vars + meta = super + meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR) ++ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']] + return meta + end + }, +diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb +index bcdb3df..f78ba5c 100644 +--- a/test/webrick/test_filehandler.rb ++++ b/test/webrick/test_filehandler.rb +@@ -252,6 +252,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase + def req.meta_vars + meta = super + meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR) ++ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']] + return meta + end + }, diff --git a/ruby.spec b/ruby.spec index be7066a..a8c8bf2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,82 +1,109 @@ -%global rubyxver 1.8 -%global rubyver 1.8.7 -%global _patchlevel 357 +%global major_version 1 +%global minor_version 9 +%global teeny_version 3 +%global patch_level 0 -%global dotpatchlevel %{?_patchlevel:.%{_patchlevel}} -%global patchlevel %{?_patchlevel:-p%{_patchlevel}} -%global arcver %{rubyver}%{?patchlevel} +%global major_minor_version %{major_version}.%{minor_version} -%{!?vendorlibbase: %global vendorlibbase %{_prefix}/lib/ruby} -%{!?vendorarchbase: %global vendorarchbase %{_libdir}/ruby} -%{!?sitelibbase: %global sitelibbase %{vendorlibbase}/site_ruby} -%{!?sitearchbase: %global sitearchbase %{vendorarchbase}/site_ruby} +%global ruby_version %{major_minor_version}.%{teeny_version} +%global ruby_version_patch_level %{major_minor_version}.%{teeny_version}.%{patch_level} +%global ruby_abi %{major_minor_version}.1 -%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') -# Fri Jul 15 21:28:10 2011 +0000 -%global ruby_tk_git_revision c2dfaa7d40531aef3706bcc16f38178b0c6633ee +%global ruby_archive %{name}-%{ruby_version}-p%{patch_level} -Name: ruby -Version: %{rubyver}%{?dotpatchlevel} -Release: 2%{?dist} -# Please check if ruby upstream changes this to "Ruby or GPLv2+" -License: Ruby or GPLv2 -URL: http://www.ruby-lang.org/ +%global ruby_libdir %{_datadir}/%{name} +%global ruby_libarchdir %{_libdir}/%{name} -BuildRequires: compat-readline5-devel -BuildRequires: db4-devel -%if 0%{?fedora} < 17 -BuildRequires: gdbm-devel -%endif -BuildRequires: libX11-devel -BuildRequires: ncurses-devel -BuildRequires: openssl-devel -BuildRequires: tcl-devel -BuildRequires: tk-devel +# This is the local lib/arch and should not be used for packaging. +%global ruby_sitedir site_ruby +%global ruby_sitelibdir %{_prefix}/local/share/ruby/%{ruby_sitedir} +%global ruby_sitearchdir %{_prefix}/local/%{_lib}/ruby/%{ruby_sitedir} -BuildRequires: autoconf -BuildRequires: bison -BuildRequires: byacc +# This is the general location for libs/archs compatible with all +# or most of the Ruby versions available in the Fedora repositories. +%global ruby_vendordir vendor_ruby +%global ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir} +%global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir} -# Official ruby source release tarball -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{rubyxver}/%{name}-%{arcver}.tar.bz2 +%global rubygems_version 1.8.11 -# Source100: contains ext/tk directory of the ruby source head -# see http://lists.fedoraproject.org/pipermail/ruby-sig/2010-May/000096.html -# and bug 560053, 590503. -# To checkout, run the following commands -# (replacing 'ruby_tk_git_revision' with the value of the macro above): -# * git clone http://github.com/ruby/ruby.git -# * cd ruby -# * git checkout %%{ruby_tk_git_revision} ext/tk -# * tar czvf ruby-rev%%{ruby_tk_git_revision}-ext_tk.tar.gz ext/tk -Source100: ruby-rev%{ruby_tk_git_revision}-ext_tk.tar.gz +# The RubyGems library has to stay out of Ruby directory three, since the +# RubyGems should be share by all Ruby implementations. +%global rubygems_dir %{_datadir}/rubygems -# Patches 23, 29, and 33 brought over from ruby 1.8.6 -# (updated to apply against 1.8.7 source) -# If building against a 64bit arch, use 64bit libdir -Patch23: ruby-1.8.7-p330-multilib.patch -# Mark all i.86 arch's (eg i586, i686, etc) as i386 -Patch29: ruby-1.8.7-always-use-i386.patch -# Use shared libs as opposed to static for mkmf -# See bug 428384 -Patch33: ruby-1.8.7-p249-mkmf-use-shared.patch -# Remove duplicate path entry -# bug 718695 -Patch34: ruby-1.8.7-p352-path-uniq.patch -# Change ruby load path to conform to Fedora/ruby -# library placement (various 1.8.6 patches consolidated into this) -Patch100: ruby-1.8.7-lib-paths.patch +# Specify custom RubyGems root. +%global gem_dir %{_datadir}/gems +# TODO: Should we create arch specific rubygems-filesystem? +%global gem_extdir %{_exec_prefix}/lib{,64}/gems -Summary: An interpreter of object-oriented scripting language -Group: Development/Languages -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%global rake_version 0.9.2.2 +# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. +# http://redmine.ruby-lang.org/issues/5313 +%global irb_version %{ruby_version_patch_level} +%global rdoc_version 3.9.4 +%global bigdecimal_version 1.1.0 +%global io_console_version 0.3 +%global json_version 1.5.4 +%global minitest_version 2.5.1 -# emacs-23.2.x itself now provides the ruby mode -# And no Provides here -Obsoletes: %{name}-mode < 1.8.7 -# remove old documentation -# And no Provides here -Obsoletes: %{name}-docs < 1.8.7 +%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/') + +Summary: An interpreter of object-oriented scripting language +Name: ruby +Version: %{ruby_version_patch_level} +Release: 5%{?dist} +Group: Development/Languages +License: Ruby or BSD +URL: http://ruby-lang.org/ +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.gz +Source1: operating_system.rb + +# http://redmine.ruby-lang.org/issues/5231 +Patch0: ruby-1.9.3-disable-versioned-paths.patch +# TODO: Should be submitted upstream? +Patch1: ruby-1.9.3-arch-specific-dir.patch +# http://redmine.ruby-lang.org/issues/5281 +Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch +# Force multiarch directories for i.86 to be always named i386. This solves +# some differencies in build between Fedora and RHEL. +Patch3: ruby-1.9.3-always-use-i386.patch +# http://redmine.ruby-lang.org/issues/5465 +Patch4: ruby-1.9.3-fix-s390x-build.patch +# Fix the uninstaller, so that it doesn't say that gem doesn't exist +# when it exists outside of the GEM_HOME (already fixed in the upstream) +Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch +# http://redmine.ruby-lang.org/issues/5135 - see comment 29 +Patch6: ruby-1.9.3-webrick-test-fix.patch +# Already fixed upstream: +# https://github.com/ruby/ruby/commit/f212df564a4e1025f9fb019ce727022a97bfff53 +Patch7: ruby-1.9.3-bignum-test-fix.patch +# Allows to install RubyGems into custom directory, outside of Ruby's tree. +# http://redmine.ruby-lang.org/issues/5617 +Patch8: ruby-1.9.3-custom-rubygems-location.patch +# Add support for installing binary extensions according to FHS. +# https://github.com/rubygems/rubygems/issues/210 +Patch9: rubygems-1.8.11-binary-extensions.patch +# Fixes segfaults when build with GCC 4.7. +# http://bugs.ruby-lang.org/issues/5851 +Patch10: ruby-1.9.3-prevent-optimizing-sp.patch +# Fixes json encoding failures when build with GCC 4.7. +# http://bugs.ruby-lang.org/issues/5888 +Patch11: ruby-1.9.3-fix-json-parser.patch + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: ruby(rubygems) >= %{rubygems_version} + +BuildRequires: autoconf +BuildRequires: gdbm-devel +BuildRequires: ncurses-devel +BuildRequires: db4-devel +BuildRequires: libffi-devel +BuildRequires: openssl-devel +BuildRequires: libyaml-devel +BuildRequires: readline-devel +BuildRequires: tk-devel +# Needed to pass test_set_program_name(TestRubyOptions) +BuildRequires: procps %description Ruby is the interpreted scripting language for quick and easy @@ -85,465 +112,618 @@ files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible. -%package libs -Summary: Libraries necessary to run Ruby -Group: Development/Libraries -# ext/bigdecimal/bigdecimal.{c,h} are under (GPL+ or Artistic) which -# are used for bigdecimal.so -License: (Ruby or GPLv2) and (GPL+ or Artistic) -Provides: ruby(abi) = %{rubyxver} -Provides: libruby = %{version}-%{release} -Obsoletes: libruby < %{version}-%{release} +%package devel +Summary: A Ruby development environment +Group: Development/Languages +# Requires: %{name}-libs = %{version}-%{release} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Header files and libraries for building an extension library for the +Ruby or an application embedding Ruby. + +%package libs +Summary: Libraries necessary to run Ruby +Group: Development/Libraries +License: Ruby or BSD +Provides: ruby(abi) = %{ruby_abi} %description libs This package includes the libruby, necessary to run Ruby. +# TODO: Rename or not rename to ruby-rubygems? +%package -n rubygems +Summary: The Ruby standard for packaging ruby libraries +Version: %{rubygems_version} +Group: Development/Libraries +License: Ruby or MIT +Requires: ruby(abi) = %{ruby_abi} +Requires: rubygem(rdoc) = %{rdoc_version} +Requires: rubygem(io-console) = %{io_console_version} +Provides: gem = %{version}-%{release} +Provides: ruby(rubygems) = %{version}-%{release} +BuildArch: noarch -%package devel -Summary: A Ruby development environment -Group: Development/Languages -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%description -n rubygems +RubyGems is the Ruby standard for publishing and managing third party +libraries. -%description devel -Header files and libraries for building a extension library for the -Ruby or an application embedded Ruby. -%package static -Summary: Static libraries for Ruby development environment -Group: Development/Languages -Requires: %{name}-devel%{?_isa} = %{version}-%{release} +%package -n rubygems-devel +Summary: Macros and development tools for packagin RubyGems +Version: %{rubygems_version} +Group: Development/Libraries +License: Ruby or MIT +Requires: ruby(rubygems) = %{version}-%{release} +BuildArch: noarch -%description static -Static libraries for for building a extension library for the -Ruby or an application embedded Ruby. +%description -n rubygems-devel +Macros and development tools for packagin RubyGems. -%package irb -Summary: The Interactive Ruby -Group: Development/Languages -# No isa specific -Requires: %{name} = %{version}-%{release} -Provides: irb = %{version}-%{release} -Obsoletes: irb < %{version}-%{release} -BuildArch: noarch + +%package -n rubygem-rake +Summary: Ruby based make-like utility +Version: %{rake_version} +Group: Development/Libraries +License: Ruby or MIT +Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(rubygems) = %{rubygems_version} +Provides: rake = %{version}-%{release} +Provides: rubygem(rake) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-rake +Rake is a Make-like program implemented in Ruby. Tasks and dependencies are +specified in standard Ruby syntax. + + +%package irb +Summary: The Interactive Ruby +Version: %{irb_version} +Group: Development/Libraries +Requires: %{name}-libs = %{ruby_version_patch_level} +Provides: irb = %{version}-%{release} +Provides: ruby(irb) = %{version}-%{release} +BuildArch: noarch %description irb The irb is acronym for Interactive Ruby. It evaluates ruby expression from the terminal. -%package rdoc -Summary: A tool to generate documentation from Ruby source files -Group: Development/Languages -# generators/template/html/html.rb is under CC-BY -License: (GPLv2 or Ruby) and CC-BY -# No isa specific -Requires: %{name}-irb = %{version}-%{release} -Provides: rdoc = %{version}-%{release} -Obsoletes: rdoc < %{version}-%{release} -BuildArch: noarch +%package -n rubygem-rdoc +Summary: A tool to generate HTML and command-line documentation for Ruby projects +Version: %{rdoc_version} +Group: Development/Libraries +License: GPLv2 and Ruby and MIT +Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(rubygems) = %{rubygems_version} +Requires: ruby(irb) = %{irb_version} +Provides: rdoc = %{version}-%{release} +Provides: ri = %{version}-%{release} +Provides: rubygem(rdoc) = %{version}-%{release} +Obsoletes: ruby-rdoc < %{version} +Obsoletes: ruby-ri < %{version} +# TODO: It seems that ri documentation differs from platform to platform due to +# some encoding bugs, therefore the documentation should be split out of this gem +# or kept platform specific. +# https://github.com/rdoc/rdoc/issues/71 +# BuildArch: noarch -%description rdoc -The rdoc is a tool to generate the documentation from Ruby source files. -It supports some output formats, like HTML, Ruby interactive reference (ri), -XML and Windows Help file (chm). +%description -n rubygem-rdoc +RDoc produces HTML and command-line documentation for Ruby projects. RDoc +includes the 'rdoc' and 'ri' tools for generating and displaying online +documentation. -%package ri -Summary: Ruby interactive reference -Group: Documentation -## ruby-irb requires ruby, which ruby-rdoc requires -#Requires: %%{name} = %%{version}-%%{release} -# No isa specific -Requires: %{name}-rdoc = %{version}-%{release} -Provides: ri = %{version}-%{release} -Obsoletes: ri < %{version}-%{release} -# FIXME: Make ruby-ri really arch independent -# BuildArch: noarch # Currently commented out +%package -n rubygem-bigdecimal +Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic +Version: %{bigdecimal_version} +Group: Development/Libraries +License: GPL+ or Artistic +Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(rubygems) = %{rubygems_version} +Provides: rubygem(bigdecimal) = %{version}-%{release} -%description ri -ri is a command line tool that displays descriptions of built-in -Ruby methods, classes and modules. For methods, it shows you the calling -sequence and a description. For classes and modules, it shows a synopsis -along with a list of the methods the class or module implements. +%description -n rubygem-bigdecimal +Ruby provides built-in support for arbitrary precision integer arithmetic. +For example: -## -## ruby-tcltk -## -%package tcltk -Summary: Tcl/Tk interface for scripting language Ruby -Group: Development/Languages -Requires: %{name}-libs%{?_isa} = %{version}-%{release} +42**13 -> 1265437718438866624512 + +BigDecimal provides similar support for very large or very accurate floating +point numbers. Decimal arithmetic is also useful for general calculation, +because it provides the correct answers people expectwhereas normal binary +floating point arithmetic often introduces subtle errors because of the +conversion between base 10 and base 2. + + +%package -n rubygem-io-console +Summary: IO/Console is a simple console utilizing library +Version: %{io_console_version} +Group: Development/Libraries +Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(rubygems) = %{rubygems_version} +Provides: rubygem(io-console) = %{version}-%{release} + +%description -n rubygem-io-console +IO/Console provides very simple and portable access to console. It doesnt +provide higher layer features, such like curses and readline. + + +%package -n rubygem-json +Summary: This is a JSON implementation as a Ruby extension in C +Version: %{json_version} +Group: Development/Libraries +License: Ruby or GPLv2 +Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(rubygems) = %{rubygems_version} +Provides: rubygem(json) = %{version}-%{release} + +%description -n rubygem-json +This is a implementation of the JSON specification according to RFC 4627. +You can think of it as a low fat alternative to XML, if you want to store +data to disk or transmit it over a network rather than use a verbose +markup language. + + +%package -n rubygem-minitest +Summary: Minitest provides a complete suite of testing facilities. +Version: %{minitest_version} +Group: Development/Libraries +License: MIT +Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(rubygems) = %{rubygems_version} +Provides: rubygem(minitest) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-minitest +minitest/unit is a small and incredibly fast unit testing framework. + +minitest/spec is a functionally complete spec engine. + +minitest/benchmark is an awesome way to assert the performance of your +algorithms in a repeatable manner. + +minitest/mock by Steven Baker, is a beautifully tiny mock object +framework. + +minitest/pride shows pride in testing and adds coloring to your test +output. + + +%package tcltk +Summary: Tcl/Tk interface for scripting language Ruby +Group: Development/Languages +Requires: %{name}-libs%{?_isa} = %{ruby_version_patch_level} +Provides: ruby(tcltk) = %{ruby_version_patch_level}-%{release} %description tcltk Tcl/Tk interface for the object-oriented scripting language Ruby. %prep -%setup -q -c -a 100 -pushd %{name}-%{arcver} -%patch23 -p1 -%patch29 -p1 -%patch33 -p1 -%patch34 -p1 -%patch100 -p1 - -( - cd ext - rm -rf tk - cp -a ../../ext/tk tk - find tk -type d -name \.svn | sort -r | xargs rm -rf - -# Remove rpath - sed -i.rpath -e 's|-Wl,-R|-L|g' tk/extconf.rb -) - -popd - -# Once fix FTBTS issue (bug 716021). Remove the below -# when it is no longer needed. -sed -i.redirect -e '\@RUBY@s@\.rb >@\.rb | cat >@' %{name}-%{arcver}/ext/dl/depend - -# Disable gdbm support on F-17 for now -%if 0%{?fedora} >= 17 -sed -i '\@dblib =@s|gdbm[^ ]*||g' %{name}-%{arcver}/ext/dbm/extconf.rb -%endif +%setup -q -n %{ruby_archive} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 +%patch11 -p1 %build -pushd %{name}-%{arcver} -for i in config.sub config.guess; do - test -f %{_datadir}/libtool/$i && cp -p %{_datadir}/libtool/$i . -done autoconf -rb_cv_func_strtod=no -export rb_cv_func_strtod - -# bug 489990 -CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -export CFLAGS - %configure \ - --with-default-kcode=none \ - --enable-shared \ - --enable-pthread \ - --disable-rpath \ - --with-readline-include=%{_includedir}/readline5 \ - --with-readline-lib=%{_libdir}/readline5 \ - --with-sitedir='%{sitelibbase}' \ - --with-sitearchdir='%{sitearchbase}' \ - --with-vendordir='%{vendorlibbase}' \ - --with-vendorarchdir='%{vendorarchbase}' + --with-rubylibprefix='%{ruby_libdir}' \ + --with-archdir='%{ruby_libarchdir}' \ + --with-sitedir='%{ruby_sitelibdir}' \ + --with-sitearchdir='%{ruby_sitearchdir}' \ + --with-vendordir='%{ruby_vendorlibdir}' \ + --with-vendorarchdir='%{ruby_vendorarchdir}' \ + --with-rubyhdrdir='%{_includedir}' \ + --with-rubygemsdir='%{rubygems_dir}' \ + --disable-rpath \ + --enable-shared \ + --disable-versioned-paths -# For example ext/socket/extconf.rb uses try_run (for getaddrinfo test), -# which executes conftest and setting LD_LIBRARY_PATH for libruby.so is -# needed. -export LD_LIBRARY_PATH=$(pwd) +# Q= makes the build output more verbose and allows to check Fedora +# compiler options. +make %{?_smp_mflags} COPY="cp -p" Q= -make RUBY_INSTALL_NAME=ruby \ - COPY="cp -p" \ - %{?_smp_mflags} -%ifarch ia64 -# Miscompilation? Buggy code? -rm -f parse.o -make OPT=-O0 RUBY_INSTALL_NAME=ruby \ - %{?_smp_mflags} -%endif - -# Avoid multilib conflict on -libs (bug 649174) -# Maybe dlconfig.rb is unneeded anyway, however for now moving -# dlconfig.rb and add wrapper (need checking) -CONFIGARCH=$(./miniruby -rrbconfig -e "puts Config::CONFIG['arch']") -[ -z "$CONFIGARCH" ] && exit 1 -pushd ext/dl -mkdir $CONFIGARCH -mv dlconfig.rb $CONFIGARCH/ -cat > dlconfig.rb <> %{buildroot}%{_sysconfdir}/rpm/macros.ruby << \EOF +%%ruby_libdir %{_datadir}/%{name} +%%ruby_libarchdir %{_libdir}/%{name} -# First gather all samples -cp -a ../%{name}-%{arcver}/sample/ ruby -cp -a \ - ../%{name}-%{arcver}/lib/README* ../%{name}-%{arcver}/doc/ \ - ruby-libs -# Use tar to keep directory hierarchy -cd ruby-libs -( - cd ../../%{name}-%{arcver} ; \ - find ext \ - -mindepth 1 \ - \( -path '*/sample/*' -o -path '*/demo/*' \) -o \ - \( -name '*.rb' -not -path '*/lib/*' -not -name extconf.rb \) -o \ - \( -name 'README*' -o -name '*.txt*' -o -name 'MANUAL*' \) \ - \ - | xargs tar cf - -) \ - | tar xf - -cd .. +# This is the local lib/arch and should not be used for packaging. +%%ruby_sitedir site_ruby +%%ruby_sitelibdir %{_prefix}/local/share/ruby/%{ruby_sitedir} +%%ruby_sitearchdir %{_prefix}/local/%{_lib}/ruby/%{ruby_sitedir} -# make sure that all doc files are the world-readable -find -type f | xargs chmod 0644 +# This is the general location for libs/archs compatible with all +# or most of the Ruby versions available in the Fedora repositories. +%%ruby_vendordir vendor_ruby +%%ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir} +%%ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir} +EOF -# Fix shebang -grep -rl '#![ \t]*%{_prefix}/local/bin' . | \ - xargs sed -i -e '1s|\(#![ \t]*\)%{_prefix}/local/bin|\1%{_bindir}|' -grep -rl '#![ \t]*\./ruby' . | \ - xargs sed -i -e '1s|\(#![ \t]*\)\./ruby|%{_bindir}/ruby|' +cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF +# The RubyGems root folder. +%%gem_dir %{gem_dir} -# Fix encoding -# Suppress message -set +x -find . -type f | while read f ; do - file $f | grep -q 'text' || continue - iconv -f UTF-8 -t UTF-8 $f &> /dev/null && continue - for encoding in \ - EUC-JP ISO-8859-1 - do - iconv -f $encoding -t UTF-8 $f -o $f.tmp 2>/dev/null && \ - { touch -r $f $f.tmp ; mv $f.tmp $f ; \ - echo -e "$f\t: converted from $encoding -t UTF-8" ; continue 2; } || \ - rm -f $f.tmp - done -done -# Enable message -set -x +# Common gem locations and files. +%%gem_instdir %%{gem_dir}/gems/%%{gem_name}-%%{version} +%%gem_extdir %%{_libdir}/gems/exts/%%{gem_name}-%%{version} +%%gem_libdir %%{gem_instdir}/lib +%%gem_cache %%{gem_dir}/cache/%%{gem_name}-%%{version}.gem +%%gem_spec %%{gem_dir}/specifications/%%{gem_name}-%%{version}.gemspec +%%gem_docdir %%{gem_dir}/doc/%%{gem_name}-%%{version} +EOF -# irb -mv ruby-libs/doc/irb/* irb -rm -rf ruby-libs/doc/irb +# Install custom operating_system.rb. +mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults +cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults -# tcltk -mv ruby-libs/ext/tk/* ruby-tcltk/ -rmdir ruby-libs/ext/tk +# Move gems root into common direcotry, out of Ruby directory structure. +mv %{buildroot}%{ruby_libdir}/gems/%{ruby_abi} %{buildroot}%{gem_dir} -## Fix encodings -pushd ruby-tcltk -cd sample -find . -path ./demos-jp/\*.rb -or -path ./tkoptdb\*.rb -or -path ./msgs_rb2/ja.msg | \ - xargs sed -i -e 's|euc-jp|utf-8|' -sed -i \ - -e '/KCODE =/s|euc|utf-8|' -e 's|EUC-JP|UTF-8|' \ - demos-jp/widget -cd .. -sed -i -e 's|EUC-JP|UTF-8|' README.1st -popd +# Create folders for gem binary extensions. +mkdir -p %{buildroot}%{gem_extdir}/exts -# done w/ docs -popd +# Move bundled rubygems to %%gem_dir and %%gem_extdir +mkdir -p %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib +mv %{buildroot}%{ruby_libdir}/rake* %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib -# installing binaries ... -make \ - -C $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{arcver} \ - DESTDIR=$RPM_BUILD_ROOT \ - install +mkdir -p %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib +mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib -# install ri doc -cp -a ./%{name}-%{arcver}/RI_TMPDIR/* $RPM_BUILD_ROOT +mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib +mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib +mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib -mkdir -p $RPM_BUILD_ROOT%{sitelibbase}/%{rubyxver} -mkdir -p $RPM_BUILD_ROOT%{sitearchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} +mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io +mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib +mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io -# remove shebang -for i in \ - $RPM_BUILD_ROOT%{vendorlibbase}/%{rubyxver}/{abbrev,generator,irb/{cmd/subirb,ext/save-history},matrix,rdoc/{markup/sample/rdoc2latex,parsers/parse_rb},set,tsort}.rb; \ - do - sed -i -e '/^#!.*/,1D' $i -done -# The following can be executable -chmod 0755 $RPM_BUILD_ROOT%{vendorlibbase}/%{rubyxver}/tkextlib/pkg_checker.rb -chmod 0644 $RPM_BUILD_ROOT%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/*.h +mkdir -p %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib +mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib +mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib/ -find $RPM_BUILD_ROOT/ -name "*.so" -exec chmod 755 {} \; +mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib +mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib -%clean -rm -rf $RPM_BUILD_ROOT +# Adjust the gemspec files so that the gems will load properly +sed -i '2 a\ + s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rake-%{rake_version}.gemspec + +sed -i '2 a\ + s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec + +sed -i -e '2 a\ + s.require_paths = ["lib"]' -e '3 a\ + s.extensions = ["bigdecimal.so"]' %{buildroot}/%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec + +sed -i -e '2 a\ + s.require_paths = ["lib"]' -e '3 a\ + s.extensions = ["io/console.so"]' %{buildroot}/%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec + +sed -i -e '2 a\ + s.require_paths = ["lib"]' -e '3 a\ + s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}/%{gem_dir}/specifications/json-%{json_version}.gemspec + +sed -i '2 a\ + s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec + +%check +make check %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig %files -%defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc %{name}-%{arcver}/NEWS -%doc %{name}-%{arcver}/README -%lang(ja) %doc %{name}-%{arcver}/README.ja -%doc %{name}-%{arcver}/ToDo -%doc tmp-ruby-docs/ruby/* -%{_bindir}/ruby +%doc COPYING +%lang(ja) %doc COPYING.ja +%doc ChangeLog +%doc GPL +%doc LEGAL +%doc NEWS +%doc README +%lang(ja) %doc README.ja +%doc ToDo +%doc doc/ChangeLog-* +%doc doc/NEWS-* %{_bindir}/erb +%{_bindir}/ruby %{_bindir}/testrb -%{_mandir}/man1/ruby.1* +%{_mandir}/man1/erb* +%{_mandir}/man1/ruby* + +# http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries +%exclude %{_libdir}/libruby-static.a + +%files devel +%doc COPYING* +%doc GPL +%doc LEGAL +%doc README.EXT +%lang(ja) %doc README.EXT.ja + +%config(noreplace) %{_sysconfdir}/rpm/macros.ruby + +%{_includedir}/ruby.h +%{_includedir}/ruby +%dir %{_includedir}/%{_normalized_cpu}-%{_target_os} +%{_includedir}/%{_normalized_cpu}-%{_target_os}/ruby -%files devel -%defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc %{name}-%{arcver}/README.EXT -%lang(ja) %doc %{name}-%{arcver}/README.EXT.ja %{_libdir}/libruby.so -%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/*.h +%{_libdir}/pkgconfig/ruby-1.9.pc -%files static -%defattr(-, root, root, -) -%{_libdir}/libruby-static.a +%files libs +%doc COPYING +%lang(ja) %doc COPYING.ja +%doc GPL +%doc LEGAL +%doc README +%lang(ja) %doc README.ja +# Exclude /usr/local directory since it is supposed to be managed by +# local system administrator. +%exclude %{ruby_sitelibdir} +%exclude %{ruby_sitearchdir} +%{ruby_vendorlibdir} +%{ruby_vendorarchdir} -%files libs -%defattr(-, root, root, -) -%doc %{name}-%{arcver}/README -%lang(ja) %doc %{name}-%{arcver}/README.ja -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc tmp-ruby-docs/ruby-libs/* -%dir %{vendorlibbase} -%dir %{vendorlibbase}/%{rubyxver} -%{sitelibbase} -%ifarch ppc64 s390x sparc64 x86_64 -%dir %{vendorarchbase} -%dir %{vendorarchbase}/%{rubyxver} -%dir %{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} -%{sitearchbase} -%else -%dir %{vendorlibbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os} -%endif -## the following files should goes into ruby-tcltk package. -%exclude %{vendorlibbase}/%{rubyxver}/*tk.rb -%exclude %{vendorlibbase}/%{rubyxver}/tcltk.rb -%exclude %{vendorlibbase}/%{rubyxver}/tk -%exclude %{vendorlibbase}/%{rubyxver}/tk*.rb -%exclude %{vendorlibbase}/%{rubyxver}/tkextlib -%exclude %{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/tcltklib.so -%exclude %{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/tkutil.so -## the following files should goes into ruby-rdoc package. -%exclude %{vendorlibbase}/%{rubyxver}/rdoc -## the following files should goes into ruby-irb package. -%exclude %{vendorlibbase}/%{rubyxver}/irb.rb -%exclude %{vendorlibbase}/%{rubyxver}/irb -## files in ruby-libs from here -%{vendorlibbase}/%{rubyxver}/*.rb -%{vendorlibbase}/%{rubyxver}/bigdecimal -%{vendorlibbase}/%{rubyxver}/cgi -%{vendorlibbase}/%{rubyxver}/date -%{vendorlibbase}/%{rubyxver}/digest -%{vendorlibbase}/%{rubyxver}/dl -%{vendorlibbase}/%{rubyxver}/drb -%{vendorlibbase}/%{rubyxver}/io -%{vendorlibbase}/%{rubyxver}/net -%{vendorlibbase}/%{rubyxver}/openssl -%{vendorlibbase}/%{rubyxver}/optparse -%{vendorlibbase}/%{rubyxver}/racc -%{vendorlibbase}/%{rubyxver}/rexml -%{vendorlibbase}/%{rubyxver}/rinda -%{vendorlibbase}/%{rubyxver}/rss -%{vendorlibbase}/%{rubyxver}/runit -%{vendorlibbase}/%{rubyxver}/shell -%{vendorlibbase}/%{rubyxver}/soap -%{vendorlibbase}/%{rubyxver}/test -%{vendorlibbase}/%{rubyxver}/uri -%{vendorlibbase}/%{rubyxver}/webrick -%{vendorlibbase}/%{rubyxver}/wsdl -%{vendorlibbase}/%{rubyxver}/xmlrpc -%{vendorlibbase}/%{rubyxver}/xsd -%{vendorlibbase}/%{rubyxver}/yaml +# List all these files explicitly to prevent surprises +# Platform independent libraries. +%dir %{ruby_libdir} +%{ruby_libdir}/*.rb +%exclude %{ruby_libdir}/*-tk.rb +%exclude %{ruby_libdir}/irb.rb +%exclude %{ruby_libdir}/tcltk.rb +%exclude %{ruby_libdir}/tk*.rb +%{ruby_libdir}/cgi +%{ruby_libdir}/date +%{ruby_libdir}/digest +%{ruby_libdir}/dl +%{ruby_libdir}/drb +%{ruby_libdir}/fiddle +%exclude %{ruby_libdir}/gems +%exclude %{ruby_libdir}/irb +%{ruby_libdir}/matrix +%{ruby_libdir}/net +%{ruby_libdir}/openssl +%{ruby_libdir}/optparse +%{ruby_libdir}/psych +%{ruby_libdir}/racc +%{ruby_libdir}/rbconfig +%{ruby_libdir}/rexml +%{ruby_libdir}/rinda +%{ruby_libdir}/ripper +%{ruby_libdir}/rss +%{ruby_libdir}/shell +%{ruby_libdir}/syck +%{ruby_libdir}/test +%exclude %{ruby_libdir}/tk +%exclude %{ruby_libdir}/tkextlib +%{ruby_libdir}/uri +%{ruby_libdir}/webrick +%{ruby_libdir}/xmlrpc +%{ruby_libdir}/yaml + +# Platform specific libraries. %{_libdir}/libruby.so.* -%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/*.so -%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/digest -%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/io -%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/racc -%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/rbconfig.rb +%dir %{ruby_libarchdir} +%{ruby_libarchdir}/continuation.so +%{ruby_libarchdir}/coverage.so +%{ruby_libarchdir}/curses.so +%{ruby_libarchdir}/date_core.so +%{ruby_libarchdir}/dbm.so +%dir %{ruby_libarchdir}/digest +%{ruby_libarchdir}/digest.so +%{ruby_libarchdir}/digest/bubblebabble.so +%{ruby_libarchdir}/digest/md5.so +%{ruby_libarchdir}/digest/rmd160.so +%{ruby_libarchdir}/digest/sha1.so +%{ruby_libarchdir}/digest/sha2.so +%dir %{ruby_libarchdir}/dl +%{ruby_libarchdir}/dl.so +%{ruby_libarchdir}/dl/callback.so +%dir %{ruby_libarchdir}/enc +%{ruby_libarchdir}/enc/big5.so +%{ruby_libarchdir}/enc/cp949.so +%{ruby_libarchdir}/enc/emacs_mule.so +%{ruby_libarchdir}/enc/encdb.so +%{ruby_libarchdir}/enc/euc_jp.so +%{ruby_libarchdir}/enc/euc_kr.so +%{ruby_libarchdir}/enc/euc_tw.so +%{ruby_libarchdir}/enc/gb18030.so +%{ruby_libarchdir}/enc/gb2312.so +%{ruby_libarchdir}/enc/gbk.so +%{ruby_libarchdir}/enc/iso_8859_1.so +%{ruby_libarchdir}/enc/iso_8859_10.so +%{ruby_libarchdir}/enc/iso_8859_11.so +%{ruby_libarchdir}/enc/iso_8859_13.so +%{ruby_libarchdir}/enc/iso_8859_14.so +%{ruby_libarchdir}/enc/iso_8859_15.so +%{ruby_libarchdir}/enc/iso_8859_16.so +%{ruby_libarchdir}/enc/iso_8859_2.so +%{ruby_libarchdir}/enc/iso_8859_3.so +%{ruby_libarchdir}/enc/iso_8859_4.so +%{ruby_libarchdir}/enc/iso_8859_5.so +%{ruby_libarchdir}/enc/iso_8859_6.so +%{ruby_libarchdir}/enc/iso_8859_7.so +%{ruby_libarchdir}/enc/iso_8859_8.so +%{ruby_libarchdir}/enc/iso_8859_9.so +%{ruby_libarchdir}/enc/koi8_r.so +%{ruby_libarchdir}/enc/koi8_u.so +%{ruby_libarchdir}/enc/shift_jis.so +%dir %{ruby_libarchdir}/enc/trans +%{ruby_libarchdir}/enc/trans/big5.so +%{ruby_libarchdir}/enc/trans/chinese.so +%{ruby_libarchdir}/enc/trans/emoji.so +%{ruby_libarchdir}/enc/trans/emoji_iso2022_kddi.so +%{ruby_libarchdir}/enc/trans/emoji_sjis_docomo.so +%{ruby_libarchdir}/enc/trans/emoji_sjis_kddi.so +%{ruby_libarchdir}/enc/trans/emoji_sjis_softbank.so +%{ruby_libarchdir}/enc/trans/escape.so +%{ruby_libarchdir}/enc/trans/gb18030.so +%{ruby_libarchdir}/enc/trans/gbk.so +%{ruby_libarchdir}/enc/trans/iso2022.so +%{ruby_libarchdir}/enc/trans/japanese.so +%{ruby_libarchdir}/enc/trans/japanese_euc.so +%{ruby_libarchdir}/enc/trans/japanese_sjis.so +%{ruby_libarchdir}/enc/trans/korean.so +%{ruby_libarchdir}/enc/trans/single_byte.so +%{ruby_libarchdir}/enc/trans/transdb.so +%{ruby_libarchdir}/enc/trans/utf8_mac.so +%{ruby_libarchdir}/enc/trans/utf_16_32.so +%{ruby_libarchdir}/enc/utf_16be.so +%{ruby_libarchdir}/enc/utf_16le.so +%{ruby_libarchdir}/enc/utf_32be.so +%{ruby_libarchdir}/enc/utf_32le.so +%{ruby_libarchdir}/enc/windows_1251.so +%{ruby_libarchdir}/etc.so +%{ruby_libarchdir}/fcntl.so +%{ruby_libarchdir}/fiber.so +%{ruby_libarchdir}/fiddle.so +%{ruby_libarchdir}/gdbm.so +%{ruby_libarchdir}/iconv.so +%dir %{ruby_libarchdir}/io +%{ruby_libarchdir}/io/nonblock.so +%{ruby_libarchdir}/io/wait.so +%dir %{ruby_libarchdir}/mathn +%{ruby_libarchdir}/mathn/complex.so +%{ruby_libarchdir}/mathn/rational.so +%{ruby_libarchdir}/nkf.so +%{ruby_libarchdir}/objspace.so +%{ruby_libarchdir}/openssl.so +%{ruby_libarchdir}/pathname.so +%{ruby_libarchdir}/psych.so +%{ruby_libarchdir}/pty.so +%dir %{ruby_libarchdir}/racc +%{ruby_libarchdir}/racc/cparse.so +%{ruby_libarchdir}/rbconfig.rb +%{ruby_libarchdir}/readline.so +%{ruby_libarchdir}/ripper.so +%{ruby_libarchdir}/sdbm.so +%{ruby_libarchdir}/socket.so +%{ruby_libarchdir}/stringio.so +%{ruby_libarchdir}/strscan.so +%{ruby_libarchdir}/syck.so +%{ruby_libarchdir}/syslog.so +%exclude %{ruby_libarchdir}/tcltklib.so +%exclude %{ruby_libarchdir}/tkutil.so +%{ruby_libarchdir}/zlib.so -%files tcltk -%defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc tmp-ruby-docs/ruby-tcltk/* -%{vendorlibbase}/%{rubyxver}/*-tk.rb -%{vendorlibbase}/%{rubyxver}/tcltk.rb -%{vendorlibbase}/%{rubyxver}/tk -%{vendorlibbase}/%{rubyxver}/tk*.rb -%{vendorlibbase}/%{rubyxver}/tkextlib -%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/tcltklib.so -%{vendorarchbase}/%{rubyxver}/%{_normalized_cpu}-%{_target_os}/tkutil.so +%files -n rubygems +%{_bindir}/gem +%{rubygems_dir} +%{gem_dir} +%exclude %{gem_dir}/gems/* +%{_exec_prefix}/lib*/gems +%exclude %{_exec_prefix}/lib*/gems/exts/bigdecimal-%{bigdecimal_version} +%exclude %{_exec_prefix}/lib*/gems/exts/io-console-%{io_console_version} +%exclude %{_exec_prefix}/lib*/gems/exts/json-%{json_version} +%exclude %{gem_dir}/gems/rake-%{rake_version} +%exclude %{gem_dir}/gems/rdoc-%{rdoc_version} +%exclude %{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec +%exclude %{gem_dir}/specifications/io-console-%{io_console_version}.gemspec +%exclude %{gem_dir}/specifications/json-%{json_version}.gemspec +%exclude %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec +%exclude %{gem_dir}/specifications/rake-%{rake_version}.gemspec +%exclude %{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec -%files rdoc -%defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%{_bindir}/rdoc -%{vendorlibbase}/%{rubyxver}/rdoc +%files -n rubygems-devel +%config(noreplace) %{_sysconfdir}/rpm/macros.rubygems + +%files -n rubygem-rake +%{_bindir}/rake +%{gem_dir}/gems/rake-%{rake_version} +%{gem_dir}/specifications/rake-%{rake_version}.gemspec +%{_mandir}/man1/rake.1* %files irb -%defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL -%doc tmp-ruby-docs/irb/* %{_bindir}/irb -%{vendorlibbase}/%{rubyxver}/irb.rb -%{vendorlibbase}/%{rubyxver}/irb +%{ruby_libdir}/irb.rb +%{ruby_libdir}/irb +%{_mandir}/man1/irb.1* -%files ri -%defattr(-, root, root, -) -%doc %{name}-%{arcver}/COPYING* -%doc %{name}-%{arcver}/ChangeLog -%doc %{name}-%{arcver}/GPL -%doc %{name}-%{arcver}/LEGAL -%doc %{name}-%{arcver}/LGPL +%files -n rubygem-rdoc +%{_bindir}/rdoc %{_bindir}/ri +%{gem_dir}/gems/rdoc-%{rdoc_version} +%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec +%{_mandir}/man1/ri* %{_datadir}/ri +%files -n rubygem-bigdecimal +%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version} +%{gem_dir}/gems/bigdecimal-%{bigdecimal_version} +%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec + +%files -n rubygem-io-console +%{_libdir}/gems/exts/io-console-%{io_console_version} +%{gem_dir}/gems/io-console-%{io_console_version} +%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec + +%files -n rubygem-json +%{_libdir}/gems/exts/json-%{json_version} +%{gem_dir}/gems/json-%{json_version} +%{gem_dir}/specifications/json-%{json_version}.gemspec + +%files -n rubygem-minitest +%{gem_dir}/gems/minitest-%{minitest_version} +%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec + +%files tcltk +%{ruby_libdir}/*-tk.rb +%{ruby_libdir}/tcltk.rb +%{ruby_libdir}/tk*.rb +%{ruby_libarchdir}/tcltklib.so +%{ruby_libarchdir}/tkutil.so +%{ruby_libdir}/tk +%{ruby_libdir}/tkextlib + %changelog +* Wed Jan 18 2012 V鱈t Ondruch - 1.9.3.0-5 +- Add rubygems dependency on io-console for user interactions. +- Gems license clarification. + +* Tue Jan 17 2012 V鱈t Ondruch - 1.9.3.0-4 +- Bundled gems moved into dedicated directories and subpackages. +- Create and own RubyGems directories for binary extensions. +- Fix build with GCC 4.7. + +* Wed Jan 04 2012 V鱈t Ondruch - 1.9.3.0-3 +- Fix RHEL build. +- Fixed directory ownership. +- Verose build output. + +* Wed Dec 14 2011 V鱈t Ondruch - 1.9.3.0-2 +- Install RubyGems outside of Ruby directory structure. +- RubyGems has not its own -devel subpackage. +- Enhanced macros.ruby and macros.rubygems. +- All tests are green now (bkabrda). + +* Tue Sep 23 2011 V鱈t Ondruch - 1.9.3.0-1 +- Initial package + * Sat Jan 14 2012 Fedora Release Engineering - 1.8.7.357-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/rubygems-1.8.11-binary-extensions.patch b/rubygems-1.8.11-binary-extensions.patch new file mode 100644 index 0000000..5a3bfb4 --- /dev/null +++ b/rubygems-1.8.11-binary-extensions.patch @@ -0,0 +1,296 @@ +From 5a37a3489491a33f2e7011043fbbcd9a765e1777 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 3 Nov 2011 16:43:05 +0100 +Subject: [PATCH 1/6] Add dedicate extensions folder into $LOAD_PATH. + +--- + lib/rubygems/specification.rb | 37 ++++++++++++++++++++++++++++++------- + 1 files changed, 30 insertions(+), 7 deletions(-) + +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index 97db19e..263e7d3 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -843,6 +843,12 @@ class Gem::Specification + File.join full_gem_path, path + end + ++ unless extensions.empty? ++ paths += require_paths.map do |path| ++ File.join ext_dir, path ++ end ++ end ++ + # gem directories must come after -I and ENV['RUBYLIB'] + insert_index = Gem.load_path_insert_index + +@@ -954,16 +960,16 @@ class Gem::Specification + + def contains_requirable_file? file + root = full_gem_path ++ ext = ext_dir ++ ++ require_paths.any? do |lib| ++ base = ["#{root}/#{lib}/#{file}"] ++ base << "#{ext}/#{lib}/#{file}" unless extensions.empty? + +- require_paths.each do |lib| +- base = "#{root}/#{lib}/#{file}" +- Gem.suffixes.each do |suf| +- path = "#{base}#{suf}" +- return true if File.file? path ++ base.any? do |path| ++ Gem.suffixes.any? { |suf| File.file? "#{path}#{suf}" } + end + end +- +- return false + end + + ## +@@ -1273,6 +1279,23 @@ class Gem::Specification + end + + ## ++ # Returns the full path to this spec's ext directory. ++ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 ++ ++ def ext_dir ++ @gem_dir ||= File.expand_path File.join(exts_dir, full_name) ++ end ++ ++ ## ++ # Returns the full path to the exts directory containing this spec's ++ # gem directory. eg: /usr/local/lib/ruby/1.8/exts ++ ++ def exts_dir ++ # TODO: this logic seems terribly broken, but tests fail if just base_dir ++ @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts") ++ end ++ ++ ## + # Deprecated and ignored, defaults to true. + # + # Formerly used to indicate this gem was RDoc-capable. +-- +1.7.7.3 + + +From 671e4285bf9db948bc5f054d7d3d931cdd7a17f8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 16 Nov 2011 13:26:48 +0100 +Subject: [PATCH 2/6] Use spec's ext dir for extension installation. + +--- + lib/rubygems/installer.rb | 2 +- + lib/rubygems/specification.rb | 7 +++---- + 2 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb +index 74d803d..0063c7f 100644 +--- a/lib/rubygems/installer.rb ++++ b/lib/rubygems/installer.rb +@@ -499,7 +499,7 @@ TEXT + def build_extensions + return if spec.extensions.empty? + say "Building native extensions. This could take a while..." +- dest_path = File.join gem_dir, spec.require_paths.first ++ dest_path = spec.ext_dir + ran_rake = false # only run rake once + + spec.extensions.each do |extension| +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index 263e7d3..d31b93b 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -1283,16 +1283,15 @@ class Gem::Specification + # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 + + def ext_dir +- @gem_dir ||= File.expand_path File.join(exts_dir, full_name) ++ @ext_dir ||= File.join exts_dir, full_name, require_paths.first + end + + ## + # Returns the full path to the exts directory containing this spec's +- # gem directory. eg: /usr/local/lib/ruby/1.8/exts ++ # gem directory. eg: /usr/local/lib/ruby/1.8/gems + + def exts_dir +- # TODO: this logic seems terribly broken, but tests fail if just base_dir +- @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts") ++ @exts_dir ||= gems_dir + end + + ## +-- +1.7.7.3 + + +From 11b4a0cbadd8b1d3320f838881aa60feb6f848e7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 16 Nov 2011 14:52:16 +0100 +Subject: [PATCH 3/6] Simplify the extending of $LOAD_PATH for binary gems. + +--- + lib/rubygems/specification.rb | 11 +++++------ + 1 files changed, 5 insertions(+), 6 deletions(-) + +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index d31b93b..e65ea2d 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -843,11 +843,7 @@ class Gem::Specification + File.join full_gem_path, path + end + +- unless extensions.empty? +- paths += require_paths.map do |path| +- File.join ext_dir, path +- end +- end ++ paths << ext_dir unless extensions.empty? || paths.include?(ext_dir) + + # gem directories must come after -I and ENV['RUBYLIB'] + insert_index = Gem.load_path_insert_index +@@ -1291,7 +1287,10 @@ class Gem::Specification + # gem directory. eg: /usr/local/lib/ruby/1.8/gems + + def exts_dir +- @exts_dir ||= gems_dir ++ @exts_dir ||= begin ++ dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} ++ dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir ++ end + end + + ## +-- +1.7.7.3 + + +From 5d46cd2b1ac9517a9cbcfa430261e62bb3a376b8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 9 Dec 2011 16:31:04 +0100 +Subject: [PATCH 4/6] Fix the binary extension search path construction. + +--- + lib/rubygems/installer.rb | 2 +- + lib/rubygems/specification.rb | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb +index 0063c7f..83b8fd5 100644 +--- a/lib/rubygems/installer.rb ++++ b/lib/rubygems/installer.rb +@@ -499,7 +499,7 @@ TEXT + def build_extensions + return if spec.extensions.empty? + say "Building native extensions. This could take a while..." +- dest_path = spec.ext_dir ++ dest_path = File.join spec.ext_dir, spec.require_paths.first + ran_rake = false # only run rake once + + spec.extensions.each do |extension| +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index e65ea2d..8be2ade 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -843,7 +843,7 @@ class Gem::Specification + File.join full_gem_path, path + end + +- paths << ext_dir unless extensions.empty? || paths.include?(ext_dir) ++ paths << File.join(ext_dir, require_paths.first) unless extensions.empty? || (ext_dir == full_gem_path) + + # gem directories must come after -I and ENV['RUBYLIB'] + insert_index = Gem.load_path_insert_index +@@ -1279,7 +1279,7 @@ class Gem::Specification + # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 + + def ext_dir +- @ext_dir ||= File.join exts_dir, full_name, require_paths.first ++ @ext_dir ||= File.join exts_dir, full_name + end + + ## +-- +1.7.7.3 + + +From 6229583633802b45e5a3e5689ab9077347cd9ef7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 13 Dec 2011 12:14:54 +0100 +Subject: [PATCH 5/6] Remove binary extensions during uninstall. + +--- + lib/rubygems/uninstaller.rb | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb +index cc32ea4..94d78e0 100644 +--- a/lib/rubygems/uninstaller.rb ++++ b/lib/rubygems/uninstaller.rb +@@ -213,6 +213,7 @@ class Gem::Uninstaller + File.writable?(spec.base_dir) + + FileUtils.rm_rf spec.full_gem_path ++ FileUtils.rm_rf spec.ext_dir + + # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) + old_platform_name = [spec.name, +-- +1.7.7.3 + + +From bc40e1b9f60a9a04456e3504ffe6ee600b6da269 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 13 Dec 2011 14:27:14 +0100 +Subject: [PATCH 6/6] Avoid dependency on customized operating_system.rb. + +--- + lib/rubygems/defaults.rb | 11 +++++++++++ + lib/rubygems/specification.rb | 5 +---- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb +index 20b4198..6d8711f 100644 +--- a/lib/rubygems/defaults.rb ++++ b/lib/rubygems/defaults.rb +@@ -87,6 +87,17 @@ module Gem + end + + ## ++ # Returns binary extensions dir for specified RubyGems base dir or nil ++ # if such directory cannot be determined. ++ # ++ # By default, the binary extensions are located side by side with their ++ # Ruby counterparts, therefore nil is returned ++ ++ def self.default_ext_dir_for base_dir ++ nil ++ end ++ ++ ## + # The default system-wide source info cache directory + + def self.default_system_source_cache_dir +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index 8be2ade..f54210a 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -1287,10 +1287,7 @@ class Gem::Specification + # gem directory. eg: /usr/local/lib/ruby/1.8/gems + + def exts_dir +- @exts_dir ||= begin +- dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} +- dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir +- end ++ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir + end + + ## +-- +1.7.7.3 + diff --git a/sources b/sources index 1d94212..e874ffe 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -3abd9e2a29f756a0d30c7bfca578cdeb ruby-1.8.7-p357.tar.bz2 -01b1053cf357459349bf74363756ad41 ruby-revc2dfaa7d40531aef3706bcc16f38178b0c6633ee-ext_tk.tar.gz +8e2fef56185cfbaf29d0c8329fc77c05 ruby-1.9.3-p0.tar.gz From 1fd7d3cfa1de0a20a8e136044e4fd09c86ea842f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 18 Jan 2012 15:59:20 +0100 Subject: [PATCH 186/529] Order changelog. --- ruby.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index a8c8bf2..fe89620 100644 --- a/ruby.spec +++ b/ruby.spec @@ -702,6 +702,7 @@ make check %changelog * Wed Jan 18 2012 V鱈t Ondruch - 1.9.3.0-5 +- Initial release of Ruby 1.9.3. - Add rubygems dependency on io-console for user interactions. - Gems license clarification. @@ -710,18 +711,18 @@ make check - Create and own RubyGems directories for binary extensions. - Fix build with GCC 4.7. -* Wed Jan 04 2012 V鱈t Ondruch - 1.9.3.0-3 +* Wed Jan 16 2012 V鱈t Ondruch - 1.9.3.0-3 - Fix RHEL build. - Fixed directory ownership. - Verose build output. -* Wed Dec 14 2011 V鱈t Ondruch - 1.9.3.0-2 +* Wed Jan 15 2012 V鱈t Ondruch - 1.9.3.0-2 - Install RubyGems outside of Ruby directory structure. - RubyGems has not its own -devel subpackage. - Enhanced macros.ruby and macros.rubygems. - All tests are green now (bkabrda). -* Tue Sep 23 2011 V鱈t Ondruch - 1.9.3.0-1 +* Tue Jan 14 2012 V鱈t Ondruch - 1.9.3.0-1 - Initial package * Sat Jan 14 2012 Fedora Release Engineering - 1.8.7.357-2 From c3215b737202a72d4f2bbd472a7ac030c83525eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 26 Jan 2012 11:52:47 +0100 Subject: [PATCH 187/529] Relax dependencies to allow external updates of bundled gems. --- ruby.spec | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/ruby.spec b/ruby.spec index fe89620..a65192a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -51,7 +51,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -Release: 5%{?dist} +Release: 6%{?dist} Group: Development/Languages License: Ruby or BSD URL: http://ruby-lang.org/ @@ -138,8 +138,8 @@ Version: %{rubygems_version} Group: Development/Libraries License: Ruby or MIT Requires: ruby(abi) = %{ruby_abi} -Requires: rubygem(rdoc) = %{rdoc_version} -Requires: rubygem(io-console) = %{io_console_version} +Requires: rubygem(rdoc) >= %{rdoc_version} +Requires: rubygem(io-console) >= %{io_console_version} Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} BuildArch: noarch @@ -167,7 +167,7 @@ Version: %{rake_version} Group: Development/Libraries License: Ruby or MIT Requires: ruby(abi) = %{ruby_abi} -Requires: ruby(rubygems) = %{rubygems_version} +Requires: ruby(rubygems) >= %{rubygems_version} Provides: rake = %{version}-%{release} Provides: rubygem(rake) = %{version}-%{release} BuildArch: noarch @@ -197,7 +197,7 @@ Version: %{rdoc_version} Group: Development/Libraries License: GPLv2 and Ruby and MIT Requires: ruby(abi) = %{ruby_abi} -Requires: ruby(rubygems) = %{rubygems_version} +Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} Provides: rdoc = %{version}-%{release} Provides: ri = %{version}-%{release} @@ -222,7 +222,7 @@ Version: %{bigdecimal_version} Group: Development/Libraries License: GPL+ or Artistic Requires: ruby(abi) = %{ruby_abi} -Requires: ruby(rubygems) = %{rubygems_version} +Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(bigdecimal) = %{version}-%{release} %description -n rubygem-bigdecimal @@ -243,7 +243,7 @@ Summary: IO/Console is a simple console utilizing library Version: %{io_console_version} Group: Development/Libraries Requires: ruby(abi) = %{ruby_abi} -Requires: ruby(rubygems) = %{rubygems_version} +Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(io-console) = %{version}-%{release} %description -n rubygem-io-console @@ -257,7 +257,7 @@ Version: %{json_version} Group: Development/Libraries License: Ruby or GPLv2 Requires: ruby(abi) = %{ruby_abi} -Requires: ruby(rubygems) = %{rubygems_version} +Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(json) = %{version}-%{release} %description -n rubygem-json @@ -273,7 +273,7 @@ Version: %{minitest_version} Group: Development/Libraries License: MIT Requires: ruby(abi) = %{ruby_abi} -Requires: ruby(rubygems) = %{rubygems_version} +Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(minitest) = %{version}-%{release} BuildArch: noarch @@ -701,6 +701,9 @@ make check %{ruby_libdir}/tkextlib %changelog +* Thu Jan 26 2012 V鱈t Ondruch - 1.9.3.0-6 +- Relax dependencies to allow external updates of bundled gems. + * Wed Jan 18 2012 V鱈t Ondruch - 1.9.3.0-5 - Initial release of Ruby 1.9.3. - Add rubygems dependency on io-console for user interactions. From 70cdc7987804fd11c327a03b49548fe5f3401f7e Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Mon, 30 Jan 2012 06:27:19 +0900 Subject: [PATCH 188/529] Make mkmf.rb verbose by default --- ruby-1.9.3-mkmf-verbose.patch | 11 +++++++++++ ruby.spec | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 ruby-1.9.3-mkmf-verbose.patch diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch new file mode 100644 index 0000000..7da66c8 --- /dev/null +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -0,0 +1,11 @@ +--- ruby-1.9.3-p0/lib/mkmf.rb.debug 2011-08-11 15:07:37.000000000 +0900 ++++ ruby-1.9.3-p0/lib/mkmf.rb 2012-01-29 21:34:17.000000000 +0900 +@@ -1638,7 +1638,7 @@ + SHELL = /bin/sh + + # V=0 quiet, V=1 verbose. other values don't work. +-V = 0 ++V = 1 + Q1 = $(V:1=) + Q = $(Q1:0=@) + n=$(NULLCMD) diff --git a/ruby.spec b/ruby.spec index a65192a..5b4e22b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -51,7 +51,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -Release: 6%{?dist} +Release: 7%{?dist} Group: Development/Languages License: Ruby or BSD URL: http://ruby-lang.org/ @@ -89,6 +89,8 @@ Patch10: ruby-1.9.3-prevent-optimizing-sp.patch # Fixes json encoding failures when build with GCC 4.7. # http://bugs.ruby-lang.org/issues/5888 Patch11: ruby-1.9.3-fix-json-parser.patch +# Make mkmf verbose by default +Patch12: ruby-1.9.3-mkmf-verbose.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -316,6 +318,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch9 -p1 %patch10 %patch11 -p1 +%patch12 -p1 %build autoconf @@ -701,6 +704,9 @@ make check %{ruby_libdir}/tkextlib %changelog +* Sun Jan 29 2012 Mamoru Tasaka - 1.9.3.0-7 +- Make mkmf.rb verbose by default + * Thu Jan 26 2012 V鱈t Ondruch - 1.9.3.0-6 - Relax dependencies to allow external updates of bundled gems. From ef4f0ea4171a971e72f6ebfd07486054256c9004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 21 Feb 2012 12:15:40 +0100 Subject: [PATCH 189/529] Upgrade to Ruby 1.9.3-p125. --- .gitignore | 1 + ...9.3-added-site-and-vendor-arch-flags.patch | 10 ++-- ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 8 +-- ruby-1.9.3-custom-rubygems-location.patch | 4 +- ruby-1.9.3-disable-versioned-paths.patch | 2 +- ruby-1.9.3-fix-json-parser.patch | 40 -------------- ruby-1.9.3-prevent-optimizing-sp.patch | 53 ------------------- ruby.spec | 19 +++---- sources | 2 +- 10 files changed, 23 insertions(+), 118 deletions(-) delete mode 100644 ruby-1.9.3-fix-json-parser.patch delete mode 100644 ruby-1.9.3-prevent-optimizing-sp.patch diff --git a/.gitignore b/.gitignore index 03a0175..c58f574 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-revc2dfaa7d40531aef3706bcc16f38178b0c6633ee-ext_tk.tar.gz /ruby-1.8.7-p357.tar.bz2 /ruby-1.9.3-p0.tar.gz +/ruby-1.9.3-p125.tar.gz diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index 9dff272..1363063 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in index 83e5d76..31532bd 100644 --- a/configure.in +++ b/configure.in -@@ -2801,6 +2801,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -2811,6 +2811,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 83e5d76..31532bd 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]), [vendordir=$withval], -@@ -2810,19 +2819,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -2820,19 +2829,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 83e5d76..31532bd 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -2840,6 +2862,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -2850,6 +2872,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -92,7 +92,7 @@ index 83e5d76..31532bd 100644 AS_CASE(["$RUBY_VENDOR_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' -@@ -2847,6 +2876,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], +@@ -2857,6 +2886,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], [ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" ]) @@ -106,7 +106,7 @@ index 83e5d76..31532bd 100644 pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], ["$RUBY_EXEC_PREFIX/"*], [ -@@ -2868,19 +2904,23 @@ if test "x$SITE_DIR" = xno; then +@@ -2878,19 +2914,23 @@ if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB) else AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH}) diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index 734c5eb..f5a8c3d 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -1,6 +1,6 @@ --- a/configure.in.orig 2011-10-18 08:56:21.587594685 +0200 +++ b/configure.in 2011-10-18 08:56:59.751593321 +0200 -@@ -2925,6 +2925,8 @@ +@@ -2935,6 +2935,8 @@ configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index b8feb96..8440ea7 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -26,7 +26,7 @@ diff --git a/configure.in b/configure.in index 83e5d76..e6dc38c 100644 --- a/configure.in +++ b/configure.in -@@ -2783,6 +2783,15 @@ else +@@ -2793,6 +2793,15 @@ else RUBY_LIB_VERSION="\"${ruby_version}\"" fi @@ -42,7 +42,7 @@ index 83e5d76..e6dc38c 100644 AC_ARG_WITH(sitedir, AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]), [sitedir=$withval], -@@ -2805,16 +2814,25 @@ if test "${LOAD_RELATIVE+set}"; then +@@ -2815,16 +2824,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" @@ -68,7 +68,7 @@ index 83e5d76..e6dc38c 100644 AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -2845,6 +2863,7 @@ else +@@ -2855,6 +2873,7 @@ else fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX}) @@ -76,7 +76,7 @@ index 83e5d76..e6dc38c 100644 if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB) else -@@ -2859,6 +2878,7 @@ fi +@@ -2869,6 +2888,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 2566ef6..62d3dad 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index b1bc951..91c5d0d 100644 --- a/configure.in +++ b/configure.in -@@ -2828,6 +2828,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -2838,6 +2838,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDORARCH_DIR}" done @@ -29,7 +29,7 @@ index b1bc951..91c5d0d 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" -@@ -2921,6 +2928,7 @@ AC_SUBST(sitearch)dnl +@@ -2931,6 +2938,7 @@ AC_SUBST(sitearch)dnl AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-1.9.3-disable-versioned-paths.patch b/ruby-1.9.3-disable-versioned-paths.patch index afafb04..6d0c5e1 100644 --- a/ruby-1.9.3-disable-versioned-paths.patch +++ b/ruby-1.9.3-disable-versioned-paths.patch @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index e742e74..86cb68f 100644 --- a/configure.in +++ b/configure.in -@@ -2953,6 +2953,17 @@ else +@@ -2963,6 +2963,17 @@ else fi AC_SUBST(USE_RUBYGEMS) diff --git a/ruby-1.9.3-fix-json-parser.patch b/ruby-1.9.3-fix-json-parser.patch deleted file mode 100644 index 9621c72..0000000 --- a/ruby-1.9.3-fix-json-parser.patch +++ /dev/null @@ -1,40 +0,0 @@ -diff --git a/ext/json/parser/parser.c b/ext/json/parser/parser.c -index d1d14c7..1773616 100644 ---- a/ext/json/parser/parser.c -+++ b/ext/json/parser/parser.c -@@ -1293,6 +1293,7 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd) - { - char *p = string, *pe = string, *unescape; - int unescape_len; -+ char buf[4]; - - while (pe < stringEnd) { - if (*pe == '\\') { -@@ -1325,7 +1326,6 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd) - if (pe > stringEnd - 4) { - return Qnil; - } else { -- char buf[4]; - UTF32 ch = unescape_unicode((unsigned char *) ++pe); - pe += 3; - if (UNI_SUR_HIGH_START == (ch & 0xFC00)) { -diff --git a/ext/json/parser/parser.rl b/ext/json/parser/parser.rl -index e7d47e1..33e775c 100644 ---- a/ext/json/parser/parser.rl -+++ b/ext/json/parser/parser.rl -@@ -393,6 +393,7 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd) - { - char *p = string, *pe = string, *unescape; - int unescape_len; -+ char buf[4]; - - while (pe < stringEnd) { - if (*pe == '\\') { -@@ -425,7 +426,6 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd) - if (pe > stringEnd - 4) { - return Qnil; - } else { -- char buf[4]; - UTF32 ch = unescape_unicode((unsigned char *) ++pe); - pe += 3; - if (UNI_SUR_HIGH_START == (ch & 0xFC00)) { diff --git a/ruby-1.9.3-prevent-optimizing-sp.patch b/ruby-1.9.3-prevent-optimizing-sp.patch deleted file mode 100644 index 085d7f8..0000000 --- a/ruby-1.9.3-prevent-optimizing-sp.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: ChangeLog -=================================================================== ---- ChangeLog (revision 34277) -+++ ChangeLog (revision 34278) -@@ -1,3 +1,13 @@ -+Thu Jan 12 13:51:00 2012 NARUSE, Yui -+ -+ * cont.c (cont_restore_0): prevent optimizing out `sp'. sp is used for -+ reserving a memory space with ALLOCA_N for restoring machine stack -+ stored in cont->machine_stack, but clang optimized out it (and -+ maybe #5851 is also caused by this). -+ This affected TestContinuation#test_check_localvars. -+ -+ * cont.c (cont_restore_1): revert workaround introduced in r32201. -+ - Mon Oct 10 22:33:12 2011 KOSAKI Motohiro - - * test/-ext-/old_thread_select/test_old_thread_select.rb: -Index: cont.c -=================================================================== ---- cont.c (revision 34277) -+++ cont.c (revision 34278) -@@ -669,10 +669,9 @@ - } - #endif - if (cont->machine_stack_src) { -- size_t i; - FLUSH_REGISTER_WINDOWS; -- for (i = 0; i < cont->machine_stack_size; i++) -- cont->machine_stack_src[i] = cont->machine_stack[i]; -+ MEMCPY(cont->machine_stack_src, cont->machine_stack, -+ VALUE, cont->machine_stack_size); - } - - #ifdef __ia64 -@@ -742,7 +741,7 @@ - if (&space[0] > end) { - # ifdef HAVE_ALLOCA - volatile VALUE *sp = ALLOCA_N(VALUE, &space[0] - end); -- (void)sp; -+ space[0] = *sp; - # else - cont_restore_0(cont, &space[0]); - # endif -@@ -758,7 +757,7 @@ - if (&space[STACK_PAD_SIZE] < end) { - # ifdef HAVE_ALLOCA - volatile VALUE *sp = ALLOCA_N(VALUE, end - &space[STACK_PAD_SIZE]); -- (void)sp; -+ space[0] = *sp; - # else - cont_restore_0(cont, &space[STACK_PAD_SIZE-1]); - # endif diff --git a/ruby.spec b/ruby.spec index 5b4e22b..e931852 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 1 %global minor_version 9 %global teeny_version 3 -%global patch_level 0 +%global patch_level 125 %global major_minor_version %{major_version}.%{minor_version} @@ -51,7 +51,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -Release: 7%{?dist} +Release: 1%{?dist} Group: Development/Languages License: Ruby or BSD URL: http://ruby-lang.org/ @@ -83,12 +83,6 @@ Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 Patch9: rubygems-1.8.11-binary-extensions.patch -# Fixes segfaults when build with GCC 4.7. -# http://bugs.ruby-lang.org/issues/5851 -Patch10: ruby-1.9.3-prevent-optimizing-sp.patch -# Fixes json encoding failures when build with GCC 4.7. -# http://bugs.ruby-lang.org/issues/5888 -Patch11: ruby-1.9.3-fix-json-parser.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch @@ -316,8 +310,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch10 -%patch11 -p1 %patch12 -p1 %build @@ -434,7 +426,9 @@ sed -i '2 a\ s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check -make check +# TODO: Investigate the test failures. +# https://bugs.ruby-lang.org/issues/6036 +make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x test_x509cert.rb" %post libs -p /sbin/ldconfig @@ -704,6 +698,9 @@ make check %{ruby_libdir}/tkextlib %changelog +* Mon Feb 20 2012 V鱈t Ondruch - 1.9.3.125-1 +- Upgrade to Ruby 1.9.3-p125. + * Sun Jan 29 2012 Mamoru Tasaka - 1.9.3.0-7 - Make mkmf.rb verbose by default diff --git a/sources b/sources index e874ffe..d168ab2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8e2fef56185cfbaf29d0c8329fc77c05 ruby-1.9.3-p0.tar.gz +e3ea86b9d3fc2d3ec867f66969ae3b92 ruby-1.9.3-p125.tar.gz From 7ba1fecec89021e1c641f92b3c4c228d1e990640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 21 Feb 2012 21:51:01 +0100 Subject: [PATCH 190/529] Use version macro for pkg-config file. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e931852..efeedd7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -470,7 +470,7 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t %{_includedir}/%{_normalized_cpu}-%{_target_os}/ruby %{_libdir}/libruby.so -%{_libdir}/pkgconfig/ruby-1.9.pc +%{_libdir}/pkgconfig/ruby-%{major_minor_version}.pc %files libs %doc COPYING From 7844acce6d6cfa17853915e98b79a226c713cf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 22 Feb 2012 13:13:08 +0100 Subject: [PATCH 191/529] Simplify seds. --- ruby.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index efeedd7..dd74ad9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -410,16 +410,16 @@ sed -i '2 a\ sed -i '2 a\ s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec -sed -i -e '2 a\ - s.require_paths = ["lib"]' -e '3 a\ +sed -i '2 a\ + s.require_paths = ["lib"]\ s.extensions = ["bigdecimal.so"]' %{buildroot}/%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec -sed -i -e '2 a\ - s.require_paths = ["lib"]' -e '3 a\ +sed -i '2 a\ + s.require_paths = ["lib"]\ s.extensions = ["io/console.so"]' %{buildroot}/%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec -sed -i -e '2 a\ - s.require_paths = ["lib"]' -e '3 a\ +sed -i '2 a\ + s.require_paths = ["lib"]\ s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}/%{gem_dir}/specifications/json-%{json_version}.gemspec sed -i '2 a\ From 91599c23af5fa4c484ef0f76f48042a7d3ad3b82 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 29 Feb 2012 14:24:37 +0000 Subject: [PATCH 192/529] Temporarily disable make check on ARM until it's fixed upstream. Tracked in RHBZ 789410 --- ruby.spec | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/ruby.spec b/ruby.spec index dd74ad9..47130c7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -51,7 +51,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Languages License: Ruby or BSD URL: http://ruby-lang.org/ @@ -146,7 +146,7 @@ libraries. %package -n rubygems-devel -Summary: Macros and development tools for packagin RubyGems +Summary: Macros and development tools for packaging RubyGems Version: %{rubygems_version} Group: Development/Libraries License: Ruby or MIT @@ -154,7 +154,7 @@ Requires: ruby(rubygems) = %{version}-%{release} BuildArch: noarch %description -n rubygems-devel -Macros and development tools for packagin RubyGems. +Macros and development tools for packaging RubyGems. %package -n rubygem-rake @@ -243,7 +243,7 @@ Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(io-console) = %{version}-%{release} %description -n rubygem-io-console -IO/Console provides very simple and portable access to console. It doesnt +IO/Console provides very simple and portable access to console. It doesn't provide higher layer features, such like curses and readline. @@ -426,9 +426,14 @@ sed -i '2 a\ s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check +# Disable make check on ARM until the bug is fixed +# https://bugzilla.redhat.com/show_bug.cgi?id=789410 +# https://bugs.ruby-lang.org/issues/6011 +%ifnarch %{arm} # TODO: Investigate the test failures. # https://bugs.ruby-lang.org/issues/6036 make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x test_x509cert.rb" +%endif %post libs -p /sbin/ldconfig @@ -464,11 +469,7 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t %config(noreplace) %{_sysconfdir}/rpm/macros.ruby -%{_includedir}/ruby.h -%{_includedir}/ruby -%dir %{_includedir}/%{_normalized_cpu}-%{_target_os} -%{_includedir}/%{_normalized_cpu}-%{_target_os}/ruby - +%{_includedir}/* %{_libdir}/libruby.so %{_libdir}/pkgconfig/ruby-%{major_minor_version}.pc @@ -698,6 +699,9 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t %{ruby_libdir}/tkextlib %changelog +* Wed Feb 29 2012 Peter Robinson - 1.9.3.125-2 +- Temporarily disable make check on ARM until it's fixed upstream. Tracked in RHBZ 789410 + * Mon Feb 20 2012 V鱈t Ondruch - 1.9.3.125-1 - Upgrade to Ruby 1.9.3-p125. From f56e2b573de9a2b3e391483a97b87c10ea54feed Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Mon, 9 Apr 2012 19:01:33 +0200 Subject: [PATCH 193/529] disable check on ppc(64), RH bugzilla 803698 --- ruby.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 47130c7..74282af 100644 --- a/ruby.spec +++ b/ruby.spec @@ -51,7 +51,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -Release: 2%{?dist} +Release: 3%{?dist} Group: Development/Languages License: Ruby or BSD URL: http://ruby-lang.org/ @@ -429,7 +429,8 @@ sed -i '2 a\ # Disable make check on ARM until the bug is fixed # https://bugzilla.redhat.com/show_bug.cgi?id=789410 # https://bugs.ruby-lang.org/issues/6011 -%ifnarch %{arm} +# same for ppc(64), RH bugzilla #803698 +%ifnarch %{arm} ppc ppc64 # TODO: Investigate the test failures. # https://bugs.ruby-lang.org/issues/6036 make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x test_x509cert.rb" @@ -699,6 +700,9 @@ make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x t %{ruby_libdir}/tkextlib %changelog +* Mon Apr 09 2012 Karsten Hopp 1.9.3.125-3 +- disable check on ppc(64), RH bugzilla 803698 + * Wed Feb 29 2012 Peter Robinson - 1.9.3.125-2 - Temporarily disable make check on ARM until it's fixed upstream. Tracked in RHBZ 789410 From 82e6513e5e25926424ad145885596356e56f2566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Apr 2012 10:03:22 +0200 Subject: [PATCH 194/529] Remove superfluous slashes. --- ruby.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index 74282af..b3805c2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -405,25 +405,25 @@ mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{mi # Adjust the gemspec files so that the gems will load properly sed -i '2 a\ - s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rake-%{rake_version}.gemspec + s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rake-%{rake_version}.gemspec sed -i '2 a\ - s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec + s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec sed -i '2 a\ s.require_paths = ["lib"]\ - s.extensions = ["bigdecimal.so"]' %{buildroot}/%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec + s.extensions = ["bigdecimal.so"]' %{buildroot}%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec sed -i '2 a\ s.require_paths = ["lib"]\ - s.extensions = ["io/console.so"]' %{buildroot}/%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec + s.extensions = ["io/console.so"]' %{buildroot}%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec sed -i '2 a\ s.require_paths = ["lib"]\ - s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}/%{gem_dir}/specifications/json-%{json_version}.gemspec + s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec sed -i '2 a\ - s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec + s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check # Disable make check on ARM until the bug is fixed From 328c18e61ff2530cc24bc8b5455c062f013679c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Apr 2012 10:36:30 +0200 Subject: [PATCH 195/529] Update test suite bug description and execution. --- ruby.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index b3805c2..a3ba8e8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -431,9 +431,11 @@ sed -i '2 a\ # https://bugs.ruby-lang.org/issues/6011 # same for ppc(64), RH bugzilla #803698 %ifnarch %{arm} ppc ppc64 -# TODO: Investigate the test failures. -# https://bugs.ruby-lang.org/issues/6036 -make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_parse.rb -x test_x509cert.rb" +# Test suite fails with OpenSSL 1.0.1 +# http://bugs.ruby-lang.org/issues/6089 +# OpenSSL 1.0.1 is breaking the drb test suite. +# https://bugs.ruby-lang.org/issues/6221 +make check TESTS="-v -x test_drbssl.rb -x test_x509cert.rb" %endif %post libs -p /sbin/ldconfig From 1cc853bb6008673ce9a094446f462daab3c98710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 20 Apr 2012 15:01:52 +0200 Subject: [PATCH 196/529] Update to Ruby 1.9.3-p194. --- .gitignore | 1 + ruby.spec | 13 +++++++------ sources | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index c58f574..08ebd24 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.8.7-p357.tar.bz2 /ruby-1.9.3-p0.tar.gz /ruby-1.9.3-p125.tar.gz +/ruby-1.9.3-p194.tar.gz diff --git a/ruby.spec b/ruby.spec index a3ba8e8..0c1095e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 1 %global minor_version 9 %global teeny_version 3 -%global patch_level 125 +%global patch_level 194 %global major_minor_version %{major_version}.%{minor_version} @@ -25,7 +25,7 @@ %global ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir} %global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir} -%global rubygems_version 1.8.11 +%global rubygems_version 1.8.23 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -51,7 +51,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -Release: 3%{?dist} +Release: 1%{?dist} Group: Development/Languages License: Ruby or BSD URL: http://ruby-lang.org/ @@ -431,11 +431,9 @@ sed -i '2 a\ # https://bugs.ruby-lang.org/issues/6011 # same for ppc(64), RH bugzilla #803698 %ifnarch %{arm} ppc ppc64 -# Test suite fails with OpenSSL 1.0.1 -# http://bugs.ruby-lang.org/issues/6089 # OpenSSL 1.0.1 is breaking the drb test suite. # https://bugs.ruby-lang.org/issues/6221 -make check TESTS="-v -x test_drbssl.rb -x test_x509cert.rb" +make check TESTS="-v -x test_drbssl.rb" %endif %post libs -p /sbin/ldconfig @@ -702,6 +700,9 @@ make check TESTS="-v -x test_drbssl.rb -x test_x509cert.rb" %{ruby_libdir}/tkextlib %changelog +* Fri Apr 20 2012 V鱈t Ondruch - 1.9.3.194-1 +- Update to Ruby 1.9.3-p194. + * Mon Apr 09 2012 Karsten Hopp 1.9.3.125-3 - disable check on ppc(64), RH bugzilla 803698 diff --git a/sources b/sources index d168ab2..391168d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e3ea86b9d3fc2d3ec867f66969ae3b92 ruby-1.9.3-p125.tar.gz +bc0c715c69da4d1d8bd57069c19f6c0e ruby-1.9.3-p194.tar.gz From cb8843b516ccf5335c70781378eaa8d05007e3f1 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 22 Apr 2012 16:19:25 +0900 Subject: [PATCH 197/529] Bump release --- ruby.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 0c1095e..7dee288 100644 --- a/ruby.spec +++ b/ruby.spec @@ -51,7 +51,12 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -Release: 1%{?dist} +# Note: +# As seen on perl srpm, as this (ruby) srpm contains several sub-components, +# we cannot reset the release number to 1 even when the main (ruby) version +# is updated - because it may be that the versions of sub-components don't +# change. +Release: 10.1%{?dist} Group: Development/Languages License: Ruby or BSD URL: http://ruby-lang.org/ @@ -700,6 +705,9 @@ make check TESTS="-v -x test_drbssl.rb" %{ruby_libdir}/tkextlib %changelog +* Sun Apr 22 2012 Mamoru Tasaka - 1.9.3.194-10.1 +- Bump release + * Fri Apr 20 2012 V鱈t Ondruch - 1.9.3.194-1 - Update to Ruby 1.9.3-p194. From 7156dc7e9b069776d417406659ed3fe70b337497 Mon Sep 17 00:00:00 2001 From: Bohuslav Kabrda Date: Wed, 30 May 2012 13:46:44 +0200 Subject: [PATCH 198/529] Fix license to contain Public Domain. - macros.ruby now contains unexpanded macros. --- ruby.spec | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/ruby.spec b/ruby.spec index 7dee288..a796390 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,9 +56,10 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 10.1%{?dist} +Release: 11%{?dist} Group: Development/Languages -License: Ruby or BSD +# Public Domain for example for: include/ruby/st.h, strftime.c, ... +License: (Ruby or BSD) and Public Domain URL: http://ruby-lang.org/ Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.gz Source1: operating_system.rb @@ -345,19 +346,19 @@ make install DESTDIR=%{buildroot} # Dump the macros into macro.ruby to use them to build other Ruby libraries. mkdir -p %{buildroot}%{_sysconfdir}/rpm cat >> %{buildroot}%{_sysconfdir}/rpm/macros.ruby << \EOF -%%ruby_libdir %{_datadir}/%{name} -%%ruby_libarchdir %{_libdir}/%{name} +%%ruby_libdir %%{_datadir}/%{name} +%%ruby_libarchdir %%{_libdir}/%{name} # This is the local lib/arch and should not be used for packaging. %%ruby_sitedir site_ruby -%%ruby_sitelibdir %{_prefix}/local/share/ruby/%{ruby_sitedir} -%%ruby_sitearchdir %{_prefix}/local/%{_lib}/ruby/%{ruby_sitedir} +%%ruby_sitelibdir %%{_prefix}/local/share/%{name}/%%{ruby_sitedir} +%%ruby_sitearchdir %%{_prefix}/local/%%{_lib}/%{name}/%%{ruby_sitedir} # This is the general location for libs/archs compatible with all # or most of the Ruby versions available in the Fedora repositories. %%ruby_vendordir vendor_ruby -%%ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir} -%%ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir} +%%ruby_vendorlibdir %%{ruby_libdir}/%%{ruby_vendordir} +%%ruby_vendorarchdir %%{ruby_libarchdir}/%%{ruby_vendordir} EOF cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF @@ -705,6 +706,10 @@ make check TESTS="-v -x test_drbssl.rb" %{ruby_libdir}/tkextlib %changelog +* Tue May 29 2012 Bohuslav Kabrda - 1.9.3.194-11 +- Fix license to contain Public Domain. +- macros.ruby now contains unexpanded macros. + * Sun Apr 22 2012 Mamoru Tasaka - 1.9.3.194-10.1 - Bump release From 317a62aceb8d23cdc8a480573f82f63808faf63a Mon Sep 17 00:00:00 2001 From: Bohuslav Kabrda Date: Mon, 11 Jun 2012 09:29:11 +0200 Subject: [PATCH 199/529] Make symlinks for bigdecimal and io-console gems to ruby stdlib dirs (RHBZ 829209). --- ruby.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index a796390..01efe58 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 11%{?dist} +Release: 12%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -385,6 +385,7 @@ mv %{buildroot}%{ruby_libdir}/gems/%{ruby_abi} %{buildroot}%{gem_dir} mkdir -p %{buildroot}%{gem_extdir}/exts # Move bundled rubygems to %%gem_dir and %%gem_extdir +# make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems mkdir -p %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib mv %{buildroot}%{ruby_libdir}/rake* %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib @@ -395,11 +396,15 @@ mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib +ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal +ln -s %{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io +ln -s %{gem_dir}/gems/io-console-%{io_console_version}/lib/io %{buildroot}%{ruby_libdir}/io +ln -s %{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so mkdir -p %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib @@ -678,11 +683,15 @@ make check TESTS="-v -x test_drbssl.rb" %{_datadir}/ri %files -n rubygem-bigdecimal +%{ruby_libdir}/bigdecimal +%{ruby_libarchdir}/bigdecimal.so %{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version} %{gem_dir}/gems/bigdecimal-%{bigdecimal_version} %{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec %files -n rubygem-io-console +%{ruby_libdir}/io +%{ruby_libarchdir}/io/console.so %{_libdir}/gems/exts/io-console-%{io_console_version} %{gem_dir}/gems/io-console-%{io_console_version} %{gem_dir}/specifications/io-console-%{io_console_version}.gemspec @@ -706,6 +715,9 @@ make check TESTS="-v -x test_drbssl.rb" %{ruby_libdir}/tkextlib %changelog +* Mon Jun 11 2012 Bohuslav Kabrda - 1.9.3.194-12 +- Make symlinks for bigdecimal and io-console gems to ruby stdlib dirs (RHBZ 829209). + * Tue May 29 2012 Bohuslav Kabrda - 1.9.3.194-11 - Fix license to contain Public Domain. - macros.ruby now contains unexpanded macros. From 475ac392852a24a933919f04e26077329e950845 Mon Sep 17 00:00:00 2001 From: Bohuslav Kabrda Date: Mon, 11 Jun 2012 10:20:53 +0200 Subject: [PATCH 200/529] Make the bigdecimal gem a runtime dependency of Ruby. --- ruby.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 01efe58..28c7d9d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 12%{?dist} +Release: 13%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -94,6 +94,11 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} +# Make the bigdecimal gem a runtime dependency of Ruby to avoid problems +# with user-installed gems, that don't require it in gemspec/Gemfile +# See https://bugzilla.redhat.com/show_bug.cgi?id=829209 +# and http://bugs.ruby-lang.org/issues/6123 +Requires: rubygem(bigdecimal) >= %{bigdecimal_version} BuildRequires: autoconf BuildRequires: gdbm-devel @@ -715,6 +720,9 @@ make check TESTS="-v -x test_drbssl.rb" %{ruby_libdir}/tkextlib %changelog +* Mon Jun 11 2012 Bohuslav Kabrda - 1.9.3.194-13 +- Make the bigdecimal gem a runtime dependency of Ruby. + * Mon Jun 11 2012 Bohuslav Kabrda - 1.9.3.194-12 - Make symlinks for bigdecimal and io-console gems to ruby stdlib dirs (RHBZ 829209). From 16dead84af85d84f7687331d00d0f3fec4dd5699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 14 Jun 2012 14:56:26 +0200 Subject: [PATCH 201/529] Enable tests and small ARM tweaks. The most of the tests are functional now. The only exception is the one test failing on armv7. Not sure about the PPC though. --- ruby.spec | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/ruby.spec b/ruby.spec index 28c7d9d..d4ad547 100644 --- a/ruby.spec +++ b/ruby.spec @@ -46,7 +46,7 @@ %global json_version 1.5.4 %global minitest_version 2.5.1 -%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/') +%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') Summary: An interpreter of object-oriented scripting language Name: ruby @@ -442,14 +442,20 @@ sed -i '2 a\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check -# Disable make check on ARM until the bug is fixed -# https://bugzilla.redhat.com/show_bug.cgi?id=789410 -# https://bugs.ruby-lang.org/issues/6011 -# same for ppc(64), RH bugzilla #803698 -%ifnarch %{arm} ppc ppc64 +DISABLE_TESTS="" + # OpenSSL 1.0.1 is breaking the drb test suite. # https://bugs.ruby-lang.org/issues/6221 -make check TESTS="-v -x test_drbssl.rb" +DISABLE_TESTS="-x test_drbssl.rb $DISABLE_TESTS" + +%ifarch armv7l armv7hl armv7hnl +# test_call_double(DL::TestDL) fails on ARM HardFP +# http://bugs.ruby-lang.org/issues/6592 +DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" +%endif + +%ifnarch ppc ppc64 +make check TESTS="-v $DISABLE_TESTS" %endif %post libs -p /sbin/ldconfig From b31f0b7e9d7b0395a4501bf786d094a6ab2599d5 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 12:15:41 -0500 Subject: [PATCH 202/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d4ad547..7be55b4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 13%{?dist} +Release: 14%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -726,6 +726,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Sat Jul 21 2012 Fedora Release Engineering - 1.9.3.194-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Mon Jun 11 2012 Bohuslav Kabrda - 1.9.3.194-13 - Make the bigdecimal gem a runtime dependency of Ruby. From 7ade1a070eb16da3df69eb494c6ef4fdb82f900f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 1 Aug 2012 17:25:26 +0200 Subject: [PATCH 203/529] ruby-libs must require rubygems (rhbz#45011). --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 7be55b4..d1882c2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 14%{?dist} +Release: 15%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -93,7 +93,6 @@ Patch9: rubygems-1.8.11-binary-extensions.patch Patch12: ruby-1.9.3-mkmf-verbose.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Requires: ruby(rubygems) >= %{rubygems_version} # Make the bigdecimal gem a runtime dependency of Ruby to avoid problems # with user-installed gems, that don't require it in gemspec/Gemfile # See https://bugzilla.redhat.com/show_bug.cgi?id=829209 @@ -133,6 +132,7 @@ Ruby or an application embedding Ruby. Summary: Libraries necessary to run Ruby Group: Development/Libraries License: Ruby or BSD +Requires: ruby(rubygems) >= %{rubygems_version} Provides: ruby(abi) = %{ruby_abi} %description libs @@ -726,6 +726,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Aug 01 2012 V鱈t Ondruch - 1.9.3.194-15 +- ruby-libs must require rubygems (rhbz#45011). + * Sat Jul 21 2012 Fedora Release Engineering - 1.9.3.194-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From e10d820c6f6a309d692aaca4cf893ee9075e8765 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 1 Aug 2012 17:26:55 +0200 Subject: [PATCH 204/529] Fixed changelog rhbz reference. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d1882c2..5ff3588 100644 --- a/ruby.spec +++ b/ruby.spec @@ -727,7 +727,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Wed Aug 01 2012 V鱈t Ondruch - 1.9.3.194-15 -- ruby-libs must require rubygems (rhbz#45011). +- ruby-libs must require rubygems (rhbz#845011). * Sat Jul 21 2012 Fedora Release Engineering - 1.9.3.194-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 65cb15b93651f511ffd441985b711437edefd498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 14 Aug 2012 12:44:33 +0200 Subject: [PATCH 205/529] Revert the dependency of ruby-libs on rubygems (rhbz#845011, rhbz#847482). --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 5ff3588..794d9f6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 15%{?dist} +Release: 16%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -93,6 +93,7 @@ Patch9: rubygems-1.8.11-binary-extensions.patch Patch12: ruby-1.9.3-mkmf-verbose.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: ruby(rubygems) >= %{rubygems_version} # Make the bigdecimal gem a runtime dependency of Ruby to avoid problems # with user-installed gems, that don't require it in gemspec/Gemfile # See https://bugzilla.redhat.com/show_bug.cgi?id=829209 @@ -132,7 +133,6 @@ Ruby or an application embedding Ruby. Summary: Libraries necessary to run Ruby Group: Development/Libraries License: Ruby or BSD -Requires: ruby(rubygems) >= %{rubygems_version} Provides: ruby(abi) = %{ruby_abi} %description libs @@ -726,6 +726,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Aug 14 2012 V鱈t Ondruch - 1.9.3.194-16 +- Revert the dependency of ruby-libs on rubygems (rhbz#845011, rhbz#847482). + * Wed Aug 01 2012 V鱈t Ondruch - 1.9.3.194-15 - ruby-libs must require rubygems (rhbz#845011). From dcc9bf3235b5f04bad29817fd7f32e0e414e780f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Sep 2012 14:20:29 +0200 Subject: [PATCH 206/529] Split documentation into -doc subpackage. --- ruby.spec | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/ruby.spec b/ruby.spec index 794d9f6..a71bf5d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 16%{?dist} +Release: 17%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -211,16 +211,26 @@ Provides: ri = %{version}-%{release} Provides: rubygem(rdoc) = %{version}-%{release} Obsoletes: ruby-rdoc < %{version} Obsoletes: ruby-ri < %{version} +BuildArch: noarch + +%description -n rubygem-rdoc +RDoc produces HTML and command-line documentation for Ruby projects. RDoc +includes the 'rdoc' and 'ri' tools for generating and displaying online +documentation. + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{_bindir}/ri # TODO: It seems that ri documentation differs from platform to platform due to # some encoding bugs, therefore the documentation should be split out of this gem # or kept platform specific. # https://github.com/rdoc/rdoc/issues/71 # BuildArch: noarch -%description -n rubygem-rdoc -RDoc produces HTML and command-line documentation for Ruby projects. RDoc -includes the 'rdoc' and 'ri' tools for generating and displaying online -documentation. +%description doc +This package contains documentation for %{name}. %package -n rubygem-bigdecimal @@ -465,15 +475,8 @@ make check TESTS="-v $DISABLE_TESTS" %files %doc COPYING %lang(ja) %doc COPYING.ja -%doc ChangeLog %doc GPL %doc LEGAL -%doc NEWS -%doc README -%lang(ja) %doc README.ja -%doc ToDo -%doc doc/ChangeLog-* -%doc doc/NEWS-* %{_bindir}/erb %{_bindir}/ruby %{_bindir}/testrb @@ -691,6 +694,14 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/gems/rdoc-%{rdoc_version} %{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec %{_mandir}/man1/ri* + +%files doc +%doc NEWS +%doc README +%lang(ja) %doc README.ja +%doc ChangeLog +%doc doc/ChangeLog-* +%doc doc/NEWS-* %{_datadir}/ri %files -n rubygem-bigdecimal @@ -726,6 +737,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Sep 06 2012 V鱈t Ondruch - 1.9.3.194-17 +- Split documentation into -doc subpackage. + * Tue Aug 14 2012 V鱈t Ondruch - 1.9.3.194-16 - Revert the dependency of ruby-libs on rubygems (rhbz#845011, rhbz#847482). From 2498f3d3fbd794477294be19c48c2af0e8fe4ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 7 Sep 2012 09:31:41 +0200 Subject: [PATCH 207/529] Added bugzilla issue number. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index a71bf5d..40f1688 100644 --- a/ruby.spec +++ b/ruby.spec @@ -738,7 +738,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Thu Sep 06 2012 V鱈t Ondruch - 1.9.3.194-17 -- Split documentation into -doc subpackage. +- Split documentation into -doc subpackage (rhbz#854418). * Tue Aug 14 2012 V鱈t Ondruch - 1.9.3.194-16 - Revert the dependency of ruby-libs on rubygems (rhbz#845011, rhbz#847482). From cde07425ae8fa5fe97e50a89a57eb79e463e6441 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 4 Oct 2012 21:51:59 +0900 Subject: [PATCH 208/529] Patch from trunk for CVE-2012-4464, CVE-2012-4466 --- ruby.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 40f1688..7a1a7a4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 17%{?dist} +Release: 18%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -89,6 +89,9 @@ Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 Patch9: rubygems-1.8.11-binary-extensions.patch +# Patch from trunk for CVE-4464, CVE-4466 +# http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37068 +Patch10: ruby-1.9.3-backport-from-trunk-rev37068.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch @@ -331,6 +334,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p0 %patch12 -p1 %build @@ -506,6 +510,8 @@ make check TESTS="-v $DISABLE_TESTS" %doc LEGAL %doc README %lang(ja) %doc README.ja +%doc NEWS +%doc doc/NEWS-* # Exclude /usr/local directory since it is supposed to be managed by # local system administrator. %exclude %{ruby_sitelibdir} @@ -696,12 +702,10 @@ make check TESTS="-v $DISABLE_TESTS" %{_mandir}/man1/ri* %files doc -%doc NEWS %doc README %lang(ja) %doc README.ja %doc ChangeLog %doc doc/ChangeLog-* -%doc doc/NEWS-* %{_datadir}/ri %files -n rubygem-bigdecimal @@ -737,6 +741,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Oct 04 2012 Mamoru Tasaka - 1.9.3.194-18 +- Patch from trunk for CVE-2012-4464, CVE-2012-4466 + * Thu Sep 06 2012 V鱈t Ondruch - 1.9.3.194-17 - Split documentation into -doc subpackage (rhbz#854418). From 9f5278c1120e61181050dc657b493ad11694f06a Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Thu, 4 Oct 2012 21:55:27 +0900 Subject: [PATCH 209/529] forgot to add patch... --- ruby-1.9.3-backport-from-trunk-rev37068.patch | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 ruby-1.9.3-backport-from-trunk-rev37068.patch diff --git a/ruby-1.9.3-backport-from-trunk-rev37068.patch b/ruby-1.9.3-backport-from-trunk-rev37068.patch new file mode 100644 index 0000000..81b6b79 --- /dev/null +++ b/ruby-1.9.3-backport-from-trunk-rev37068.patch @@ -0,0 +1,103 @@ +Patch from trunk for CVE-2012-4464, CVE-2012-4466 +Part for test/ruby/test_exception.rb was adjusted for ruby 1.9.3 + +Mamoru Tasaka + +------------------------------------------------------------------------ +r37068 | shugo | 2012-10-03 02:25:10 +0900 (Wed, 03 Oct 2012) | 2 lines + +* error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not + taint messages. +------------------------------------------------------------------------ +Index: error.c +=================================================================== +--- error.c (revision 37067) ++++ error.c (revision 37068) +@@ -635,7 +635,6 @@ + + if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc)); + r = rb_String(mesg); +- OBJ_INFECT(r, exc); + return r; + } + +@@ -996,11 +995,7 @@ + + if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc)); + StringValue(str); +- if (str != mesg) { +- rb_iv_set(exc, "mesg", mesg = str); +- } +- OBJ_INFECT(mesg, exc); +- return mesg; ++ return str; + } + + /* +@@ -1131,7 +1126,6 @@ + args[2] = d; + mesg = rb_f_sprintf(NAME_ERR_MESG_COUNT, args); + } +- OBJ_INFECT(mesg, obj); + return mesg; + } + +Index: test/ruby/test_exception.rb +=================================================================== +--- test/ruby/test_exception.rb (revision 37067) ++++ test/ruby/test_exception.rb (modified) +@@ -333,4 +333,54 @@ + load(t.path) + end + end ++ ++ def test_to_s_taintness_propagation ++ for exc in [Exception, NameError] ++ m = "abcdefg" ++ e = exc.new(m) ++ e.taint ++ s = e.to_s ++ assert_equal(false, m.tainted?, ++ "#{exc}#to_s should not propagate taintness") ++ assert_equal(false, s.tainted?, ++ "#{exc}#to_s should not propagate taintness") ++ end ++ ++ o = Object.new ++ def o.to_str ++ "foo" ++ end ++ o.taint ++ e = NameError.new(o) ++ s = e.to_s ++ assert_equal(false, s.tainted?) ++ end ++ ++ def test_exception_to_s_should_not_propagate_untrustedness ++ favorite_lang = "Ruby" ++ ++ for exc in [Exception, NameError] ++ assert_raise(SecurityError) do ++ lambda { ++ $SAFE = 4 ++ exc.new(favorite_lang).to_s ++ favorite_lang.replace("Python") ++ }.call ++ end ++ end ++ ++ assert_raise(SecurityError) do ++ lambda { ++ $SAFE = 4 ++ o = Object.new ++ o.singleton_class.send(:define_method, :to_str) { ++ favorite_lang ++ } ++ NameError.new(o).to_s ++ favorite_lang.replace("Python") ++ }.call ++ end ++ ++ assert_equal("Ruby", favorite_lang) ++ end + end From 352f32d3d161062d6bf28571c5370769dbb170b2 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 13 Oct 2012 14:53:07 +0900 Subject: [PATCH 210/529] Update to 1.9.3 p286 - Don't create files when NUL-containing path name is passed (bug 865940) --- .gitignore | 1 + ruby-1.9.3-backport-from-trunk-rev37068.patch | 103 ------------------ ruby-1.9.3-p286-open-devtty-on-koji.patch | 14 +++ ruby.spec | 22 +++- sources | 2 +- 5 files changed, 32 insertions(+), 110 deletions(-) delete mode 100644 ruby-1.9.3-backport-from-trunk-rev37068.patch create mode 100644 ruby-1.9.3-p286-open-devtty-on-koji.patch diff --git a/.gitignore b/.gitignore index 08ebd24..b512d18 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.9.3-p0.tar.gz /ruby-1.9.3-p125.tar.gz /ruby-1.9.3-p194.tar.gz +/ruby-1.9.3-p286.tar.gz diff --git a/ruby-1.9.3-backport-from-trunk-rev37068.patch b/ruby-1.9.3-backport-from-trunk-rev37068.patch deleted file mode 100644 index 81b6b79..0000000 --- a/ruby-1.9.3-backport-from-trunk-rev37068.patch +++ /dev/null @@ -1,103 +0,0 @@ -Patch from trunk for CVE-2012-4464, CVE-2012-4466 -Part for test/ruby/test_exception.rb was adjusted for ruby 1.9.3 - -Mamoru Tasaka - ------------------------------------------------------------------------- -r37068 | shugo | 2012-10-03 02:25:10 +0900 (Wed, 03 Oct 2012) | 2 lines - -* error.c (exc_to_s, name_err_to_s, name_err_mesg_to_str): do not - taint messages. ------------------------------------------------------------------------- -Index: error.c -=================================================================== ---- error.c (revision 37067) -+++ error.c (revision 37068) -@@ -635,7 +635,6 @@ - - if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc)); - r = rb_String(mesg); -- OBJ_INFECT(r, exc); - return r; - } - -@@ -996,11 +995,7 @@ - - if (NIL_P(mesg)) return rb_class_name(CLASS_OF(exc)); - StringValue(str); -- if (str != mesg) { -- rb_iv_set(exc, "mesg", mesg = str); -- } -- OBJ_INFECT(mesg, exc); -- return mesg; -+ return str; - } - - /* -@@ -1131,7 +1126,6 @@ - args[2] = d; - mesg = rb_f_sprintf(NAME_ERR_MESG_COUNT, args); - } -- OBJ_INFECT(mesg, obj); - return mesg; - } - -Index: test/ruby/test_exception.rb -=================================================================== ---- test/ruby/test_exception.rb (revision 37067) -+++ test/ruby/test_exception.rb (modified) -@@ -333,4 +333,54 @@ - load(t.path) - end - end -+ -+ def test_to_s_taintness_propagation -+ for exc in [Exception, NameError] -+ m = "abcdefg" -+ e = exc.new(m) -+ e.taint -+ s = e.to_s -+ assert_equal(false, m.tainted?, -+ "#{exc}#to_s should not propagate taintness") -+ assert_equal(false, s.tainted?, -+ "#{exc}#to_s should not propagate taintness") -+ end -+ -+ o = Object.new -+ def o.to_str -+ "foo" -+ end -+ o.taint -+ e = NameError.new(o) -+ s = e.to_s -+ assert_equal(false, s.tainted?) -+ end -+ -+ def test_exception_to_s_should_not_propagate_untrustedness -+ favorite_lang = "Ruby" -+ -+ for exc in [Exception, NameError] -+ assert_raise(SecurityError) do -+ lambda { -+ $SAFE = 4 -+ exc.new(favorite_lang).to_s -+ favorite_lang.replace("Python") -+ }.call -+ end -+ end -+ -+ assert_raise(SecurityError) do -+ lambda { -+ $SAFE = 4 -+ o = Object.new -+ o.singleton_class.send(:define_method, :to_str) { -+ favorite_lang -+ } -+ NameError.new(o).to_s -+ favorite_lang.replace("Python") -+ }.call -+ end -+ -+ assert_equal("Ruby", favorite_lang) -+ end - end diff --git a/ruby-1.9.3-p286-open-devtty-on-koji.patch b/ruby-1.9.3-p286-open-devtty-on-koji.patch new file mode 100644 index 0000000..699895a --- /dev/null +++ b/ruby-1.9.3-p286-open-devtty-on-koji.patch @@ -0,0 +1,14 @@ +--- ruby-1.9.3-p286/test/ruby/test_io.rb.devtty 2012-10-12 17:37:54.000000000 +0900 ++++ ruby-1.9.3-p286/test/ruby/test_io.rb 2012-10-13 14:00:24.000000000 +0900 +@@ -2068,6 +2068,11 @@ + return if /linux/ !~ RUBY_PLATFORM + return if /^i.?86|^x86_64/ !~ RUBY_PLATFORM + return unless File.exist?('/dev/tty') ++ begin ++ File.open('/dev/tty') {|f|} ++ rescue Errno::ENXIO ++ return ++ end + + File.open('/dev/tty') { |f| + tiocgwinsz=0x5413 diff --git a/ruby.spec b/ruby.spec index 7a1a7a4..4c85534 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 1 %global minor_version 9 %global teeny_version 3 -%global patch_level 194 +%global patch_level 286 %global major_minor_version %{major_version}.%{minor_version} @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 18%{?dist} +Release: 19%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -79,7 +79,8 @@ Patch4: ruby-1.9.3-fix-s390x-build.patch # when it exists outside of the GEM_HOME (already fixed in the upstream) Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch # http://redmine.ruby-lang.org/issues/5135 - see comment 29 -Patch6: ruby-1.9.3-webrick-test-fix.patch +# Fixed in ruby 1.9.3p286 +#Patch6: ruby-1.9.3-webrick-test-fix.patch # Already fixed upstream: # https://github.com/ruby/ruby/commit/f212df564a4e1025f9fb019ce727022a97bfff53 Patch7: ruby-1.9.3-bignum-test-fix.patch @@ -91,7 +92,11 @@ Patch8: ruby-1.9.3-custom-rubygems-location.patch Patch9: rubygems-1.8.11-binary-extensions.patch # Patch from trunk for CVE-4464, CVE-4466 # http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37068 -Patch10: ruby-1.9.3-backport-from-trunk-rev37068.patch +# Fixed in ruby 1.9.3p286 +#Patch10: ruby-1.9.3-backport-from-trunk-rev37068.patch +# Opening /dev/tty fails with ENXIO (ref: man 2 open) on koji. +# Let's rescue this +Patch10: ruby-1.9.3-p286-open-devtty-on-koji.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch @@ -330,11 +335,11 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 +#%%patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch10 -p0 +%patch10 -p1 %patch12 -p1 %build @@ -741,6 +746,11 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Sat Oct 13 2012 Mamoru TASAKA - 1.9.3.286-19 +- Update to 1.9.3 p286 +- Don't create files when NUL-containing path name is passed + (bug 865940) + * Thu Oct 04 2012 Mamoru Tasaka - 1.9.3.194-18 - Patch from trunk for CVE-2012-4464, CVE-2012-4466 diff --git a/sources b/sources index 391168d..ff5d890 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bc0c715c69da4d1d8bd57069c19f6c0e ruby-1.9.3-p194.tar.gz +e2469b55c2a3d0d643097d47fe4984bb ruby-1.9.3-p286.tar.gz From 97857e815d339382320575f455fa2b5f7ac1c6bb Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 10 Nov 2012 14:14:28 +0900 Subject: [PATCH 211/529] Update to 1.9.3.327 - Fix Hash-flooding DoS vulnerability on MurmurHash function (CVE-2012-5371) --- .gitignore | 1 + ruby-1.9.3-p286-open-devtty-on-koji.patch | 14 ------------- ruby.spec | 24 +++++++++++------------ sources | 2 +- 4 files changed, 13 insertions(+), 28 deletions(-) delete mode 100644 ruby-1.9.3-p286-open-devtty-on-koji.patch diff --git a/.gitignore b/.gitignore index b512d18..214cb2e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.9.3-p125.tar.gz /ruby-1.9.3-p194.tar.gz /ruby-1.9.3-p286.tar.gz +/ruby-1.9.3-p327.tar.gz diff --git a/ruby-1.9.3-p286-open-devtty-on-koji.patch b/ruby-1.9.3-p286-open-devtty-on-koji.patch deleted file mode 100644 index 699895a..0000000 --- a/ruby-1.9.3-p286-open-devtty-on-koji.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- ruby-1.9.3-p286/test/ruby/test_io.rb.devtty 2012-10-12 17:37:54.000000000 +0900 -+++ ruby-1.9.3-p286/test/ruby/test_io.rb 2012-10-13 14:00:24.000000000 +0900 -@@ -2068,6 +2068,11 @@ - return if /linux/ !~ RUBY_PLATFORM - return if /^i.?86|^x86_64/ !~ RUBY_PLATFORM - return unless File.exist?('/dev/tty') -+ begin -+ File.open('/dev/tty') {|f|} -+ rescue Errno::ENXIO -+ return -+ end - - File.open('/dev/tty') { |f| - tiocgwinsz=0x5413 diff --git a/ruby.spec b/ruby.spec index 4c85534..027a5d0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 1 %global minor_version 9 %global teeny_version 3 -%global patch_level 286 +%global patch_level 327 %global major_minor_version %{major_version}.%{minor_version} @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 19%{?dist} +Release: 20%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -78,9 +78,6 @@ Patch4: ruby-1.9.3-fix-s390x-build.patch # Fix the uninstaller, so that it doesn't say that gem doesn't exist # when it exists outside of the GEM_HOME (already fixed in the upstream) Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch -# http://redmine.ruby-lang.org/issues/5135 - see comment 29 -# Fixed in ruby 1.9.3p286 -#Patch6: ruby-1.9.3-webrick-test-fix.patch # Already fixed upstream: # https://github.com/ruby/ruby/commit/f212df564a4e1025f9fb019ce727022a97bfff53 Patch7: ruby-1.9.3-bignum-test-fix.patch @@ -90,13 +87,10 @@ Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 Patch9: rubygems-1.8.11-binary-extensions.patch -# Patch from trunk for CVE-4464, CVE-4466 -# http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=37068 -# Fixed in ruby 1.9.3p286 -#Patch10: ruby-1.9.3-backport-from-trunk-rev37068.patch # Opening /dev/tty fails with ENXIO (ref: man 2 open) on koji. # Let's rescue this -Patch10: ruby-1.9.3-p286-open-devtty-on-koji.patch +# Fixed in ruby 1.9.3 p327 +#Patch10: ruby-1.9.3-p286-open-devtty-on-koji.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch @@ -335,11 +329,10 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch3 -p1 %patch4 -p1 %patch5 -p1 -#%%patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 -%patch10 -p1 +#%%patch10 -p1 %patch12 -p1 %build @@ -746,10 +739,15 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-1 +- Update to 1.9.3.327 +- Fix Hash-flooding DoS vulnerability on MurmurHash function + (CVE-2012-5371) + * Sat Oct 13 2012 Mamoru TASAKA - 1.9.3.286-19 - Update to 1.9.3 p286 - Don't create files when NUL-containing path name is passed - (bug 865940) + (bug 865940, CVE-2012-4522) * Thu Oct 04 2012 Mamoru Tasaka - 1.9.3.194-18 - Patch from trunk for CVE-2012-4464, CVE-2012-4466 diff --git a/sources b/sources index ff5d890..a6d1e70 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -e2469b55c2a3d0d643097d47fe4984bb ruby-1.9.3-p286.tar.gz +96118e856b502b5d7b3a4398e6c6e98c ruby-1.9.3-p327.tar.gz From 8e5c4b1bb49a593fabbc572c4986750833d8e58f Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 10 Nov 2012 14:29:23 +0900 Subject: [PATCH 212/529] fix changelog --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 027a5d0..de023b5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -739,7 +739,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-1 +* Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-20 - Update to 1.9.3.327 - Fix Hash-flooding DoS vulnerability on MurmurHash function (CVE-2012-5371) From 72dd69140798e9f5ea865b332759ad1841c542b5 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 10 Nov 2012 15:03:38 +0900 Subject: [PATCH 213/529] 20 is already used, use 21 --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index de023b5..a971e30 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 20%{?dist} +Release: 21%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -739,7 +739,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-20 +* Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-21 - Update to 1.9.3.327 - Fix Hash-flooding DoS vulnerability on MurmurHash function (CVE-2012-5371) From cd63825ab43bdfcc0a92179cb3b0920caf9b9ca1 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 10 Nov 2012 16:38:17 +0900 Subject: [PATCH 214/529] ignore some network related tests --- ...ignore-internal-server-error-on-test.patch | 49 +++++++++++++++++++ ruby.spec | 5 +- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch diff --git a/ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch b/ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch new file mode 100644 index 0000000..ab37119 --- /dev/null +++ b/ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch @@ -0,0 +1,49 @@ +--- ruby-1.9.3-p327/test/webrick/test_cgi.rb.koji 2012-08-28 00:40:30.000000000 +0900 ++++ ruby-1.9.3-p327/test/webrick/test_cgi.rb 2012-11-10 16:33:36.000000000 +0900 +@@ -28,6 +28,15 @@ + end + + def test_cgi ++''' ++On koji: ++test_cgi(TestWEBrickCGI) [/builddir/build/BUILD/ruby-1.9.3-p327/test/webrick/test_cgi.rb:34]: ++.... ++.... ++<"/webrick.cgi"> expected but was ++<"\n\n Internal Server Error\n \n

Internal Server Error

\n Broken pipe\n
\n
\n WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) OpenSSL/1.0.1c at\n 127.0.0.1:58617\n
\n \n\n">. ++''' ++ return # Skip on koji + start_cgi_server{|server, addr, port, log| + http = Net::HTTP.new(addr, port) + req = Net::HTTP::Get.new("/webrick.cgi") +@@ -84,6 +93,13 @@ + end + + def test_bad_request ++''' ++On koji: ++test_bad_request(TestWEBrickCGI) [/builddir/build/BUILD/ruby-1.9.3-p327/test/webrick/test_cgi.rb:96]: ++.... ++Expected /\AHTTP\/\d.\d 400 Bad Request/ to match "HTTP/1.1 500 Internal Server Error \r\nContent-Type: text/html; charset=ISO-8859-1\r\nServer: WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) OpenSSL/1.0.1c\r\nDate: Sat, 10 Nov 2012 07:17:08 GMT\r\nContent-Length: 307\r\nConnection: close\r\n\r\n\n\n Internal Server Error\n \n

Internal Server Error

\n Broken pipe\n
\n
\n WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) OpenSSL/1.0.1c at\n localhost:41188\n
\n \n\n". ++''' ++ return # Skip on koji + start_cgi_server{|server, addr, port, log| + sock = TCPSocket.new(addr, port) + begin +--- ruby-1.9.3-p327/test/webrick/test_filehandler.rb.koji 2012-08-28 00:40:30.000000000 +0900 ++++ ruby-1.9.3-p327/test/webrick/test_filehandler.rb 2012-11-10 16:33:02.000000000 +0900 +@@ -244,6 +244,14 @@ + end + + def test_script_disclosure ++''' ++On koji: ++test_script_disclosure(WEBrick::TestFileHandler) [/builddir/build/BUILD/ruby-1.9.3-p327/test/webrick/test_filehandler.rb:265]: ++.... ++<"200"> expected but was ++<"500">. ++''' ++ return # Skip on koji + config = { + :CGIInterpreter => TestWEBrick::RubyBin, + :DocumentRoot => File.dirname(__FILE__), diff --git a/ruby.spec b/ruby.spec index a971e30..8256651 100644 --- a/ruby.spec +++ b/ruby.spec @@ -91,6 +91,9 @@ Patch9: rubygems-1.8.11-binary-extensions.patch # Let's rescue this # Fixed in ruby 1.9.3 p327 #Patch10: ruby-1.9.3-p286-open-devtty-on-koji.patch +# On koji, network related tests sometimes cause internal server error, +# ignore these +Patch10: ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch @@ -332,7 +335,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch7 -p1 %patch8 -p1 %patch9 -p1 -#%%patch10 -p1 +%patch10 -p1 %patch12 -p1 %build From 7eabfd2d544f6366582fd6b453728ee8f120dc91 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sat, 10 Nov 2012 16:39:21 +0900 Subject: [PATCH 215/529] release++ --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 8256651..d3d0638 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 21%{?dist} +Release: 22%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -742,6 +742,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-22 +- Ignore some network related tests + * Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-21 - Update to 1.9.3.327 - Fix Hash-flooding DoS vulnerability on MurmurHash function From e546e8e8c85883378ca66352222958c8245c568c Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 11 Nov 2012 00:03:25 +0900 Subject: [PATCH 216/529] Skip test_str_crypt (on rawhide) for now (upstream bug 7312) --- ruby-1.9.3-p327-crypt-argument-glibc217.patch | 14 ++++++++++++++ ruby.spec | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ruby-1.9.3-p327-crypt-argument-glibc217.patch diff --git a/ruby-1.9.3-p327-crypt-argument-glibc217.patch b/ruby-1.9.3-p327-crypt-argument-glibc217.patch new file mode 100644 index 0000000..df1e813 --- /dev/null +++ b/ruby-1.9.3-p327-crypt-argument-glibc217.patch @@ -0,0 +1,14 @@ +--- ruby-1.9.3-p327/test/ruby/test_m17n_comb.rb.save 2011-02-15 16:08:15.000000000 +0900 ++++ ruby-1.9.3-p327/test/ruby/test_m17n_comb.rb 2012-11-10 23:56:58.000000000 +0900 +@@ -777,6 +777,11 @@ + end + + def test_str_crypt ++ begin ++ a("").crypt(a("\xa1\xa1")) ++ rescue ArgumentError ++ skip 'http://bugs.ruby-lang.org/issues/show/7312' ++ end + combination(STRINGS, STRINGS) {|str, salt| + if a(salt).length < 2 + assert_raise(ArgumentError) { str.crypt(salt) } diff --git a/ruby.spec b/ruby.spec index d3d0638..7d4feab 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 22%{?dist} +Release: 23%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -94,6 +94,9 @@ Patch9: rubygems-1.8.11-binary-extensions.patch # On koji, network related tests sometimes cause internal server error, # ignore these Patch10: ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch +# http://bugs.ruby-lang.org/issues/show/7312 +# test_str_crypt fails with glibc 2.17 +Patch11: ruby-1.9.3-p327-crypt-argument-glibc217.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch @@ -336,6 +339,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch8 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 %patch12 -p1 %build @@ -742,6 +746,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Sun Nov 11 2012 Mamoru TASAKA - 1.9.3.327-23 +- Skip test_str_crypt (on rawhide) for now (upstream bug 7312) + * Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-22 - Ignore some network related tests From 71a6c68957acfc2645c1fcf3f486a19cf2651b90 Mon Sep 17 00:00:00 2001 From: Bohuslav Kabrda Date: Mon, 3 Dec 2012 15:36:44 +0100 Subject: [PATCH 217/529] Disable one test on ARM until upstream confirms that the patch is ok --- ruby.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d3d0638..e161b77 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 22%{?dist} +Release: 23%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -469,6 +469,12 @@ DISABLE_TESTS="-x test_drbssl.rb $DISABLE_TESTS" DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" %endif +%ifarch %{arm} +# test_parse.rb fails on ARM at line 787 +# http://bugs.ruby-lang.org/issues/6899 +DISABLE_TESTS="-x test_parse.rb $DISABLE_TESTS" +%endif + %ifnarch ppc ppc64 make check TESTS="-v $DISABLE_TESTS" %endif @@ -742,6 +748,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Dec 03 2012 Jaromir Capik - 1.9.3.327-23 +- Skipping test_parse.rb (fails on ARM at line 787) +- http://bugs.ruby-lang.org/issues/6899 + * Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-22 - Ignore some network related tests From e7ad4decdbe8af1695a6ee4eee739b0dd99acfd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Dec 2012 13:42:40 +0100 Subject: [PATCH 218/529] Fix bogus dates in %changelog reported by rpm-4.11. --- ruby.spec | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ruby.spec b/ruby.spec index 7d4feab..634c6b6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -818,18 +818,18 @@ make check TESTS="-v $DISABLE_TESTS" - Create and own RubyGems directories for binary extensions. - Fix build with GCC 4.7. -* Wed Jan 16 2012 V鱈t Ondruch - 1.9.3.0-3 +* Mon Jan 16 2012 V鱈t Ondruch - 1.9.3.0-3 - Fix RHEL build. - Fixed directory ownership. - Verose build output. -* Wed Jan 15 2012 V鱈t Ondruch - 1.9.3.0-2 +* Sun Jan 15 2012 V鱈t Ondruch - 1.9.3.0-2 - Install RubyGems outside of Ruby directory structure. - RubyGems has not its own -devel subpackage. - Enhanced macros.ruby and macros.rubygems. - All tests are green now (bkabrda). -* Tue Jan 14 2012 V鱈t Ondruch - 1.9.3.0-1 +* Sat Jan 14 2012 V鱈t Ondruch - 1.9.3.0-1 - Initial package * Sat Jan 14 2012 Fedora Release Engineering - 1.8.7.357-2 @@ -843,7 +843,7 @@ make check TESTS="-v $DISABLE_TESTS" - dont normalise arm cpus to arm - there is something weird about how ruby choses where to put bits -* Thu Nov 16 2011 Mamoru Tasaka - 1.8.7.352-3 +* Thu Nov 17 2011 Mamoru Tasaka - 1.8.7.352-3 - F-17: kill gdbm support for now due to licensing compatibility issue * Sat Oct 1 2011 Mamoru Tasaka - 1.8.7.352-2 @@ -1128,11 +1128,11 @@ make check TESTS="-v $DISABLE_TESTS" * Fri Aug 10 2007 Akira TAGOH - Update License tag. -* Mon Jul 25 2007 Akira TAGOH - 1.8.6.36-3 +* Mon Jun 25 2007 Akira TAGOH - 1.8.6.36-3 - ruby-r12567.patch: backport patch from upstream svn to get rid of the unnecessary declarations. (#245446) -* Wed Jul 20 2007 Akira TAGOH - 1.8.6.36-2 +* Wed Jun 20 2007 Akira TAGOH - 1.8.6.36-2 - New upstream release. - Fix Etc::getgrgid to get the correct gid as requested. (#236647) @@ -1596,7 +1596,7 @@ make check TESTS="-v $DISABLE_TESTS" - Removed ruby_cvs.2000092718.patch and added ruby_cvs.2000100218.patch (upgraded ruby to latest cvs version). -* Thu Sep 27 2000 akira yamada +* Wed Sep 27 2000 akira yamada - Updated to upstream version 1.6.1. - Removed ruby_cvs.2000082901.patch and added ruby_cvs.2000092718.patch (upgraded ruby to latest cvs version). @@ -1628,7 +1628,7 @@ make check TESTS="-v $DISABLE_TESTS" - Removed ruby-list.23190.patch(included into ruby_cvs.patch). - Added ruby-dev.10054.patch. -* Tue Jun 15 2000 akira yamada +* Thu Jun 15 2000 akira yamada - Updated to version 1.4.4(06/12/2000 CVS). - Added manuals and FAQs. - Split into ruby, ruby-devel, ruby-tcltk, ruby-docs, irb. @@ -1674,7 +1674,7 @@ make check TESTS="-v $DISABLE_TESTS" * Fri Nov 13 1998 Toru Hoshina - Version up. -* Mon Sep 22 1998 Toru Hoshina +* Tue Sep 22 1998 Toru Hoshina - To make a libruby.so. * Mon Sep 21 1998 Toru Hoshina From a8441ce179048e81ffc7b20dbd9d2487d27d9565 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Wed, 2 Jan 2013 16:07:42 +0900 Subject: [PATCH 220/529] Update to 1.9.3.362 --- .gitignore | 1 + ruby.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 214cb2e..e69175f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.9.3-p194.tar.gz /ruby-1.9.3-p286.tar.gz /ruby-1.9.3-p327.tar.gz +/ruby-1.9.3-p362.tar.gz diff --git a/ruby.spec b/ruby.spec index cfdf48f..dac6472 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 1 %global minor_version 9 %global teeny_version 3 -%global patch_level 327 +%global patch_level 362 %global major_minor_version %{major_version}.%{minor_version} @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 23%{?dist}.1 +Release: 24%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -752,6 +752,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Jan 2 2013 Mamoru TASAKA - 1.9.3.362-24 +- Update to 1.9.3.362 + * Mon Dec 03 2012 Jaromir Capik - 1.9.3.327-23 - Skipping test_parse.rb (fails on ARM at line 787) - http://bugs.ruby-lang.org/issues/6899 diff --git a/sources b/sources index a6d1e70..57ad81e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -96118e856b502b5d7b3a4398e6c6e98c ruby-1.9.3-p327.tar.gz +1efc2316dc50e97591792d90647fade2 ruby-1.9.3-p362.tar.gz From 169a9110ad07e9472e9ef419bbab4d1abb11bd5f Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Wed, 2 Jan 2013 16:18:38 +0900 Subject: [PATCH 221/529] Kill upstream-applied patch --- ruby-1.9.3-p327-crypt-argument-glibc217.patch | 14 -------------- ruby.spec | 5 +++-- 2 files changed, 3 insertions(+), 16 deletions(-) delete mode 100644 ruby-1.9.3-p327-crypt-argument-glibc217.patch diff --git a/ruby-1.9.3-p327-crypt-argument-glibc217.patch b/ruby-1.9.3-p327-crypt-argument-glibc217.patch deleted file mode 100644 index df1e813..0000000 --- a/ruby-1.9.3-p327-crypt-argument-glibc217.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- ruby-1.9.3-p327/test/ruby/test_m17n_comb.rb.save 2011-02-15 16:08:15.000000000 +0900 -+++ ruby-1.9.3-p327/test/ruby/test_m17n_comb.rb 2012-11-10 23:56:58.000000000 +0900 -@@ -777,6 +777,11 @@ - end - - def test_str_crypt -+ begin -+ a("").crypt(a("\xa1\xa1")) -+ rescue ArgumentError -+ skip 'http://bugs.ruby-lang.org/issues/show/7312' -+ end - combination(STRINGS, STRINGS) {|str, salt| - if a(salt).length < 2 - assert_raise(ArgumentError) { str.crypt(salt) } diff --git a/ruby.spec b/ruby.spec index dac6472..83f659c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -96,7 +96,8 @@ Patch9: rubygems-1.8.11-binary-extensions.patch Patch10: ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch # http://bugs.ruby-lang.org/issues/show/7312 # test_str_crypt fails with glibc 2.17 -Patch11: ruby-1.9.3-p327-crypt-argument-glibc217.patch +# Fixed in 1.9.3 p 362 +#Patch11: ruby-1.9.3-p327-crypt-argument-glibc217.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch @@ -339,7 +340,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch8 -p1 %patch9 -p1 %patch10 -p1 -%patch11 -p1 +#%%patch11 -p1 %patch12 -p1 %build From 1d3888b468d4994726028f45f89424fa93dba3b8 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Wed, 16 Jan 2013 23:23:01 +0900 Subject: [PATCH 222/529] Backport fix for the upstream PR7629, save the proc made from the given block (bug 895173) --- ruby-1.9.3-p327-PR7629-save-proc.patch | 45 ++++++++++++++++++++++++++ ruby.spec | 13 ++++++-- 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 ruby-1.9.3-p327-PR7629-save-proc.patch diff --git a/ruby-1.9.3-p327-PR7629-save-proc.patch b/ruby-1.9.3-p327-PR7629-save-proc.patch new file mode 100644 index 0000000..c2dfa12 --- /dev/null +++ b/ruby-1.9.3-p327-PR7629-save-proc.patch @@ -0,0 +1,45 @@ +Mon Jan 7 15:50:25 2013 Nobuyoshi Nakada + + * vm.c (rb_vm_make_proc): save the proc made from the given block so + that it will not get collected. [ruby-core:50545] [Bug #7507] + +diff --git a/vm.c b/vm.c +index 4dd242f..70e8d3b 100644 +--- a/vm.c ++++ b/vm.c +@@ -468,10 +468,18 @@ + } + + static VALUE vm_make_proc_from_block(rb_thread_t *th, rb_block_t *block); ++static VALUE vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp, VALUE *blockprocptr); + + VALUE + rb_vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp) + { ++ VALUE blockprocval; ++ return vm_make_env_object(th, cfp, &blockprocval); ++} ++ ++static VALUE ++vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp, VALUE *blockprocptr) ++{ + VALUE envval; + VALUE *lfp; + rb_block_t *blockptr; +@@ -489,6 +497,7 @@ + rb_proc_t *p; + GetProcPtr(blockprocval, p); + lfp[0] = GC_GUARDED_PTR(&p->block); ++ *blockprocptr = blockprocval; + } + + envval = vm_make_env_each(th, cfp, cfp->dfp, cfp->lfp); +@@ -559,7 +568,7 @@ + rb_bug("rb_vm_make_proc: Proc value is already created."); + } + +- envval = rb_vm_make_env_object(th, cfp); ++ envval = vm_make_env_object(th, cfp, &blockprocval); + + if (PROCDEBUG) { + check_env_value(envval); diff --git a/ruby.spec b/ruby.spec index 83f659c..90939c4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 24%{?dist} +Release: 25%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -100,6 +100,10 @@ Patch10: ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch #Patch11: ruby-1.9.3-p327-crypt-argument-glibc217.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch +# http://bugs.ruby-lang.org/issues/7629 +# https://bugzilla.redhat.com/show_bug.cgi?id=895173 +# save the proc made from the given block +Patch13: ruby-1.9.3-p327-PR7629-save-proc.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -342,6 +346,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch10 -p1 #%%patch11 -p1 %patch12 -p1 +%patch13 -p1 %build autoconf @@ -753,7 +758,11 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Wed Jan 2 2013 Mamoru TASAKA - 1.9.3.362-24 +* Wed Jan 16 2013 Mamoru TASAKA - 1.9.3.362-25 +- Backport fix for the upstream PR7629, save the proc made from the given block + (bug 895173) + +* Wed Jan 2 2013 Mamoru TASAKA - 1.9.3.362-24 - Update to 1.9.3.362 * Mon Dec 03 2012 Jaromir Capik - 1.9.3.327-23 From 8703f41ded27f063baa3d047bc6cc6062216c2dc Mon Sep 17 00:00:00 2001 From: TASAKA Mamoru Date: Fri, 18 Jan 2013 21:42:55 +0900 Subject: [PATCH 223/529] Provide non-versioned pkgconfig file (bug 789532) - Use db5 on F-19 (bug 894022) - Backport fix for the upstream PR7629, save the proc made from the given block (bug 895173) --- ruby.spec | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 90939c4..039d1bb 100644 --- a/ruby.spec +++ b/ruby.spec @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 25%{?dist} +Release: 26%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -116,7 +116,11 @@ Requires: rubygem(bigdecimal) >= %{bigdecimal_version} BuildRequires: autoconf BuildRequires: gdbm-devel BuildRequires: ncurses-devel +%if 0%{?fedora} >= 19 +BuildRequires: libdb-devel +%else BuildRequires: db4-devel +%endif BuildRequires: libffi-devel BuildRequires: openssl-devel BuildRequires: libyaml-devel @@ -360,6 +364,7 @@ autoconf --with-vendorarchdir='%{ruby_vendorarchdir}' \ --with-rubyhdrdir='%{_includedir}' \ --with-rubygemsdir='%{rubygems_dir}' \ + --with-ruby_pc='%{name}.pc' \ --disable-rpath \ --enable-shared \ --disable-versioned-paths @@ -373,6 +378,11 @@ make %{?_smp_mflags} COPY="cp -p" Q= rm -rf %{buildroot} make install DESTDIR=%{buildroot} +# On F-18 and below, also provide %%{hame}-%%{major_minor_version}.pc +%if 0%{?fedora} <= 18 +cp -p %{buildroot}%{_libdir}/pkgconfig/%{name}{,-%{major_minor_version}}.pc +%endif + # Dump the macros into macro.ruby to use them to build other Ruby libraries. mkdir -p %{buildroot}%{_sysconfdir}/rpm cat >> %{buildroot}%{_sysconfdir}/rpm/macros.ruby << \EOF @@ -518,7 +528,12 @@ make check TESTS="-v $DISABLE_TESTS" %{_includedir}/* %{_libdir}/libruby.so +# TODO +# ruby.pc still needs fixing, see bug 789532 comment 8 +%{_libdir}/pkgconfig/ruby.pc +%if 0%{?fedora} <= 18 %{_libdir}/pkgconfig/ruby-%{major_minor_version}.pc +%endif %files libs %doc COPYING @@ -758,6 +773,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Jan 18 2013 Mamoru TASAKA - 1.9.3.362-26 +- Provide non-versioned pkgconfig file (bug 789532) +- Use db5 on F-19 (bug 894022) + * Wed Jan 16 2013 Mamoru TASAKA - 1.9.3.362-25 - Backport fix for the upstream PR7629, save the proc made from the given block (bug 895173) From 957db761272cd0fccd50b8149a93f4f31b9c5444 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Sun, 20 Jan 2013 01:44:27 +0900 Subject: [PATCH 224/529] Update to 1.9.3 p374 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix provided variables in pkgconfig (bug 789532: V鱈t Ondruch ) --- .gitignore | 1 + ruby-1.9.3-p327-PR7629-save-proc.patch | 45 ------------------- ...pc-variable-by-configuration-process.patch | 35 +++++++++++++++ ruby.spec | 18 ++++++-- sources | 2 +- 5 files changed, 51 insertions(+), 50 deletions(-) delete mode 100644 ruby-1.9.3-p327-PR7629-save-proc.patch create mode 100644 ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch diff --git a/.gitignore b/.gitignore index e69175f..7bf1118 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.9.3-p286.tar.gz /ruby-1.9.3-p327.tar.gz /ruby-1.9.3-p362.tar.gz +/ruby-1.9.3-p374.tar.gz diff --git a/ruby-1.9.3-p327-PR7629-save-proc.patch b/ruby-1.9.3-p327-PR7629-save-proc.patch deleted file mode 100644 index c2dfa12..0000000 --- a/ruby-1.9.3-p327-PR7629-save-proc.patch +++ /dev/null @@ -1,45 +0,0 @@ -Mon Jan 7 15:50:25 2013 Nobuyoshi Nakada - - * vm.c (rb_vm_make_proc): save the proc made from the given block so - that it will not get collected. [ruby-core:50545] [Bug #7507] - -diff --git a/vm.c b/vm.c -index 4dd242f..70e8d3b 100644 ---- a/vm.c -+++ b/vm.c -@@ -468,10 +468,18 @@ - } - - static VALUE vm_make_proc_from_block(rb_thread_t *th, rb_block_t *block); -+static VALUE vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp, VALUE *blockprocptr); - - VALUE - rb_vm_make_env_object(rb_thread_t * th, rb_control_frame_t *cfp) - { -+ VALUE blockprocval; -+ return vm_make_env_object(th, cfp, &blockprocval); -+} -+ -+static VALUE -+vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp, VALUE *blockprocptr) -+{ - VALUE envval; - VALUE *lfp; - rb_block_t *blockptr; -@@ -489,6 +497,7 @@ - rb_proc_t *p; - GetProcPtr(blockprocval, p); - lfp[0] = GC_GUARDED_PTR(&p->block); -+ *blockprocptr = blockprocval; - } - - envval = vm_make_env_each(th, cfp, cfp->dfp, cfp->lfp); -@@ -559,7 +568,7 @@ - rb_bug("rb_vm_make_proc: Proc value is already created."); - } - -- envval = rb_vm_make_env_object(th, cfp); -+ envval = vm_make_env_object(th, cfp, &blockprocval); - - if (PROCDEBUG) { - check_env_value(envval); diff --git a/ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch b/ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch new file mode 100644 index 0000000..20dd78d --- /dev/null +++ b/ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch @@ -0,0 +1,35 @@ +From bf4959bc763167b2245a5f4c699fcb72afead5a5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 18 Jan 2013 15:51:49 +0100 +Subject: [PATCH] Expand ruby.pc variable by configuration process. + +--- + template/ruby.pc.in | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/template/ruby.pc.in b/template/ruby.pc.in +index 2d6716c..25e42f3 100644 +--- a/template/ruby.pc.in ++++ b/template/ruby.pc.in +@@ -25,12 +25,12 @@ LIBS=@LIBS@ + DLDFLAGS=@DLDFLAGS@ + ruby=${bindir}/${RUBY_INSTALL_NAME}@EXEEXT@ + rubylibprefix=@rubylibprefix@ +-rubylibdir=${rubylibprefix}/${ruby_version} +-vendordir=${rubylibprefix}/vendor_ruby +-sitedir=${rubylibprefix}/site_ruby +-rubyarchdir=${rubylibdir}/${arch} +-vendorarchdir=${vendordir}/${sitearch} +-sitearchdir=${sitedir}/${sitearch} ++rubylibdir=@rubylibprefix@ ++vendordir=@vendordir@ ++sitedir=@sitedir@ ++rubyarchdir=@archdir@ ++vendorarchdir=@vendorarchdir@ ++sitearchdir=@sitearchdir@ + rubyhdrdir=@rubyhdrdir@ + vendorhdrdir=@vendorhdrdir@ + sitehdrdir=@sitehdrdir@ +-- +1.8.0.2 + diff --git a/ruby.spec b/ruby.spec index 039d1bb..c633158 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 1 %global minor_version 9 %global teeny_version 3 -%global patch_level 362 +%global patch_level 374 %global major_minor_version %{major_version}.%{minor_version} @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 26%{?dist} +Release: 27%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -103,7 +103,11 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # http://bugs.ruby-lang.org/issues/7629 # https://bugzilla.redhat.com/show_bug.cgi?id=895173 # save the proc made from the given block -Patch13: ruby-1.9.3-p327-PR7629-save-proc.patch +# Fixed in p374 +#Patch13: ruby-1.9.3-p327-PR7629-save-proc.patch +# Fixes issues mentioned in rhbz#789532, comment 8. +# TODO: Should be probably upstreamed with #5281. +Patch14: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -350,7 +354,8 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch10 -p1 #%%patch11 -p1 %patch12 -p1 -%patch13 -p1 +#%%patch13 -p1 +%patch14 -p1 %build autoconf @@ -773,6 +778,11 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Sat Jan 19 2013 Mamoru TASAKA - 1.9.3.374-27 +- Update to 1.9.3 p374 +- Fix provided variables in pkgconfig (bug 789532: + V鱈t Ondruch ) + * Fri Jan 18 2013 Mamoru TASAKA - 1.9.3.362-26 - Provide non-versioned pkgconfig file (bug 789532) - Use db5 on F-19 (bug 894022) diff --git a/sources b/sources index 57ad81e..b186805 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -1efc2316dc50e97591792d90647fade2 ruby-1.9.3-p362.tar.gz +90b6c327abcdf30a954c2d6ae44da2a9 ruby-1.9.3-p374.tar.gz From 51a6d3593c25ae663c0589f62e6bf8f6c4803264 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 11 Feb 2013 15:55:43 +0900 Subject: [PATCH 225/529] Update to 1.9.3 p385 --- .gitignore | 1 + ruby.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7bf1118..f5ae591 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.9.3-p327.tar.gz /ruby-1.9.3-p362.tar.gz /ruby-1.9.3-p374.tar.gz +/ruby-1.9.3-p385.tar.gz diff --git a/ruby.spec b/ruby.spec index c633158..2a81764 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 1 %global minor_version 9 %global teeny_version 3 -%global patch_level 374 +%global patch_level 385 %global major_minor_version %{major_version}.%{minor_version} @@ -56,7 +56,7 @@ Version: %{ruby_version_patch_level} # we cannot reset the release number to 1 even when the main (ruby) version # is updated - because it may be that the versions of sub-components don't # change. -Release: 27%{?dist} +Release: 28%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -778,6 +778,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Feb 11 2013 Mamoru TASAKA - 1.9.3.385-28 +- Update to 1.9.3 p385 + * Sat Jan 19 2013 Mamoru TASAKA - 1.9.3.374-27 - Update to 1.9.3 p374 - Fix provided variables in pkgconfig (bug 789532: diff --git a/sources b/sources index b186805..2c2210c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -90b6c327abcdf30a954c2d6ae44da2a9 ruby-1.9.3-p374.tar.gz +3e0d7f8512400c1a6732327728a56f1d ruby-1.9.3-p385.tar.gz From 7dff78b417ed06f213fb99d3fa4bf589639a812f Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Mon, 11 Feb 2013 16:10:19 +0900 Subject: [PATCH 226/529] fix rdoc version --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 2a81764..887454d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -40,7 +40,7 @@ # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 3.9.4 +%global rdoc_version 3.9.5 %global bigdecimal_version 1.1.0 %global io_console_version 0.3 %global json_version 1.5.4 From 7fe201b1485fd773daf031c2eed10ad221f96c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 23 Feb 2012 09:14:02 +0100 Subject: [PATCH 227/529] Initial .spec for Ruby 2.0.0. --- ...9.3-added-site-and-vendor-arch-flags.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 2 +- ruby-1.9.3-bignum-test-fix.patch | 31 -------- ruby-1.9.3-mkmf-verbose.patch | 4 +- ruby-1.9.3-webrick-test-fix.patch | 24 ------- ruby.spec | 71 ++++++++----------- 6 files changed, 34 insertions(+), 100 deletions(-) delete mode 100644 ruby-1.9.3-bignum-test-fix.patch delete mode 100644 ruby-1.9.3-webrick-test-fix.patch diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index 1363063..6f217c2 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -43,7 +43,7 @@ index 83e5d76..31532bd 100644 +done + AC_ARG_WITH(vendordir, - AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]), + AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], @@ -2820,19 +2829,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index 8440ea7..acf60c8 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -40,7 +40,7 @@ index 83e5d76..e6dc38c 100644 +done + AC_ARG_WITH(sitedir, - AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]), + AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), [sitedir=$withval], @@ -2815,16 +2824,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) diff --git a/ruby-1.9.3-bignum-test-fix.patch b/ruby-1.9.3-bignum-test-fix.patch deleted file mode 100644 index cb3682d..0000000 --- a/ruby-1.9.3-bignum-test-fix.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- ruby-1.9.3-p0/test/ruby/test_bignum.rb.orig 2011-11-10 09:52:59.101925465 +0100 -+++ ruby-1.9.3-p0/test/ruby/test_bignum.rb 2011-11-10 09:54:14.580798826 +0100 -@@ -378,7 +378,7 @@ - assert_equal(true, (2**32).even?) - end - -- def interrupt -+ def assert_interrupt - time = Time.now - start_flag = false - end_flag = false -@@ -387,14 +387,16 @@ - yield - end_flag = true - end -- sleep 1 -+ Thread.pass until start_flag - thread.raise - thread.join rescue nil -- start_flag && !end_flag && Time.now - time < 10 -+ time = Time.now - time -+ assert_equal([true, false], [start_flag, end_flag]) -+ assert_operator(time, :<, 10) - end - - def test_interrupt -- assert(interrupt { (65536 ** 65536).to_s }) -+ assert_interrupt {(65536 ** 65536).to_s} - end - - def test_too_big_to_s diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 7da66c8..f23d6cc 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -1,6 +1,6 @@ --- ruby-1.9.3-p0/lib/mkmf.rb.debug 2011-08-11 15:07:37.000000000 +0900 +++ ruby-1.9.3-p0/lib/mkmf.rb 2012-01-29 21:34:17.000000000 +0900 -@@ -1638,7 +1638,7 @@ +@@ -1701,7 +1701,7 @@ SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. @@ -8,4 +8,4 @@ +V = 1 Q1 = $(V:1=) Q = $(Q1:0=@) - n=$(NULLCMD) + ECHO1 = $(V:1=@#{CONFIG['NULLCMD']}) diff --git a/ruby-1.9.3-webrick-test-fix.patch b/ruby-1.9.3-webrick-test-fix.patch deleted file mode 100644 index c6eb3fa..0000000 --- a/ruby-1.9.3-webrick-test-fix.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/test/webrick/test_cgi.rb b/test/webrick/test_cgi.rb -index 1185316..0ef1b37 100644 ---- a/test/webrick/test_cgi.rb -+++ b/test/webrick/test_cgi.rb -@@ -14,6 +14,7 @@ class TestWEBrickCGI < Test::Unit::TestCase - def req.meta_vars - meta = super - meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR) -+ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']] - return meta - end - }, -diff --git a/test/webrick/test_filehandler.rb b/test/webrick/test_filehandler.rb -index bcdb3df..f78ba5c 100644 ---- a/test/webrick/test_filehandler.rb -+++ b/test/webrick/test_filehandler.rb -@@ -252,6 +252,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase - def req.meta_vars - meta = super - meta["RUBYLIB"] = $:.join(File::PATH_SEPARATOR) -+ meta[RbConfig::CONFIG['LIBPATHENV']] = ENV[RbConfig::CONFIG['LIBPATHENV']] - return meta - end - }, diff --git a/ruby.spec b/ruby.spec index 887454d..274491d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,13 +1,15 @@ -%global major_version 1 -%global minor_version 9 -%global teeny_version 3 -%global patch_level 385 +%global major_version 2 +%global minor_version 0 +%global teeny_version 0 +%global patch_level 0 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_version_patch_level %{major_minor_version}.%{teeny_version}.%{patch_level} -%global ruby_abi %{major_minor_version}.1 +# Keep the ruby abi 1.9.1 for compatibility with gems. +# %global ruby_abi %{major_minor_version}.0 +%global ruby_abi 1.9.1 %global ruby_archive %{name}-%{ruby_version}-p%{patch_level} @@ -44,7 +46,7 @@ %global bigdecimal_version 1.1.0 %global io_console_version 0.3 %global json_version 1.5.4 -%global minitest_version 2.5.1 +%global minitest_version 2.8.1 %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -78,9 +80,6 @@ Patch4: ruby-1.9.3-fix-s390x-build.patch # Fix the uninstaller, so that it doesn't say that gem doesn't exist # when it exists outside of the GEM_HOME (already fixed in the upstream) Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch -# Already fixed upstream: -# https://github.com/ruby/ruby/commit/f212df564a4e1025f9fb019ce727022a97bfff53 -Patch7: ruby-1.9.3-bignum-test-fix.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 Patch8: ruby-1.9.3-custom-rubygems-location.patch @@ -330,6 +329,9 @@ minitest/pride shows pride in testing and adds coloring to your test output. +# TODO: +# %%pacakge -n rubygem-psych + %package tcltk Summary: Tcl/Tk interface for scripting language Ruby Group: Development/Languages @@ -348,7 +350,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 @@ -424,7 +425,7 @@ mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults # Move gems root into common direcotry, out of Ruby directory structure. -mv %{buildroot}%{ruby_libdir}/gems/%{ruby_abi} %{buildroot}%{gem_dir} +mv %{buildroot}%{ruby_libdir}/gems/2.0.0 %{buildroot}%{gem_dir} # Create folders for gem binary extensions. mkdir -p %{buildroot}%{gem_extdir}/exts @@ -460,49 +461,31 @@ mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib # Adjust the gemspec files so that the gems will load properly -sed -i '2 a\ - s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rake-%{rake_version}.gemspec +sed -i '8 a\ + s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rake-%{rake_version}.gemspec -sed -i '2 a\ - s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec +sed -i '8 a\ + s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec -sed -i '2 a\ +sed -i '8 a\ s.require_paths = ["lib"]\ s.extensions = ["bigdecimal.so"]' %{buildroot}%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec -sed -i '2 a\ +sed -i '8 a\ s.require_paths = ["lib"]\ s.extensions = ["io/console.so"]' %{buildroot}%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec -sed -i '2 a\ +sed -i '8 a\ s.require_paths = ["lib"]\ s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec -sed -i '2 a\ - s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec +sed -i '8 a\ + s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check -DISABLE_TESTS="" - -# OpenSSL 1.0.1 is breaking the drb test suite. -# https://bugs.ruby-lang.org/issues/6221 -DISABLE_TESTS="-x test_drbssl.rb $DISABLE_TESTS" - -%ifarch armv7l armv7hl armv7hnl -# test_call_double(DL::TestDL) fails on ARM HardFP -# http://bugs.ruby-lang.org/issues/6592 -DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" -%endif - -%ifarch %{arm} -# test_parse.rb fails on ARM at line 787 -# http://bugs.ruby-lang.org/issues/6899 -DISABLE_TESTS="-x test_parse.rb $DISABLE_TESTS" -%endif - -%ifnarch ppc ppc64 -make check TESTS="-v $DISABLE_TESTS" -%endif +# TODO: Investigate the test failures. +# https://bugs.ruby-lang.org/issues/6036 +make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_x509cert.rb" %post libs -p /sbin/ldconfig @@ -513,6 +496,11 @@ make check TESTS="-v $DISABLE_TESTS" %lang(ja) %doc COPYING.ja %doc GPL %doc LEGAL +%doc NEWS +%doc README +%lang(ja) %doc README.ja +%doc doc/ChangeLog-* +%doc doc/NEWS-* %{_bindir}/erb %{_bindir}/ruby %{_bindir}/testrb @@ -665,6 +653,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/enc/utf_32be.so %{ruby_libarchdir}/enc/utf_32le.so %{ruby_libarchdir}/enc/windows_1251.so +%{ruby_libarchdir}/enc/windows_31j.so %{ruby_libarchdir}/etc.so %{ruby_libarchdir}/fcntl.so %{ruby_libarchdir}/fiber.so From ea3cb65d830a50ea5cdede10652529563d91ab51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 18 Apr 2012 19:40:36 +0200 Subject: [PATCH 228/529] Upgrade to Ruby 2.0.0 (r35368). --- ...9.3-added-site-and-vendor-arch-flags.patch | 31 +++++++++---------- ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 18 +++++------ ruby-1.9.3-custom-rubygems-location.patch | 14 ++++----- ruby-1.9.3-disable-versioned-paths.patch | 10 +++--- ruby-1.9.3-mkmf-verbose.patch | 2 +- ruby.spec | 26 ++++++++++------ 7 files changed, 54 insertions(+), 49 deletions(-) diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index 6f217c2..cf91b02 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -15,7 +15,7 @@ diff --git a/Makefile.in b/Makefile.in index bcdaf5f..f57e4c4 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -34,6 +34,9 @@ datadir = @datadir@ +@@ -37,6 +37,9 @@ datadir = @datadir@ archdir = @archdir@ sitearch = @sitearch@ sitedir = @sitedir@ @@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in index 83e5d76..31532bd 100644 --- a/configure.in +++ b/configure.in -@@ -2811,6 +2811,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -2866,6 +2866,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 83e5d76..31532bd 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], -@@ -2820,19 +2829,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -2875,19 +2884,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 83e5d76..31532bd 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -2850,6 +2872,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -2905,12 +2927,26 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -92,31 +92,30 @@ index 83e5d76..31532bd 100644 AS_CASE(["$RUBY_VENDOR_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' -@@ -2857,6 +2886,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], + ], [ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" - ]) ++ ]) +AS_CASE(["$RUBY_VENDOR_ARCHLIB_PATH"], + ["$RUBY_LIB_PREFIX/"*], [ + RUBY_VENDOR_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_ARCHLIB_PATH\" : \"$pat\"`"'"' + ], + [ + RUBY_VENDOR_ARCHLIB_PATH="\"${RUBY_VENDOR_ARCHLIB_PATH}\"" -+ ]) + ]) pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], - ["$RUBY_EXEC_PREFIX/"*], [ -@@ -2878,19 +2914,23 @@ if test "x$SITE_DIR" = xno; then - AC_DEFINE(NO_RUBY_SITE_LIB) +@@ -2933,19 +2969,23 @@ if test "x$SITE_DIR" = xno; then + AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else - AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH}) -+ AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, ${RUBY_SITE_ARCHLIB_PATH}) + AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) ++ AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, ${RUBY_SITE_ARCHLIB_PATH} !!) fi if test "x$VENDOR_DIR" = xno; then - AC_DEFINE(NO_RUBY_VENDOR_LIB) + AC_DEFINE(NO_RUBY_VENDOR_LIB, [] !!) else - AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH}) -+ AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, ${RUBY_VENDOR_ARCHLIB_PATH}) + AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH} !!) ++ AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, ${RUBY_VENDOR_ARCHLIB_PATH} !!) fi AC_SUBST(arch)dnl @@ -170,7 +169,7 @@ diff --git a/version.c b/version.c index 59d4e5e..2558aa0 100644 --- a/version.c +++ b/version.c -@@ -50,8 +50,12 @@ +@@ -51,8 +51,12 @@ #ifndef RUBY_ARCHLIB #define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH #endif diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index f5a8c3d..c7e3b75 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -1,6 +1,6 @@ --- a/configure.in.orig 2011-10-18 08:56:21.587594685 +0200 +++ b/configure.in 2011-10-18 08:56:59.751593321 +0200 -@@ -2935,6 +2935,8 @@ +@@ -2990,6 +2990,8 @@ configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index acf60c8..c5017e3 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -14,7 +14,7 @@ diff --git a/Makefile.in b/Makefile.in index bcdaf5f..d61b2ee 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -31,6 +31,7 @@ libexecdir = @libexecdir@ +@@ -34,6 +34,7 @@ libexecdir = @libexecdir@ datarootdir = @datarootdir@ datadir = @datadir@ arch = @arch@ @@ -26,7 +26,7 @@ diff --git a/configure.in b/configure.in index 83e5d76..e6dc38c 100644 --- a/configure.in +++ b/configure.in -@@ -2793,6 +2793,15 @@ else +@@ -2848,6 +2848,15 @@ else RUBY_LIB_VERSION="\"${ruby_version}\"" fi @@ -42,7 +42,7 @@ index 83e5d76..e6dc38c 100644 AC_ARG_WITH(sitedir, AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), [sitedir=$withval], -@@ -2815,16 +2824,25 @@ if test "${LOAD_RELATIVE+set}"; then +@@ -2870,16 +2879,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" @@ -68,15 +68,15 @@ index 83e5d76..e6dc38c 100644 AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -2855,6 +2873,7 @@ else +@@ -2910,6 +2928,7 @@ fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") - AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX}) -+AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, ${RUBY_ARCH_LIB_PATH}) + AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !!) ++AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, ${RUBY_ARCH_LIB_PATH} !!) if test "x$SITE_DIR" = xno; then - AC_DEFINE(NO_RUBY_SITE_LIB) + AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else -@@ -2869,6 +2888,7 @@ fi +@@ -2924,6 +2943,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -117,7 +117,7 @@ diff --git a/version.c b/version.c index 59d4e5e..915a0a2 100644 --- a/version.c +++ b/version.c -@@ -47,7 +47,9 @@ +@@ -48,7 +48,9 @@ #define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION #define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION #endif diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 62d3dad..1db16aa 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index b1bc951..91c5d0d 100644 --- a/configure.in +++ b/configure.in -@@ -2838,6 +2838,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -2893,6 +2893,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDORARCH_DIR}" done @@ -29,7 +29,7 @@ index b1bc951..91c5d0d 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" -@@ -2931,6 +2938,7 @@ AC_SUBST(sitearch)dnl +@@ -2986,6 +2993,7 @@ AC_SUBST(sitearch)dnl AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorarchdir)dnl @@ -53,15 +53,15 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 6bfc73e..31dc446 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -300,6 +300,7 @@ sitelibdir = CONFIG["sitelibdir"] +@@ -311,6 +311,7 @@ sitelibdir = CONFIG["sitelibdir"] sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] +rubygemsdir = CONFIG["rubygemsdir"] - mandir = CONFIG["mandir"] - capidir = CONFIG["docdir"] + mandir = CONFIG["mandir", true] + capidir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -487,7 +488,15 @@ end +@@ -498,7 +499,15 @@ end install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[README* *.txt *.rdoc] @@ -81,7 +81,7 @@ diff --git a/version.c b/version.c index 59d4e5e..12ba7e9 100644 --- a/version.c +++ b/version.c -@@ -103,6 +103,10 @@ const char ruby_initial_load_paths[] = +@@ -104,6 +104,10 @@ const char ruby_initial_load_paths[] = #endif #endif diff --git a/ruby-1.9.3-disable-versioned-paths.patch b/ruby-1.9.3-disable-versioned-paths.patch index 6d0c5e1..2b7f6fb 100644 --- a/ruby-1.9.3-disable-versioned-paths.patch +++ b/ruby-1.9.3-disable-versioned-paths.patch @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index e742e74..86cb68f 100644 --- a/configure.in +++ b/configure.in -@@ -2963,6 +2963,17 @@ else +@@ -3018,6 +3018,17 @@ else fi AC_SUBST(USE_RUBYGEMS) @@ -75,7 +75,7 @@ diff --git a/version.c b/version.c index 59d4e5e..641dc33 100644 --- a/version.c +++ b/version.c -@@ -38,9 +38,15 @@ +@@ -39,9 +39,15 @@ #define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby" #endif @@ -91,7 +91,7 @@ index 59d4e5e..641dc33 100644 #define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH #define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH #define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH -@@ -75,8 +81,10 @@ const char ruby_initial_load_paths[] = +@@ -76,8 +82,10 @@ const char ruby_initial_load_paths[] = RUBY_SITE_THIN_ARCHLIB "\0" #endif RUBY_SITE_ARCHLIB "\0" @@ -102,7 +102,7 @@ index 59d4e5e..641dc33 100644 #ifndef NO_RUBY_VENDOR_LIB RUBY_VENDOR_LIB2 "\0" -@@ -84,8 +92,10 @@ const char ruby_initial_load_paths[] = +@@ -85,8 +93,10 @@ const char ruby_initial_load_paths[] = RUBY_VENDOR_THIN_ARCHLIB "\0" #endif RUBY_VENDOR_ARCHLIB "\0" @@ -135,7 +135,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index cec8c9f..fed14d2 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -379,7 +379,7 @@ end +@@ -390,7 +390,7 @@ end install?(:doc, :rdoc) do if $rdocdir diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index f23d6cc..69e61bd 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -1,6 +1,6 @@ --- ruby-1.9.3-p0/lib/mkmf.rb.debug 2011-08-11 15:07:37.000000000 +0900 +++ ruby-1.9.3-p0/lib/mkmf.rb 2012-01-29 21:34:17.000000000 +0900 -@@ -1701,7 +1701,7 @@ +@@ -1725,7 +1725,7 @@ SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby.spec b/ruby.spec index 274491d..33f195c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,7 +11,13 @@ # %global ruby_abi %{major_minor_version}.0 %global ruby_abi 1.9.1 -%global ruby_archive %{name}-%{ruby_version}-p%{patch_level} +# If revision is removed/commented out, the official release build is expected. +# Keep the revision enabled for pre-releases from SVN. +%global revision 35368 + +%global release 1 + +%global ruby_archive %{name}-%{ruby_version}-%{?revision:r%{revision}}%{!?revision:p%{patch_level}} %global ruby_libdir %{_datadir}/%{name} %global ruby_libarchdir %{_libdir}/%{name} @@ -45,7 +51,7 @@ %global rdoc_version 3.9.5 %global bigdecimal_version 1.1.0 %global io_console_version 0.3 -%global json_version 1.5.4 +%global json_version 1.6.6 %global minitest_version 2.8.1 %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -53,12 +59,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -# Note: -# As seen on perl srpm, as this (ruby) srpm contains several sub-components, -# we cannot reset the release number to 1 even when the main (ruby) version -# is updated - because it may be that the versions of sub-components don't -# change. -Release: 28%{?dist} +Release: %{?revision:0.}%{release}%{?revision:.r%{revision}}%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -484,8 +485,13 @@ sed -i '8 a\ %check # TODO: Investigate the test failures. -# https://bugs.ruby-lang.org/issues/6036 -make check TESTS="-v -x test_pathname.rb -x test_drbssl.rb -x test_x509cert.rb" +# OpenSSL 1.0.1 is breaking the drb test suite. +# https://bugs.ruby-lang.org/issues/6221 +# TestTimeTZ failures - Resolved by r35377. +# https://bugs.ruby-lang.org/issues/6318 +# TestWEBrickHTTPRequest and WEBrick::TestFileHandler fail +# https://bugs.ruby-lang.org/issues/6319 +make check TESTS="-v -x test_drbssl.rb -x test_time_tz.rb -x test_httprequest.rb -x test_filehandler.rb" %post libs -p /sbin/ldconfig From 4efe111a88832169e59c893d2b09e3519f58ffaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 5 Jun 2012 14:52:00 +0200 Subject: [PATCH 229/529] Upgrade to Ruby 2.0.0 (r35922). --- ruby-1.9.3-custom-rubygems-location.patch | 2 +- ruby.spec | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 1db16aa..8ea2162 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -59,7 +59,7 @@ index 6bfc73e..31dc446 100755 vendorarchlibdir = CONFIG["vendorarchdir"] +rubygemsdir = CONFIG["rubygemsdir"] mandir = CONFIG["mandir", true] - capidir = CONFIG["docdir", true] + docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) @@ -498,7 +499,15 @@ end install?(:local, :comm, :lib) do diff --git a/ruby.spec b/ruby.spec index 33f195c..cf20c6c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ # If revision is removed/commented out, the official release build is expected. # Keep the revision enabled for pre-releases from SVN. -%global revision 35368 +%global revision 35922 %global release 1 @@ -51,8 +51,8 @@ %global rdoc_version 3.9.5 %global bigdecimal_version 1.1.0 %global io_console_version 0.3 -%global json_version 1.6.6 -%global minitest_version 2.8.1 +%global json_version 1.7.1 +%global minitest_version 3.0.0 %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -579,6 +579,7 @@ make check TESTS="-v -x test_drbssl.rb -x test_time_tz.rb -x test_httprequest.rb %{ruby_libdir}/rss %{ruby_libdir}/shell %{ruby_libdir}/syck +%{ruby_libdir}/syslog %{ruby_libdir}/test %exclude %{ruby_libdir}/tk %exclude %{ruby_libdir}/tkextlib @@ -665,7 +666,6 @@ make check TESTS="-v -x test_drbssl.rb -x test_time_tz.rb -x test_httprequest.rb %{ruby_libarchdir}/fiber.so %{ruby_libarchdir}/fiddle.so %{ruby_libarchdir}/gdbm.so -%{ruby_libarchdir}/iconv.so %dir %{ruby_libarchdir}/io %{ruby_libarchdir}/io/nonblock.so %{ruby_libarchdir}/io/wait.so From dc683b73ac303765d7329cb77c9ea958420f999e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 6 Jun 2012 14:19:36 +0200 Subject: [PATCH 230/529] Patch updated to contain !! mark. Moves the RUBYGEMS_DIR macro definition into verconf.h. This change was requested by nobu at https://bugs.ruby-lang.org/issues/5617 --- ruby-1.9.3-custom-rubygems-location.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 8ea2162..24195c7 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -23,7 +23,7 @@ index b1bc951..91c5d0d 100644 + AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]), + [rubygemsdir=$withval]) +if test "$rubygemsdir" != ""; then -+ AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir") ++ AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir" !!) +fi + if test "${LOAD_RELATIVE+set}"; then From 54ae4143676223ecd28a9c563b488f3390a4d30c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Apr 2012 10:03:22 +0200 Subject: [PATCH 231/529] Remove superfluous slashes. --- ruby.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index cf20c6c..7e1fde4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -463,10 +463,10 @@ mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{mi # Adjust the gemspec files so that the gems will load properly sed -i '8 a\ - s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rake-%{rake_version}.gemspec + s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rake-%{rake_version}.gemspec sed -i '8 a\ - s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec + s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec sed -i '8 a\ s.require_paths = ["lib"]\ @@ -481,7 +481,7 @@ sed -i '8 a\ s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec sed -i '8 a\ - s.require_paths = ["lib"]' %{buildroot}/%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec + s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check # TODO: Investigate the test failures. From 95c97f6ea7dcef50ccb2be26b6dffc1ff96df14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 14 Jun 2012 14:56:26 +0200 Subject: [PATCH 232/529] Enable tests and small ARM tweaks. The most of the tests are functional now. The only exception is the one test failing on armv7. Not sure about the PPC though. --- ruby.spec | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ruby.spec b/ruby.spec index 7e1fde4..bbea036 100644 --- a/ruby.spec +++ b/ruby.spec @@ -484,14 +484,17 @@ sed -i '8 a\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check -# TODO: Investigate the test failures. -# OpenSSL 1.0.1 is breaking the drb test suite. -# https://bugs.ruby-lang.org/issues/6221 -# TestTimeTZ failures - Resolved by r35377. -# https://bugs.ruby-lang.org/issues/6318 -# TestWEBrickHTTPRequest and WEBrick::TestFileHandler fail -# https://bugs.ruby-lang.org/issues/6319 -make check TESTS="-v -x test_drbssl.rb -x test_time_tz.rb -x test_httprequest.rb -x test_filehandler.rb" +DISABLE_TESTS="" + +%ifarch armv7l armv7hl armv7hnl +# test_call_double(DL::TestDL) fails on ARM HardFP +# http://bugs.ruby-lang.org/issues/6592 +DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" +%endif + +%ifnarch ppc ppc64 +make check TESTS="-v $DISABLE_TESTS" +%endif %post libs -p /sbin/ldconfig From 6aa88d69aea017f384b3614476324aa008eb2c83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Jun 2012 16:54:05 +0200 Subject: [PATCH 233/529] Upgrade to Ruby 2.0.0 (r36169). --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index bbea036..54f5c5b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ # If revision is removed/commented out, the official release build is expected. # Keep the revision enabled for pre-releases from SVN. -%global revision 35922 +%global revision 36169 %global release 1 From 752aa5455a57c55d3a924eededb8489e1f1a4eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 25 Jun 2012 10:02:24 +0200 Subject: [PATCH 234/529] Upgrade to Ruby 2.0.0 (r36213). --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 54f5c5b..36836e2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ # If revision is removed/commented out, the official release build is expected. # Keep the revision enabled for pre-releases from SVN. -%global revision 36169 +%global revision 36213 %global release 1 From ccac016359504978a3f15cd5fb7d0ae07a53d3e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 1 Aug 2012 17:25:26 +0200 Subject: [PATCH 235/529] ruby-libs must require rubygems (rhbz#45011). --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 36836e2..fbd1ebf 100644 --- a/ruby.spec +++ b/ruby.spec @@ -54,7 +54,7 @@ %global json_version 1.7.1 %global minitest_version 3.0.0 -%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') +%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') Summary: An interpreter of object-oriented scripting language Name: ruby @@ -110,7 +110,6 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch Patch14: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Requires: ruby(rubygems) >= %{rubygems_version} # Make the bigdecimal gem a runtime dependency of Ruby to avoid problems # with user-installed gems, that don't require it in gemspec/Gemfile # See https://bugzilla.redhat.com/show_bug.cgi?id=829209 @@ -154,6 +153,7 @@ Ruby or an application embedding Ruby. Summary: Libraries necessary to run Ruby Group: Development/Libraries License: Ruby or BSD +Requires: ruby(rubygems) >= %{rubygems_version} Provides: ruby(abi) = %{ruby_abi} %description libs From a5d4d8f85d7b2c43831eaf9e530f927c54b9b056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 14 Aug 2012 12:44:33 +0200 Subject: [PATCH 236/529] Revert the dependency of ruby-libs on rubygems (rhbz#845011, rhbz#847482). --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index fbd1ebf..7dfe04f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -110,6 +110,7 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch Patch14: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Requires: ruby(rubygems) >= %{rubygems_version} # Make the bigdecimal gem a runtime dependency of Ruby to avoid problems # with user-installed gems, that don't require it in gemspec/Gemfile # See https://bugzilla.redhat.com/show_bug.cgi?id=829209 @@ -153,7 +154,6 @@ Ruby or an application embedding Ruby. Summary: Libraries necessary to run Ruby Group: Development/Libraries License: Ruby or BSD -Requires: ruby(rubygems) >= %{rubygems_version} Provides: ruby(abi) = %{ruby_abi} %description libs From 5961c79b1c8238bed45cfdc5e0d2795553be3f9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 3 Sep 2012 14:44:25 +0200 Subject: [PATCH 237/529] Upgrade to Ruby 2.0.0 (r36887). --- ...0-r36832-rb_float_value-optimization.patch | 46 +++++++++++++++++++ ruby.spec | 12 +++-- 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 ruby-2.0-r36832-rb_float_value-optimization.patch diff --git a/ruby-2.0-r36832-rb_float_value-optimization.patch b/ruby-2.0-r36832-rb_float_value-optimization.patch new file mode 100644 index 0000000..97dc58b --- /dev/null +++ b/ruby-2.0-r36832-rb_float_value-optimization.patch @@ -0,0 +1,46 @@ +From 0b89d6d5f9f8c788f4391d8a0499f10aed624371 Mon Sep 17 00:00:00 2001 +From: ko1 +Date: Mon, 27 Aug 2012 09:22:21 +0000 +Subject: [PATCH] * include/ruby/ruby.h (rb_float_value): optimize it. This + technique was pointed by shinichiro.hamaji + . + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 6 ++++++ + include/ruby/ruby.h | 10 +++++----- + 2 files changed, 11 insertions(+), 5 deletions(-) + +diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h +index 3905b32..b8b2267 100644 +--- a/include/ruby/ruby.h ++++ b/include/ruby/ruby.h +@@ -733,10 +733,7 @@ struct RFloat { + rb_float_value(VALUE v) + { + if (FLONUM_P(v)) { +- if (v == (VALUE)0x8000000000000002) { +- return 0.0; +- } +- else { ++ if (v != (VALUE)0x8000000000000002) { /* LIKELY */ + union { + double d; + VALUE v; +@@ -746,9 +743,12 @@ struct RFloat { + /* e: xx1... -> 011... */ + /* xx0... -> 100... */ + /* ^b63 */ +- t.v = RUBY_BIT_ROTR(((b63 ^ 1) << 1) | b63 | (v & ~0x03), 3); ++ t.v = RUBY_BIT_ROTR(2 - b63 | (v & ~0x03), 3); + return t.d; + } ++ else { ++ return 0.0; ++ } + } + else { + return ((struct RFloat *)v)->float_value; +-- +1.7.10 + diff --git a/ruby.spec b/ruby.spec index 7dfe04f..3e3449e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ # If revision is removed/commented out, the official release build is expected. # Keep the revision enabled for pre-releases from SVN. -%global revision 36213 +%global revision 36887 %global release 1 @@ -52,7 +52,7 @@ %global bigdecimal_version 1.1.0 %global io_console_version 0.3 %global json_version 1.7.1 -%global minitest_version 3.0.0 +%global minitest_version 3.3.0 %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -109,6 +109,10 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # TODO: Should be probably upstreamed with #5281. Patch14: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch +# This patch breaks a test suite, so revert it for now. +# https://bugs.ruby-lang.org/issues/6971 +Patch100: ruby-2.0-r36832-rb_float_value-optimization.patch + Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} # Make the bigdecimal gem a runtime dependency of Ruby to avoid problems @@ -359,6 +363,8 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. #%%patch13 -p1 %patch14 -p1 +%patch100 -p1 -R + %build autoconf @@ -581,7 +587,6 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/ripper %{ruby_libdir}/rss %{ruby_libdir}/shell -%{ruby_libdir}/syck %{ruby_libdir}/syslog %{ruby_libdir}/test %exclude %{ruby_libdir}/tk @@ -690,7 +695,6 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/socket.so %{ruby_libarchdir}/stringio.so %{ruby_libarchdir}/strscan.so -%{ruby_libarchdir}/syck.so %{ruby_libarchdir}/syslog.so %exclude %{ruby_libarchdir}/tcltklib.so %exclude %{ruby_libarchdir}/tkutil.so From 0917ed3f905a48eae51b575c2a97b6553787cc03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Sep 2012 09:28:09 +0200 Subject: [PATCH 238/529] Update TODO about rubygems-filesystem. --- ruby.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 3e3449e..e2e87e5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -41,7 +41,9 @@ # Specify custom RubyGems root. %global gem_dir %{_datadir}/gems -# TODO: Should we create arch specific rubygems-filesystem? +# TODO: These folders should go into rubygem-filesystem but how to achieve it, +# since noarch package cannot provide arch dependent subpackages? +# http://rpm.org/ticket/78 %global gem_extdir %{_exec_prefix}/lib{,64}/gems %global rake_version 0.9.2.2 From ff0af32c7d4fd3abcaefa3fedd419210b38c7bd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Sep 2012 14:20:29 +0200 Subject: [PATCH 239/529] Split documentation into -doc subpackage. --- ruby.spec | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ruby.spec b/ruby.spec index e2e87e5..946448b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -513,11 +513,6 @@ make check TESTS="-v $DISABLE_TESTS" %lang(ja) %doc COPYING.ja %doc GPL %doc LEGAL -%doc NEWS -%doc README -%lang(ja) %doc README.ja -%doc doc/ChangeLog-* -%doc doc/NEWS-* %{_bindir}/erb %{_bindir}/ruby %{_bindir}/testrb @@ -743,10 +738,12 @@ make check TESTS="-v $DISABLE_TESTS" %{_mandir}/man1/ri* %files doc +%doc NEWS %doc README %lang(ja) %doc README.ja %doc ChangeLog %doc doc/ChangeLog-* +%doc doc/NEWS-* %{_datadir}/ri %files -n rubygem-bigdecimal From 223ff9d8e4a12d1d985515d4b05f699db8afc253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 18 Oct 2012 07:28:23 +0200 Subject: [PATCH 240/529] Move NEWS to the main package. --- ruby.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 946448b..09551bd 100644 --- a/ruby.spec +++ b/ruby.spec @@ -738,12 +738,10 @@ make check TESTS="-v $DISABLE_TESTS" %{_mandir}/man1/ri* %files doc -%doc NEWS %doc README %lang(ja) %doc README.ja %doc ChangeLog %doc doc/ChangeLog-* -%doc doc/NEWS-* %{_datadir}/ri %files -n rubygem-bigdecimal From 4531f33ec9ad12808ca2e73acf80cb33c5d24c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 5 Nov 2012 16:38:52 +0100 Subject: [PATCH 241/529] Upgrade to Ruby 2.0.0 (r37421). --- ...9.3-added-site-and-vendor-arch-flags.patch | 10 ++++---- ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 10 ++++---- ruby-1.9.3-custom-rubygems-location.patch | 8 +++---- ruby-1.9.3-disable-versioned-paths.patch | 4 ++-- ruby-1.9.3-mkmf-verbose.patch | 2 +- ruby.spec | 14 +++++------ rubygems-1.8.11-binary-extensions.patch | 24 +++++++++---------- 8 files changed, 36 insertions(+), 38 deletions(-) diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index cf91b02..add7b38 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -15,7 +15,7 @@ diff --git a/Makefile.in b/Makefile.in index bcdaf5f..f57e4c4 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -37,6 +37,9 @@ datadir = @datadir@ +@@ -38,6 +38,9 @@ datadir = @datadir@ archdir = @archdir@ sitearch = @sitearch@ sitedir = @sitedir@ @@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in index 83e5d76..31532bd 100644 --- a/configure.in +++ b/configure.in -@@ -2866,6 +2866,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -3028,6 +3028,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 83e5d76..31532bd 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], -@@ -2875,19 +2884,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3037,19 +3046,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 83e5d76..31532bd 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -2905,12 +2927,26 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -3067,12 +3089,26 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -105,7 +105,7 @@ index 83e5d76..31532bd 100644 ]) pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], -@@ -2933,19 +2969,23 @@ if test "x$SITE_DIR" = xno; then +@@ -3095,19 +3131,23 @@ if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index c7e3b75..5eecdbf 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -1,6 +1,6 @@ --- a/configure.in.orig 2011-10-18 08:56:21.587594685 +0200 +++ b/configure.in 2011-10-18 08:56:59.751593321 +0200 -@@ -2990,6 +2990,8 @@ +@@ -3152,6 +3152,8 @@ configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index c5017e3..3088602 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -14,7 +14,7 @@ diff --git a/Makefile.in b/Makefile.in index bcdaf5f..d61b2ee 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -34,6 +34,7 @@ libexecdir = @libexecdir@ +@@ -35,6 +35,7 @@ libexecdir = @libexecdir@ datarootdir = @datarootdir@ datadir = @datadir@ arch = @arch@ @@ -26,7 +26,7 @@ diff --git a/configure.in b/configure.in index 83e5d76..e6dc38c 100644 --- a/configure.in +++ b/configure.in -@@ -2848,6 +2848,15 @@ else +@@ -3010,6 +3010,15 @@ else RUBY_LIB_VERSION="\"${ruby_version}\"" fi @@ -42,7 +42,7 @@ index 83e5d76..e6dc38c 100644 AC_ARG_WITH(sitedir, AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), [sitedir=$withval], -@@ -2870,16 +2879,25 @@ if test "${LOAD_RELATIVE+set}"; then +@@ -3032,16 +3041,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" @@ -68,7 +68,7 @@ index 83e5d76..e6dc38c 100644 AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -2910,6 +2928,7 @@ +@@ -3072,6 +3090,7 @@ fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !!) @@ -76,7 +76,7 @@ index 83e5d76..e6dc38c 100644 if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else -@@ -2924,6 +2943,7 @@ fi +@@ -3086,6 +3105,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 24195c7..d79d54c 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index b1bc951..91c5d0d 100644 --- a/configure.in +++ b/configure.in -@@ -2893,6 +2893,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3055,6 +3055,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDORARCH_DIR}" done @@ -29,7 +29,7 @@ index b1bc951..91c5d0d 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" -@@ -2986,6 +2993,7 @@ AC_SUBST(sitearch)dnl +@@ -3148,6 +3155,7 @@ AC_SUBST(sitearch)dnl AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorarchdir)dnl @@ -53,7 +53,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 6bfc73e..31dc446 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -311,6 +311,7 @@ sitelibdir = CONFIG["sitelibdir"] +@@ -313,6 +313,7 @@ sitelibdir = CONFIG["sitelibdir"] sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -61,7 +61,7 @@ index 6bfc73e..31dc446 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -498,7 +499,15 @@ end +@@ -500,7 +501,15 @@ end install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[README* *.txt *.rdoc] diff --git a/ruby-1.9.3-disable-versioned-paths.patch b/ruby-1.9.3-disable-versioned-paths.patch index 2b7f6fb..648f4c3 100644 --- a/ruby-1.9.3-disable-versioned-paths.patch +++ b/ruby-1.9.3-disable-versioned-paths.patch @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index e742e74..86cb68f 100644 --- a/configure.in +++ b/configure.in -@@ -3018,6 +3018,17 @@ else +@@ -3177,6 +3177,17 @@ else fi AC_SUBST(USE_RUBYGEMS) @@ -135,7 +135,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index cec8c9f..fed14d2 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -390,7 +390,7 @@ end +@@ -392,7 +392,7 @@ end install?(:doc, :rdoc) do if $rdocdir diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 69e61bd..729ee80 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -1,6 +1,6 @@ --- ruby-1.9.3-p0/lib/mkmf.rb.debug 2011-08-11 15:07:37.000000000 +0900 +++ ruby-1.9.3-p0/lib/mkmf.rb 2012-01-29 21:34:17.000000000 +0900 -@@ -1725,7 +1725,7 @@ +@@ -1746,7 +1746,7 @@ SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby.spec b/ruby.spec index 09551bd..660d59b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ # If revision is removed/commented out, the official release build is expected. # Keep the revision enabled for pre-releases from SVN. -%global revision 36887 +%global revision 37421 %global release 1 @@ -54,7 +54,7 @@ %global bigdecimal_version 1.1.0 %global io_console_version 0.3 %global json_version 1.7.1 -%global minitest_version 3.3.0 +%global minitest_version 3.4.0 %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -111,10 +111,6 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # TODO: Should be probably upstreamed with #5281. Patch14: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch -# This patch breaks a test suite, so revert it for now. -# https://bugs.ruby-lang.org/issues/6971 -Patch100: ruby-2.0-r36832-rb_float_value-optimization.patch - Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} # Make the bigdecimal gem a runtime dependency of Ruby to avoid problems @@ -339,6 +335,10 @@ output. # TODO: # %%pacakge -n rubygem-psych +# TODO: +# %%pacakge -n rubygem-test-unit + + %package tcltk Summary: Tcl/Tk interface for scripting language Ruby Group: Development/Languages @@ -365,8 +365,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. #%%patch13 -p1 %patch14 -p1 -%patch100 -p1 -R - %build autoconf diff --git a/rubygems-1.8.11-binary-extensions.patch b/rubygems-1.8.11-binary-extensions.patch index 5a3bfb4..b3a5697 100644 --- a/rubygems-1.8.11-binary-extensions.patch +++ b/rubygems-1.8.11-binary-extensions.patch @@ -11,7 +11,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 97db19e..263e7d3 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -843,6 +843,12 @@ class Gem::Specification +@@ -859,6 +859,12 @@ class Gem::Specification File.join full_gem_path, path end @@ -24,7 +24,7 @@ index 97db19e..263e7d3 100644 # gem directories must come after -I and ENV['RUBYLIB'] insert_index = Gem.load_path_insert_index -@@ -954,16 +960,16 @@ class Gem::Specification +@@ -970,16 +976,16 @@ class Gem::Specification def contains_requirable_file? file root = full_gem_path @@ -48,7 +48,7 @@ index 97db19e..263e7d3 100644 end ## -@@ -1273,6 +1279,23 @@ class Gem::Specification +@@ -1295,6 +1301,23 @@ class Gem::Specification end ## @@ -90,7 +90,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 74d803d..0063c7f 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -499,7 +499,7 @@ TEXT +@@ -509,7 +509,7 @@ TEXT def build_extensions return if spec.extensions.empty? say "Building native extensions. This could take a while..." @@ -103,7 +103,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 263e7d3..d31b93b 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -1283,16 +1283,15 @@ class Gem::Specification +@@ -1305,16 +1305,15 @@ class Gem::Specification # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 def ext_dir @@ -140,7 +140,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index d31b93b..e65ea2d 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -843,11 +843,7 @@ class Gem::Specification +@@ -859,11 +859,7 @@ class Gem::Specification File.join full_gem_path, path end @@ -153,7 +153,7 @@ index d31b93b..e65ea2d 100644 # gem directories must come after -I and ENV['RUBYLIB'] insert_index = Gem.load_path_insert_index -@@ -1291,7 +1287,10 @@ class Gem::Specification +@@ -1313,7 +1309,10 @@ class Gem::Specification # gem directory. eg: /usr/local/lib/ruby/1.8/gems def exts_dir @@ -183,7 +183,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 0063c7f..83b8fd5 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -499,7 +499,7 @@ TEXT +@@ -509,7 +509,7 @@ TEXT def build_extensions return if spec.extensions.empty? say "Building native extensions. This could take a while..." @@ -196,7 +196,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index e65ea2d..8be2ade 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -843,7 +843,7 @@ class Gem::Specification +@@ -859,7 +859,7 @@ class Gem::Specification File.join full_gem_path, path end @@ -205,7 +205,7 @@ index e65ea2d..8be2ade 100644 # gem directories must come after -I and ENV['RUBYLIB'] insert_index = Gem.load_path_insert_index -@@ -1279,7 +1279,7 @@ class Gem::Specification +@@ -1301,7 +1301,7 @@ class Gem::Specification # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 def ext_dir @@ -257,7 +257,7 @@ diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb index 20b4198..6d8711f 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb -@@ -87,6 +87,17 @@ module Gem +@@ -94,6 +94,17 @@ module Gem end ## @@ -279,7 +279,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 8be2ade..f54210a 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -1287,10 +1287,7 @@ class Gem::Specification +@@ -1309,10 +1309,7 @@ class Gem::Specification # gem directory. eg: /usr/local/lib/ruby/1.8/gems def exts_dir From 751f271fc3e2a530fb08afc5a9b9a388edc2ff03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 5 Nov 2012 16:39:11 +0100 Subject: [PATCH 242/529] Update infrastructure to allow build of versioned releases. This will allow to build releases such as preview1 or rc1. --- ruby.spec | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index 660d59b..fc4b1e5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -7,17 +7,28 @@ %global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_version_patch_level %{major_minor_version}.%{teeny_version}.%{patch_level} -# Keep the ruby abi 1.9.1 for compatibility with gems. -# %global ruby_abi %{major_minor_version}.0 +# Ruby 2.0 keeps the abi Ruby 1.9.1 compatible. +# %%global ruby_abi %%{major_minor_version}.0 %global ruby_abi 1.9.1 -# If revision is removed/commented out, the official release build is expected. +# Specify the named version. It has precedense to revision. +#%%global milestone preview1 + # Keep the revision enabled for pre-releases from SVN. %global revision 37421 -%global release 1 +%global ruby_archive %{name}-%{ruby_version} -%global ruby_archive %{name}-%{ruby_version}-%{?revision:r%{revision}}%{!?revision:p%{patch_level}} +# If revision and milestone are removed/commented out, the official release build is expected. +%if 0%{?milestone:1}%{?revision:1} != 0 +%global development_release %{?milestone}%{?!milestone:%{?revision:r%{revision}}} +%global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision:r%{revision}}} +%else +%global ruby_archive %{ruby_archive}-p%{patch_level} +%endif + + +%global release 1 %global ruby_libdir %{_datadir}/%{name} %global ruby_libarchdir %{_libdir}/%{name} @@ -61,7 +72,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -Release: %{?revision:0.}%{release}%{?revision:.r%{revision}}%{?dist} +Release: %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain From ed30ceed59040494c3378c150c369eec51093ed8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 6 Nov 2012 13:22:34 +0100 Subject: [PATCH 243/529] Remove useless dot from Summary. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index fc4b1e5..34d8903 100644 --- a/ruby.spec +++ b/ruby.spec @@ -319,7 +319,7 @@ markup language. %package -n rubygem-minitest -Summary: Minitest provides a complete suite of testing facilities. +Summary: Minitest provides a complete suite of testing facilities Version: %{minitest_version} Group: Development/Libraries License: MIT From dd816cc3e3020d956d54f858ce5214337e467620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 6 Nov 2012 13:25:16 +0100 Subject: [PATCH 244/529] Split Psych into rubygem-psych subpackage. --- ruby.spec | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 34d8903..c0d977c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -66,6 +66,7 @@ %global io_console_version 0.3 %global json_version 1.7.1 %global minitest_version 3.4.0 +%global psych_version 1.3.4 %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -343,8 +344,20 @@ minitest/pride shows pride in testing and adds coloring to your test output. -# TODO: -# %%pacakge -n rubygem-psych +%package -n rubygem-psych +Summary: A libyaml wrapper for Ruby +Version: %{psych_version} +Group: Development/Libraries +License: MIT +Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(psych) = %{version}-%{release} + +%description -n rubygem-psych +Psych is a YAML parser and emitter. Psych leverages +libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting +capabilities. In addition to wrapping libyaml, Psych also knows how to +serialize and de-serialize most Ruby objects to and from the YAML format. # TODO: # %%pacakge -n rubygem-test-unit @@ -478,6 +491,11 @@ mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/exts/json-%{ mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib +mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/exts/psych-%{psych_version}/lib +mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib +mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/exts/psych-%{psych_version}/lib/ + # Adjust the gemspec files so that the gems will load properly sed -i '8 a\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rake-%{rake_version}.gemspec @@ -585,7 +603,6 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/net %{ruby_libdir}/openssl %{ruby_libdir}/optparse -%{ruby_libdir}/psych %{ruby_libdir}/racc %{ruby_libdir}/rbconfig %{ruby_libdir}/rexml @@ -690,7 +707,6 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/objspace.so %{ruby_libarchdir}/openssl.so %{ruby_libarchdir}/pathname.so -%{ruby_libarchdir}/psych.so %{ruby_libarchdir}/pty.so %dir %{ruby_libarchdir}/racc %{ruby_libarchdir}/racc/cparse.so @@ -715,6 +731,7 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{_exec_prefix}/lib*/gems/exts/bigdecimal-%{bigdecimal_version} %exclude %{_exec_prefix}/lib*/gems/exts/io-console-%{io_console_version} %exclude %{_exec_prefix}/lib*/gems/exts/json-%{json_version} +%exclude %{_exec_prefix}/lib*/gems/exts/psych-%{psych_version} %exclude %{gem_dir}/gems/rake-%{rake_version} %exclude %{gem_dir}/gems/rdoc-%{rdoc_version} %exclude %{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec @@ -723,6 +740,7 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %exclude %{gem_dir}/specifications/rake-%{rake_version}.gemspec %exclude %{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec +%exclude %{gem_dir}/specifications/psych-%{psych_version}.gemspec %files -n rubygems-devel %config(noreplace) %{_sysconfdir}/rpm/macros.rubygems @@ -776,6 +794,11 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/gems/minitest-%{minitest_version} %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec +%files -n rubygem-psych +%{_libdir}/gems/exts/psych-%{psych_version} +%{gem_dir}/gems/psych-%{psych_version} +%{gem_dir}/specifications/psych-%{psych_version}.gemspec + %files tcltk %{ruby_libdir}/*-tk.rb %{ruby_libdir}/tcltk.rb From 3a63053e857ea1cffe0bbbc12ffbadbc9f4561db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 7 Nov 2012 10:17:44 +0100 Subject: [PATCH 245/529] RubyGems needs psych for proper functionality. It is not 100% clear, if RubyGems are the best place to require psych, but lets see how it will work. In the future, it might get moved into ruby-libs if needed, but it doesn't look like it should be there ATM, since it would be unnecessary payload. --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index c0d977c..55e203c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -182,6 +182,7 @@ License: Ruby or MIT Requires: ruby(abi) = %{ruby_abi} Requires: rubygem(rdoc) >= %{rdoc_version} Requires: rubygem(io-console) >= %{io_console_version} +Requires: rubygem(psych) >= %{psych_version} Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} BuildArch: noarch From 4fa6c0a0f26194c2e1e62229714d7b4f73bdd383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 16 Nov 2012 11:54:32 +0100 Subject: [PATCH 246/529] Upgrade to Ruby 2.0.0 (r37589). --- ruby-1.9.3-added-site-and-vendor-arch-flags.patch | 8 ++++---- ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 8 ++++---- ruby-1.9.3-custom-rubygems-location.patch | 4 ++-- ruby-1.9.3-disable-versioned-paths.patch | 2 +- ruby.spec | 6 ++++-- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index add7b38..cbed3a6 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in index 83e5d76..31532bd 100644 --- a/configure.in +++ b/configure.in -@@ -3028,6 +3028,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -3029,6 +3029,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 83e5d76..31532bd 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], -@@ -3037,19 +3046,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3038,19 +3047,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 83e5d76..31532bd 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -3067,12 +3089,26 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -3068,12 +3090,26 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -105,7 +105,7 @@ index 83e5d76..31532bd 100644 ]) pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], -@@ -3095,19 +3131,23 @@ if test "x$SITE_DIR" = xno; then +@@ -3096,19 +3132,23 @@ if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index 5eecdbf..2c9ca1e 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -1,6 +1,6 @@ --- a/configure.in.orig 2011-10-18 08:56:21.587594685 +0200 +++ b/configure.in 2011-10-18 08:56:59.751593321 +0200 -@@ -3152,6 +3152,8 @@ +@@ -3153,6 +3153,8 @@ configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index 3088602..ab18fdd 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -26,7 +26,7 @@ diff --git a/configure.in b/configure.in index 83e5d76..e6dc38c 100644 --- a/configure.in +++ b/configure.in -@@ -3010,6 +3010,15 @@ else +@@ -3011,6 +3011,15 @@ else RUBY_LIB_VERSION="\"${ruby_version}\"" fi @@ -42,7 +42,7 @@ index 83e5d76..e6dc38c 100644 AC_ARG_WITH(sitedir, AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), [sitedir=$withval], -@@ -3032,16 +3041,25 @@ if test "${LOAD_RELATIVE+set}"; then +@@ -3033,16 +3042,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" @@ -68,7 +68,7 @@ index 83e5d76..e6dc38c 100644 AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -3072,6 +3090,7 @@ +@@ -3073,6 +3091,7 @@ fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !!) @@ -76,7 +76,7 @@ index 83e5d76..e6dc38c 100644 if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else -@@ -3086,6 +3105,7 @@ fi +@@ -3087,6 +3106,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index d79d54c..c13ca34 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index b1bc951..91c5d0d 100644 --- a/configure.in +++ b/configure.in -@@ -3055,6 +3055,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3056,6 +3056,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDORARCH_DIR}" done @@ -29,7 +29,7 @@ index b1bc951..91c5d0d 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" -@@ -3148,6 +3155,7 @@ AC_SUBST(sitearch)dnl +@@ -3149,6 +3156,7 @@ AC_SUBST(sitearch)dnl AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-1.9.3-disable-versioned-paths.patch b/ruby-1.9.3-disable-versioned-paths.patch index 648f4c3..b8ac37a 100644 --- a/ruby-1.9.3-disable-versioned-paths.patch +++ b/ruby-1.9.3-disable-versioned-paths.patch @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index e742e74..86cb68f 100644 --- a/configure.in +++ b/configure.in -@@ -3177,6 +3177,17 @@ else +@@ -3178,6 +3178,17 @@ else fi AC_SUBST(USE_RUBYGEMS) diff --git a/ruby.spec b/ruby.spec index 55e203c..36870be 100644 --- a/ruby.spec +++ b/ruby.spec @@ -15,7 +15,7 @@ #%%global milestone preview1 # Keep the revision enabled for pre-releases from SVN. -%global revision 37421 +%global revision 37589 %global ruby_archive %{name}-%{ruby_version} @@ -520,7 +520,9 @@ sed -i '8 a\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check -DISABLE_TESTS="" +# http://bugs.ruby-lang.org/issues/7298 +# http://bugs.ruby-lang.org/issues/7312 +DISABLE_TESTS="-x test_enumerator.rb -x test_m17n_comb.rb" %ifarch armv7l armv7hl armv7hnl # test_call_double(DL::TestDL) fails on ARM HardFP From 43f936f6e36384d676cb6a2117c4da38e8db3ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 19 Nov 2012 12:49:46 +0100 Subject: [PATCH 247/529] Add references to upstream commits of RubyGems's uninstaller patch. --- ruby.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruby.spec b/ruby.spec index 36870be..6c86559 100644 --- a/ruby.spec +++ b/ruby.spec @@ -94,6 +94,8 @@ Patch3: ruby-1.9.3-always-use-i386.patch Patch4: ruby-1.9.3-fix-s390x-build.patch # Fix the uninstaller, so that it doesn't say that gem doesn't exist # when it exists outside of the GEM_HOME (already fixed in the upstream) +# This consist of several RubyGems upstream patches: +# 2786a40b, 8e2a9889, 1755effe, 70963846, 21c78318, 88e1e1cc, 415c0ec4 Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 From 6193662f24965829180131c4a95ed572c033485c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 19 Nov 2012 14:32:58 +0100 Subject: [PATCH 248/529] Rebase patches. --- ...9.3-added-site-and-vendor-arch-flags.patch | 41 +++++----- ruby-1.9.3-arch-specific-dir.patch | 34 ++++---- ruby-1.9.3-disable-versioned-paths.patch | 82 +++++++++---------- 3 files changed, 79 insertions(+), 78 deletions(-) diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index cbed3a6..d7601c6 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -1,21 +1,21 @@ -From b0a875862d14244ca41cd1e1e9090f87757aaeb9 Mon Sep 17 00:00:00 2001 +From be687364922657501e861e9f53f8ec647a73fe00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 5 Sep 2011 13:10:47 +0200 Subject: [PATCH] Added configuration flags for site and vendor architecture specific directories. --- - Makefile.in | 3 +++ - configure.in | 40 ++++++++++++++++++++++++++++++++++++++++ - tool/mkconfig.rb | 8 ++++++-- - version.c | 4 ++++ + Makefile.in | 3 +++ + configure.in | 40 ++++++++++++++++++++++++++++++++++++++++ + tool/mkconfig.rb | 8 ++++++-- + version.c | 4 ++++ 4 files changed, 53 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in -index bcdaf5f..f57e4c4 100644 +index 690ff8e..8c7dd98 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -38,6 +38,9 @@ datadir = @datadir@ +@@ -39,6 +39,9 @@ arch = @arch@ archdir = @archdir@ sitearch = @sitearch@ sitedir = @sitedir@ @@ -26,10 +26,10 @@ index bcdaf5f..f57e4c4 100644 TESTUI = console diff --git a/configure.in b/configure.in -index 83e5d76..31532bd 100644 +index 8e4aaec..c65e0c7 100644 --- a/configure.in +++ b/configure.in -@@ -3029,6 +3029,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -3169,6 +3169,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 83e5d76..31532bd 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], -@@ -3038,19 +3047,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3178,19 +3187,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 83e5d76..31532bd 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -3068,12 +3090,26 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -3208,6 +3230,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -92,20 +92,21 @@ index 83e5d76..31532bd 100644 AS_CASE(["$RUBY_VENDOR_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' - ], +@@ -3215,6 +3244,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], [ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" -+ ]) + ]) +AS_CASE(["$RUBY_VENDOR_ARCHLIB_PATH"], + ["$RUBY_LIB_PREFIX/"*], [ + RUBY_VENDOR_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_ARCHLIB_PATH\" : \"$pat\"`"'"' + ], + [ + RUBY_VENDOR_ARCHLIB_PATH="\"${RUBY_VENDOR_ARCHLIB_PATH}\"" - ]) ++ ]) pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], -@@ -3096,19 +3132,23 @@ if test "x$SITE_DIR" = xno; then + ["$RUBY_EXEC_PREFIX/"*], [ +@@ -3236,11 +3272,13 @@ if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) @@ -119,7 +120,7 @@ index 83e5d76..31532bd 100644 fi AC_SUBST(arch)dnl - AC_SUBST(sitearch)dnl +@@ -3248,7 +3286,9 @@ AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl AC_SUBST(archdir)dnl AC_SUBST(sitedir)dnl @@ -130,10 +131,10 @@ index 83e5d76..31532bd 100644 configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb -index b707c4b..6230720 100755 +index 03c3332..79b8e44 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb -@@ -44,6 +44,8 @@ v_others = [] +@@ -44,6 +44,8 @@ continued_name = nil continued_line = nil path_version = "/$(ruby_version)" archdir_override = "$(vendorlibdir)/$(sitearch)" @@ -166,7 +167,7 @@ index b707c4b..6230720 100755 print < Date: Thu, 8 Sep 2011 15:30:05 +0200 Subject: [PATCH] Add configuration arch specific dir flag. --- - Makefile.in | 1 + - configure.in | 20 ++++++++++++++++++++ - tool/mkconfig.rb | 4 +++- - version.c | 2 ++ - 4 files changed, 26 insertions(+), 1 deletions(-) + Makefile.in | 1 + + configure.in | 20 ++++++++++++++++++++ + tool/mkconfig.rb | 4 +++- + version.c | 2 ++ + 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in -index bcdaf5f..d61b2ee 100644 +index 78d7139..690ff8e 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -35,6 +35,7 @@ libexecdir = @libexecdir@ +@@ -36,6 +36,7 @@ libexecdir = @libexecdir@ datarootdir = @datarootdir@ datadir = @datadir@ arch = @arch@ @@ -23,10 +23,10 @@ index bcdaf5f..d61b2ee 100644 sitedir = @sitedir@ ruby_version = @ruby_version@ diff --git a/configure.in b/configure.in -index 83e5d76..e6dc38c 100644 +index db3641b..8e4aaec 100644 --- a/configure.in +++ b/configure.in -@@ -3011,6 +3011,15 @@ else +@@ -3151,6 +3151,15 @@ else RUBY_LIB_VERSION="\"${ruby_version}\"" fi @@ -42,7 +42,7 @@ index 83e5d76..e6dc38c 100644 AC_ARG_WITH(sitedir, AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), [sitedir=$withval], -@@ -3033,16 +3042,25 @@ if test "${LOAD_RELATIVE+set}"; then +@@ -3173,16 +3182,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" @@ -68,7 +68,7 @@ index 83e5d76..e6dc38c 100644 AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -3073,6 +3091,7 @@ +@@ -3213,6 +3231,7 @@ else fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !!) @@ -76,7 +76,7 @@ index 83e5d76..e6dc38c 100644 if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else -@@ -3087,6 +3106,7 @@ fi +@@ -3227,6 +3246,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -85,10 +85,10 @@ index 83e5d76..e6dc38c 100644 AC_SUBST(vendordir)dnl diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb -index b707c4b..9780ef2 100755 +index d9e26c1..03c3332 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb -@@ -43,6 +43,7 @@ v_others = [] +@@ -43,6 +43,7 @@ vars = {} continued_name = nil continued_line = nil path_version = "/$(ruby_version)" @@ -114,7 +114,7 @@ index b707c4b..9780ef2 100755 print < Date: Thu, 25 Aug 2011 14:33:51 +0200 Subject: [PATCH] Allow to disable versioned paths. --- - configure.in | 11 +++++++++++ - tool/mkconfig.rb | 9 ++++++--- - version.c | 10 ++++++++++ - 3 files changed, 27 insertions(+), 3 deletions(-) + configure.in | 11 +++++++++++ + lib/rdoc/ri/paths.rb | 4 ++-- + tool/mkconfig.rb | 9 ++++++--- + tool/rbinstall.rb | 2 +- + version.c | 10 ++++++++++ + 5 files changed, 30 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in -index e742e74..86cb68f 100644 +index f2d22ef..db3641b 100644 --- a/configure.in +++ b/configure.in -@@ -3178,6 +3178,17 @@ else +@@ -3318,6 +3318,17 @@ else fi AC_SUBST(USE_RUBYGEMS) @@ -31,8 +33,24 @@ index e742e74..86cb68f 100644 arch_hdrdir="${EXTOUT}/include/${arch}/ruby" AS_MKDIR_P("${arch_hdrdir}") config_h="${arch_hdrdir}/config.h" +diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb +index a3c65bf..a4e8559 100644 +--- a/lib/rdoc/ri/paths.rb ++++ b/lib/rdoc/ri/paths.rb +@@ -11,9 +11,9 @@ module RDoc::RI::Paths + version = RbConfig::CONFIG['ruby_version'] + + base = if RbConfig::CONFIG.key? 'ridir' then +- File.join RbConfig::CONFIG['ridir'], version ++ File.join [RbConfig::CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact + else +- File.join RbConfig::CONFIG['datadir'], 'ri', version ++ File.join [RbConfig::CONFIG['datadir'], 'ri', RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact + end + + SYSDIR = File.join base, "system" diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb -index a2221f0..47d8c8f 100755 +index f9d97d3..d9e26c1 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -42,6 +42,7 @@ v_others = [] @@ -71,8 +89,21 @@ index a2221f0..47d8c8f 100755 CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)" EOS print < $data_mode) + end diff --git a/version.c b/version.c -index 59d4e5e..641dc33 100644 +index 26e275a..05e5069 100644 --- a/version.c +++ b/version.c @@ -39,9 +39,15 @@ @@ -114,36 +145,5 @@ index 59d4e5e..641dc33 100644 RUBY_LIB "\0" #ifdef RUBY_THIN_ARCHLIB -- -1.7.7.3 -diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb -index a3c65bf..0575730 100644 ---- a/lib/rdoc/ri/paths.rb -+++ b/lib/rdoc/ri/paths.rb -@@ -11,9 +11,9 @@ module RDoc::RI::Paths - version = RbConfig::CONFIG['ruby_version'] - - base = if RbConfig::CONFIG.key? 'ridir' then -- File.join RbConfig::CONFIG['ridir'], version -+ File.join [RbConfig::CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact - else -- File.join RbConfig::CONFIG['datadir'], 'ri', version -+ File.join [RbConfig::CONFIG['datadir'], 'ri', RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact - end - - SYSDIR = File.join base, "system" -diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index cec8c9f..fed14d2 100755 ---- a/tool/rbinstall.rb -+++ b/tool/rbinstall.rb -@@ -392,7 +392,7 @@ end - - install?(:doc, :rdoc) do - if $rdocdir -- ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system") -+ ridatadir = File.join([CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil, "system"].compact) - prepare "rdoc", ridatadir - install_recursive($rdocdir, ridatadir, :mode => $data_mode) - end --- -1.7.6 +1.8.0 From b3f2794361604a40361086c6bee439fbc0fc818d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 19 Nov 2012 14:38:30 +0100 Subject: [PATCH 249/529] Convert to git formated patch. --- ruby-1.9.3-always-use-i386.patch | 20 +++++++++-- ruby-1.9.3-custom-rubygems-location.patch | 28 ++++++++-------- ruby-1.9.3-fix-s390x-build.patch | 19 +++++++++-- ruby-1.9.3-mkmf-verbose.patch | 20 +++++++++-- ruby-1.9.3-rubygems-1.8.11-uninstaller.patch | 35 +++++++++++++++----- 5 files changed, 90 insertions(+), 32 deletions(-) diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index 2c9ca1e..d2c1bc0 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -1,6 +1,17 @@ ---- a/configure.in.orig 2011-10-18 08:56:21.587594685 +0200 -+++ b/configure.in 2011-10-18 08:56:59.751593321 +0200 -@@ -3153,6 +3153,8 @@ +From 1f061d350d01fc55272872d6f7932986dba4011d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 19 Nov 2012 14:37:28 +0100 +Subject: [PATCH] Always use i386. + +--- + configure.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.in b/configure.in +index c65e0c7..748edc9 100644 +--- a/configure.in ++++ b/configure.in +@@ -3293,6 +3293,8 @@ AC_SUBST(vendorarchdir)dnl configure_args=$ac_configure_args AC_SUBST(configure_args)dnl @@ -9,3 +20,6 @@ if test "${universal_binary-no}" = yes ; then arch="universal-${target_os}" AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available, +-- +1.8.0 + diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index c13ca34..3f13e59 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -1,21 +1,21 @@ -From 279a693ce4ef3a887ce8d4fa59e0f2616a14d91a Mon Sep 17 00:00:00 2001 +From 643a3d3af2a3847e730c79515bc586768053119a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 11 Nov 2011 13:14:45 +0100 Subject: [PATCH] Allow to install RubyGems into custom location, outside of Ruby tree. --- - configure.in | 8 ++++++++ - tool/mkconfig.rb | 1 + - tool/rbinstall.rb | 9 +++++++++ - version.c | 4 ++++ - 4 files changed, 22 insertions(+), 0 deletions(-) + configure.in | 8 ++++++++ + tool/mkconfig.rb | 1 + + tool/rbinstall.rb | 9 +++++++++ + version.c | 4 ++++ + 4 files changed, 22 insertions(+) diff --git a/configure.in b/configure.in -index b1bc951..91c5d0d 100644 +index 748edc9..6a16745 100644 --- a/configure.in +++ b/configure.in -@@ -3056,6 +3056,13 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3196,6 +3196,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D dir="${VENDORARCH_DIR}" done @@ -29,7 +29,7 @@ index b1bc951..91c5d0d 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" -@@ -3149,6 +3156,7 @@ AC_SUBST(sitearch)dnl +@@ -3289,6 +3296,7 @@ AC_SUBST(sitedir)dnl AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorarchdir)dnl @@ -38,7 +38,7 @@ index b1bc951..91c5d0d 100644 configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb -index b707c4b..9fecbfb 100755 +index 79b8e44..9cef0c6 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb @@ -84,6 +84,7 @@ File.foreach "config.status" do |line| @@ -50,7 +50,7 @@ index b707c4b..9fecbfb 100755 case val when /^\$\(ac_\w+\)$/; next diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index 6bfc73e..31dc446 100755 +index 17294a2..2757a73 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -313,6 +313,7 @@ sitelibdir = CONFIG["sitelibdir"] @@ -64,7 +64,7 @@ index 6bfc73e..31dc446 100755 @@ -500,7 +501,15 @@ end install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir - noinst = %w[README* *.txt *.rdoc] + noinst = %w[README* *.txt *.rdoc *.gemspec] + noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode) + if rubygemsdir @@ -78,7 +78,7 @@ index 6bfc73e..31dc446 100755 install?(:local, :arch, :lib) do diff --git a/version.c b/version.c -index 59d4e5e..12ba7e9 100644 +index 962f39f..979701d 100644 --- a/version.c +++ b/version.c @@ -104,6 +104,10 @@ const char ruby_initial_load_paths[] = @@ -93,5 +93,5 @@ index 59d4e5e..12ba7e9 100644 #ifdef RUBY_THIN_ARCHLIB RUBY_THIN_ARCHLIB "\0" -- -1.7.7 +1.8.0 diff --git a/ruby-1.9.3-fix-s390x-build.patch b/ruby-1.9.3-fix-s390x-build.patch index d0ade91..5f91aae 100644 --- a/ruby-1.9.3-fix-s390x-build.patch +++ b/ruby-1.9.3-fix-s390x-build.patch @@ -1,6 +1,16 @@ -diff -up ruby-1.9.3-p0/ext/tk/extconf.rb.orig ruby-1.9.3-p0/ext/tk/extconf.rb ---- ruby-1.9.3-p0/ext/tk/extconf.rb.orig 2011-06-29 16:11:19.000000000 +0200 -+++ ruby-1.9.3-p0/ext/tk/extconf.rb 2011-10-18 16:15:59.406299659 +0200 +From d710179fcc088a201339a28fa6a5779da8e6ab62 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 19 Nov 2012 14:39:19 +0100 +Subject: [PATCH] Fix s390x build. + +--- + ext/tk/extconf.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb +index 72dd6cf..5c6081e 100644 +--- a/ext/tk/extconf.rb ++++ b/ext/tk/extconf.rb @@ -114,7 +114,7 @@ def is_macosx? end @@ -10,3 +20,6 @@ diff -up ruby-1.9.3-p0/ext/tk/extconf.rb.orig ruby-1.9.3-p0/ext/tk/extconf.rb end def check_tcltk_version(version) +-- +1.8.0 + diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 729ee80..77be75a 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -1,6 +1,17 @@ ---- ruby-1.9.3-p0/lib/mkmf.rb.debug 2011-08-11 15:07:37.000000000 +0900 -+++ ruby-1.9.3-p0/lib/mkmf.rb 2012-01-29 21:34:17.000000000 +0900 -@@ -1746,7 +1746,7 @@ +From b6f6f0b8cd750e97c15f1b739b1c95d6c1989294 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 19 Nov 2012 15:14:51 +0100 +Subject: [PATCH] Verbose mkmf. + +--- + lib/mkmf.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/mkmf.rb b/lib/mkmf.rb +index ded4e89..0870f22 100644 +--- a/lib/mkmf.rb ++++ b/lib/mkmf.rb +@@ -1746,7 +1746,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. @@ -9,3 +20,6 @@ Q1 = $(V:1=) Q = $(Q1:0=@) ECHO1 = $(V:1=@#{CONFIG['NULLCMD']}) +-- +1.8.0 + diff --git a/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch b/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch index af1cff2..f8eb63d 100644 --- a/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch +++ b/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch @@ -1,6 +1,18 @@ ---- ruby-1.9.3-p0/lib/rubygems/uninstaller.rb.orig 2011-10-31 10:22:36.321579483 +0100 -+++ ruby-1.9.3-p0/lib/rubygems/uninstaller.rb 2011-10-31 10:34:25.563626119 +0100 -@@ -51,15 +51,14 @@ +From 6a07398a3aac0793d1a62f6f4778d90baf86ab7e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 19 Nov 2012 14:41:06 +0100 +Subject: [PATCH] RubyGems uninstaller upstream fixes. + +--- + lib/rubygems/uninstaller.rb | 35 +++++++++++++++++++++++------------ + test/rubygems/test_gem_uninstaller.rb | 2 +- + 2 files changed, 24 insertions(+), 13 deletions(-) + +diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb +index cc32ea4..c0e8b4b 100644 +--- a/lib/rubygems/uninstaller.rb ++++ b/lib/rubygems/uninstaller.rb +@@ -51,15 +51,14 @@ class Gem::Uninstaller @bin_dir = options[:bin_dir] @format_executable = options[:format_executable] @@ -21,7 +33,7 @@ end ## -@@ -69,10 +68,24 @@ +@@ -69,10 +68,24 @@ class Gem::Uninstaller def uninstall list = Gem::Specification.find_all_by_name(@gem, @version) @@ -48,7 +60,7 @@ remove_all list elsif list.size > 1 then -@@ -250,12 +263,10 @@ +@@ -250,12 +263,10 @@ class Gem::Uninstaller msg << "\t#{spec.full_name}" spec.dependent_gems.each do |dep_spec, dep, satlist| @@ -63,10 +75,11 @@ msg << 'Continue with Uninstall?' return ask_yes_no(msg.join("\n"), true) end - ---- ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb.orig 2011-11-03 08:58:31.411272176 +0100 -+++ ruby-1.9.3-p0/test/rubygems/test_gem_uninstaller.rb 2011-11-03 08:58:43.010272351 +0100 -@@ -225,7 +225,7 @@ +diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb +index a65b992..1cd186f 100644 +--- a/test/rubygems/test_gem_uninstaller.rb ++++ b/test/rubygems/test_gem_uninstaller.rb +@@ -225,7 +225,7 @@ class TestGemUninstaller < Gem::InstallerTestCase uninstaller = Gem::Uninstaller.new('a') @@ -74,3 +87,7 @@ + use_ui Gem::MockGemUi.new("2\ny\n") do uninstaller.uninstall end + +-- +1.8.0 + From dc03cfc635ae1cbc6fc5e8b3cb131c17f5ce0814 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 20 Nov 2012 17:22:00 +0100 Subject: [PATCH 250/529] Upgrade to Ruby 2.0.0 (r37773). --- ruby-1.9.3-added-site-and-vendor-arch-flags.patch | 12 ++++++------ ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 8 ++++---- ruby-1.9.3-custom-rubygems-location.patch | 4 ++-- ruby-1.9.3-disable-versioned-paths.patch | 2 +- ruby.spec | 9 ++++----- 6 files changed, 18 insertions(+), 19 deletions(-) diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index d7601c6..d595118 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in index 8e4aaec..c65e0c7 100644 --- a/configure.in +++ b/configure.in -@@ -3169,6 +3169,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -3153,6 +3153,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 8e4aaec..c65e0c7 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], -@@ -3178,19 +3187,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3162,19 +3171,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 8e4aaec..c65e0c7 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -3208,6 +3230,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -3192,6 +3214,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -92,7 +92,7 @@ index 8e4aaec..c65e0c7 100644 AS_CASE(["$RUBY_VENDOR_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' -@@ -3215,6 +3244,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], +@@ -3199,6 +3228,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], [ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" ]) @@ -106,7 +106,7 @@ index 8e4aaec..c65e0c7 100644 pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], ["$RUBY_EXEC_PREFIX/"*], [ -@@ -3236,11 +3272,13 @@ if test "x$SITE_DIR" = xno; then +@@ -3220,11 +3256,13 @@ if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) @@ -120,7 +120,7 @@ index 8e4aaec..c65e0c7 100644 fi AC_SUBST(arch)dnl -@@ -3248,7 +3286,9 @@ AC_SUBST(sitearch)dnl +@@ -3232,7 +3270,9 @@ AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl AC_SUBST(archdir)dnl AC_SUBST(sitedir)dnl diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index d2c1bc0..00165dc 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index c65e0c7..748edc9 100644 --- a/configure.in +++ b/configure.in -@@ -3293,6 +3293,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3277,6 +3277,8 @@ AC_SUBST(vendorarchdir)dnl configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index f96dff8..eb57196 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -26,7 +26,7 @@ diff --git a/configure.in b/configure.in index db3641b..8e4aaec 100644 --- a/configure.in +++ b/configure.in -@@ -3151,6 +3151,15 @@ else +@@ -3135,6 +3135,15 @@ else RUBY_LIB_VERSION="\"${ruby_version}\"" fi @@ -42,7 +42,7 @@ index db3641b..8e4aaec 100644 AC_ARG_WITH(sitedir, AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), [sitedir=$withval], -@@ -3173,16 +3182,25 @@ if test "${LOAD_RELATIVE+set}"; then +@@ -3157,16 +3166,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" @@ -68,7 +68,7 @@ index db3641b..8e4aaec 100644 AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -3213,6 +3231,7 @@ else +@@ -3197,6 +3215,7 @@ else fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !!) @@ -76,7 +76,7 @@ index db3641b..8e4aaec 100644 if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else -@@ -3227,6 +3246,7 @@ fi +@@ -3211,6 +3230,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 3f13e59..47cd946 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 748edc9..6a16745 100644 --- a/configure.in +++ b/configure.in -@@ -3196,6 +3196,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D +@@ -3180,6 +3180,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D dir="${VENDORARCH_DIR}" done @@ -29,7 +29,7 @@ index 748edc9..6a16745 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" -@@ -3289,6 +3296,7 @@ AC_SUBST(sitedir)dnl +@@ -3273,6 +3280,7 @@ AC_SUBST(sitedir)dnl AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-1.9.3-disable-versioned-paths.patch b/ruby-1.9.3-disable-versioned-paths.patch index 77cfd32..be671a9 100644 --- a/ruby-1.9.3-disable-versioned-paths.patch +++ b/ruby-1.9.3-disable-versioned-paths.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index f2d22ef..db3641b 100644 --- a/configure.in +++ b/configure.in -@@ -3318,6 +3318,17 @@ else +@@ -3302,6 +3302,17 @@ else fi AC_SUBST(USE_RUBYGEMS) diff --git a/ruby.spec b/ruby.spec index 6c86559..ed6896a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -15,7 +15,7 @@ #%%global milestone preview1 # Keep the revision enabled for pre-releases from SVN. -%global revision 37589 +%global revision 37773 %global ruby_archive %{name}-%{ruby_version} @@ -57,7 +57,7 @@ # http://rpm.org/ticket/78 %global gem_extdir %{_exec_prefix}/lib{,64}/gems -%global rake_version 0.9.2.2 +%global rake_version 0.9.4 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} @@ -522,9 +522,8 @@ sed -i '8 a\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check -# http://bugs.ruby-lang.org/issues/7298 -# http://bugs.ruby-lang.org/issues/7312 -DISABLE_TESTS="-x test_enumerator.rb -x test_m17n_comb.rb" +# https://bugs.ruby-lang.org/issues/7386 +DISABLE_TESTS="-x test_rake_functional.rb" %ifarch armv7l armv7hl armv7hnl # test_call_double(DL::TestDL) fails on ARM HardFP From dcfbb7a72eee825efd841e3b8f2b26574a08d399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 22 Nov 2012 16:02:09 +0100 Subject: [PATCH 251/529] Update to Ruby 2.0.0 (r37807). --- ruby.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index ed6896a..75059e2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -15,7 +15,7 @@ #%%global milestone preview1 # Keep the revision enabled for pre-releases from SVN. -%global revision 37773 +%global revision 37807 %global ruby_archive %{name}-%{ruby_version} @@ -523,7 +523,8 @@ sed -i '8 a\ %check # https://bugs.ruby-lang.org/issues/7386 -DISABLE_TESTS="-x test_rake_functional.rb" +# http://bugs.ruby-lang.org/issues/7422 +DISABLE_TESTS="-x test_rake_functional.rb -x test_rubyoptions.rb" %ifarch armv7l armv7hl armv7hnl # test_call_double(DL::TestDL) fails on ARM HardFP From 3fa802844a2b4a483da1d122183873793bea43da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 4 Dec 2012 12:51:34 +0100 Subject: [PATCH 252/529] Upgrade to Ruby 2.0.0 (r38184). --- ...9.3-added-site-and-vendor-arch-flags.patch | 12 +- ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 8 +- ruby-1.9.3-custom-rubygems-location.patch | 4 +- ruby-1.9.3-disable-versioned-paths.patch | 8 +- ruby-1.9.3-mkmf-verbose.patch | 2 +- ruby-1.9.3-rubygems-1.8.11-uninstaller.patch | 93 ---------------- ruby.spec | 25 +++-- rubygems-1.8.11-binary-extensions.patch | 103 +++++++++--------- 9 files changed, 80 insertions(+), 177 deletions(-) delete mode 100644 ruby-1.9.3-rubygems-1.8.11-uninstaller.patch diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index d595118..5f72381 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in index 8e4aaec..c65e0c7 100644 --- a/configure.in +++ b/configure.in -@@ -3153,6 +3153,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -3170,6 +3170,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 8e4aaec..c65e0c7 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], -@@ -3162,19 +3171,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3179,19 +3188,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 8e4aaec..c65e0c7 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -3192,6 +3214,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -3209,6 +3231,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -92,7 +92,7 @@ index 8e4aaec..c65e0c7 100644 AS_CASE(["$RUBY_VENDOR_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' -@@ -3199,6 +3228,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], +@@ -3216,6 +3245,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], [ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" ]) @@ -106,7 +106,7 @@ index 8e4aaec..c65e0c7 100644 pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], ["$RUBY_EXEC_PREFIX/"*], [ -@@ -3220,11 +3256,13 @@ if test "x$SITE_DIR" = xno; then +@@ -3237,11 +3273,13 @@ if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) @@ -120,7 +120,7 @@ index 8e4aaec..c65e0c7 100644 fi AC_SUBST(arch)dnl -@@ -3232,7 +3270,9 @@ AC_SUBST(sitearch)dnl +@@ -3249,7 +3287,9 @@ AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl AC_SUBST(archdir)dnl AC_SUBST(sitedir)dnl diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index 00165dc..74e41d7 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index c65e0c7..748edc9 100644 --- a/configure.in +++ b/configure.in -@@ -3277,6 +3277,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3294,6 +3294,8 @@ AC_SUBST(vendorarchdir)dnl configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index eb57196..d8970cf 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -26,7 +26,7 @@ diff --git a/configure.in b/configure.in index db3641b..8e4aaec 100644 --- a/configure.in +++ b/configure.in -@@ -3135,6 +3135,15 @@ else +@@ -3152,6 +3152,15 @@ else RUBY_LIB_VERSION="\"${ruby_version}\"" fi @@ -42,7 +42,7 @@ index db3641b..8e4aaec 100644 AC_ARG_WITH(sitedir, AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), [sitedir=$withval], -@@ -3157,16 +3166,25 @@ if test "${LOAD_RELATIVE+set}"; then +@@ -3174,16 +3183,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" @@ -68,7 +68,7 @@ index db3641b..8e4aaec 100644 AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -3197,6 +3215,7 @@ else +@@ -3214,6 +3232,7 @@ else fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !!) @@ -76,7 +76,7 @@ index db3641b..8e4aaec 100644 if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else -@@ -3211,6 +3230,7 @@ fi +@@ -3228,6 +3247,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 47cd946..397d760 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 748edc9..6a16745 100644 --- a/configure.in +++ b/configure.in -@@ -3180,6 +3180,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D +@@ -3197,6 +3197,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D dir="${VENDORARCH_DIR}" done @@ -29,7 +29,7 @@ index 748edc9..6a16745 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" -@@ -3273,6 +3280,7 @@ AC_SUBST(sitedir)dnl +@@ -3290,6 +3297,7 @@ AC_SUBST(sitedir)dnl AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-1.9.3-disable-versioned-paths.patch b/ruby-1.9.3-disable-versioned-paths.patch index be671a9..79f7bd6 100644 --- a/ruby-1.9.3-disable-versioned-paths.patch +++ b/ruby-1.9.3-disable-versioned-paths.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index f2d22ef..db3641b 100644 --- a/configure.in +++ b/configure.in -@@ -3302,6 +3302,17 @@ else +@@ -3319,6 +3319,17 @@ else fi AC_SUBST(USE_RUBYGEMS) @@ -37,10 +37,10 @@ diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb index a3c65bf..a4e8559 100644 --- a/lib/rdoc/ri/paths.rb +++ b/lib/rdoc/ri/paths.rb -@@ -11,9 +11,9 @@ module RDoc::RI::Paths +@@ -12,9 +12,9 @@ module RDoc::RI::Paths version = RbConfig::CONFIG['ruby_version'] - base = if RbConfig::CONFIG.key? 'ridir' then + BASE = if RbConfig::CONFIG.key? 'ridir' then - File.join RbConfig::CONFIG['ridir'], version + File.join [RbConfig::CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact else @@ -48,7 +48,7 @@ index a3c65bf..a4e8559 100644 + File.join [RbConfig::CONFIG['datadir'], 'ri', RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact end - SYSDIR = File.join base, "system" + homedir = begin diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index f9d97d3..d9e26c1 100755 --- a/tool/mkconfig.rb diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 77be75a..df88a50 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index ded4e89..0870f22 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1746,7 +1746,7 @@ SRC +@@ -1747,7 +1747,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch b/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch deleted file mode 100644 index f8eb63d..0000000 --- a/ruby-1.9.3-rubygems-1.8.11-uninstaller.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 6a07398a3aac0793d1a62f6f4778d90baf86ab7e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Mon, 19 Nov 2012 14:41:06 +0100 -Subject: [PATCH] RubyGems uninstaller upstream fixes. - ---- - lib/rubygems/uninstaller.rb | 35 +++++++++++++++++++++++------------ - test/rubygems/test_gem_uninstaller.rb | 2 +- - 2 files changed, 24 insertions(+), 13 deletions(-) - -diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb -index cc32ea4..c0e8b4b 100644 ---- a/lib/rubygems/uninstaller.rb -+++ b/lib/rubygems/uninstaller.rb -@@ -51,15 +51,14 @@ class Gem::Uninstaller - @bin_dir = options[:bin_dir] - @format_executable = options[:format_executable] - -+ if options[:force] -+ @force_all = true -+ @force_ignore = true -+ end -+ - # only add user directory if install_dir is not set - @user_install = false - @user_install = options[:user_install] unless options[:install_dir] -- -- if @user_install then -- Gem.use_paths Gem.user_dir, @gem_home -- else -- Gem.use_paths @gem_home -- end - end - - ## -@@ -69,10 +68,24 @@ class Gem::Uninstaller - def uninstall - list = Gem::Specification.find_all_by_name(@gem, @version) - -+ list, other_repo_specs = list.partition do |spec| -+ @gem_home == spec.base_dir or -+ (@user_install and spec.base_dir == Gem.user_dir) -+ end -+ - if list.empty? then -- raise Gem::InstallError, "gem #{@gem.inspect} is not installed" -+ raise Gem::InstallError, "gem #{@gem.inspect} is not installed" if -+ other_repo_specs.empty? -+ -+ other_repos = other_repo_specs.map { |spec| spec.base_dir }.uniq -+ -+ message = ["#{@gem} is not installed in GEM_HOME, try:"] -+ message.concat other_repos.map { |repo| -+ "\tgem uninstall -i #{repo} #{@gem}" -+ } - -- elsif list.size > 1 and @force_all then -+ raise Gem::InstallError, message.join("\n") -+ elsif @force_all then - remove_all list - - elsif list.size > 1 then -@@ -250,12 +263,10 @@ class Gem::Uninstaller - msg << "\t#{spec.full_name}" - - spec.dependent_gems.each do |dep_spec, dep, satlist| -- msg << -- ("#{dep_spec.name}-#{dep_spec.version} depends on " + -- "[#{dep.name} (#{dep.requirement})]") -+ msg << "#{dep_spec.name}-#{dep_spec.version} depends on #{dep}" - end - -- msg << 'If you remove this gems, one or more dependencies will not be met.' -+ msg << 'If you remove this gem, one or more dependencies will not be met.' - msg << 'Continue with Uninstall?' - return ask_yes_no(msg.join("\n"), true) - end -diff --git a/test/rubygems/test_gem_uninstaller.rb b/test/rubygems/test_gem_uninstaller.rb -index a65b992..1cd186f 100644 ---- a/test/rubygems/test_gem_uninstaller.rb -+++ b/test/rubygems/test_gem_uninstaller.rb -@@ -225,7 +225,7 @@ class TestGemUninstaller < Gem::InstallerTestCase - - uninstaller = Gem::Uninstaller.new('a') - -- use_ui Gem::MockGemUi.new("2\n") do -+ use_ui Gem::MockGemUi.new("2\ny\n") do - uninstaller.uninstall - end - --- -1.8.0 - diff --git a/ruby.spec b/ruby.spec index 75059e2..b6a6108 100644 --- a/ruby.spec +++ b/ruby.spec @@ -15,7 +15,7 @@ #%%global milestone preview1 # Keep the revision enabled for pre-releases from SVN. -%global revision 37807 +%global revision 38184 %global ruby_archive %{name}-%{ruby_version} @@ -44,7 +44,7 @@ %global ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir} %global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir} -%global rubygems_version 1.8.23 +%global rubygems_version 2.0.0.preview2 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -57,16 +57,16 @@ # http://rpm.org/ticket/78 %global gem_extdir %{_exec_prefix}/lib{,64}/gems -%global rake_version 0.9.4 +%global rake_version 0.9.5 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 3.9.5 +%global rdoc_version 4.0.0.preview2 %global bigdecimal_version 1.1.0 %global io_console_version 0.3 %global json_version 1.7.1 -%global minitest_version 3.4.0 -%global psych_version 1.3.4 +%global minitest_version 4.3.2 +%global psych_version 2.0.0 %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -92,11 +92,6 @@ Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch Patch3: ruby-1.9.3-always-use-i386.patch # http://redmine.ruby-lang.org/issues/5465 Patch4: ruby-1.9.3-fix-s390x-build.patch -# Fix the uninstaller, so that it doesn't say that gem doesn't exist -# when it exists outside of the GEM_HOME (already fixed in the upstream) -# This consist of several RubyGems upstream patches: -# 2786a40b, 8e2a9889, 1755effe, 70963846, 21c78318, 88e1e1cc, 415c0ec4 -Patch5: ruby-1.9.3-rubygems-1.8.11-uninstaller.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 Patch8: ruby-1.9.3-custom-rubygems-location.patch @@ -383,7 +378,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch2 -p1 %patch3 -p1 %patch4 -p1 -%patch5 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 @@ -468,14 +462,17 @@ mkdir -p %{buildroot}%{gem_extdir}/exts # make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems mkdir -p %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib mv %{buildroot}%{ruby_libdir}/rake* %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib +mv %{buildroot}%{gem_dir}/specifications/default/rake-%{rake_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib +mv %{buildroot}%{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib +mv %{buildroot}%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/specifications ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal ln -s %{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so @@ -483,6 +480,7 @@ mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io +mv %{buildroot}%{gem_dir}/specifications/default/io-console-%{io_console_version}.gemspec %{buildroot}%{gem_dir}/specifications ln -s %{gem_dir}/gems/io-console-%{io_console_version}/lib/io %{buildroot}%{ruby_libdir}/io ln -s %{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so @@ -490,14 +488,17 @@ mkdir -p %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib/ +mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib +mv %{buildroot}%{gem_dir}/specifications/default/minitest-%{minitest_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/exts/psych-%{psych_version}/lib mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/exts/psych-%{psych_version}/lib/ +mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications # Adjust the gemspec files so that the gems will load properly sed -i '8 a\ diff --git a/rubygems-1.8.11-binary-extensions.patch b/rubygems-1.8.11-binary-extensions.patch index b3a5697..d44f9cf 100644 --- a/rubygems-1.8.11-binary-extensions.patch +++ b/rubygems-1.8.11-binary-extensions.patch @@ -4,14 +4,14 @@ Date: Thu, 3 Nov 2011 16:43:05 +0100 Subject: [PATCH 1/6] Add dedicate extensions folder into $LOAD_PATH. --- - lib/rubygems/specification.rb | 37 ++++++++++++++++++++++++++++++------- - 1 files changed, 30 insertions(+), 7 deletions(-) + lib/rubygems/specification.rb | 32 ++++++++++++++++++++++++++++++-- + 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 97db19e..263e7d3 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -859,6 +859,12 @@ class Gem::Specification +@@ -1250,6 +1250,12 @@ class Gem::Specification File.join full_gem_path, path end @@ -24,31 +24,26 @@ index 97db19e..263e7d3 100644 # gem directories must come after -I and ENV['RUBYLIB'] insert_index = Gem.load_path_insert_index -@@ -970,16 +976,16 @@ class Gem::Specification +@@ -1364,11 +1370,16 @@ class Gem::Specification def contains_requirable_file? file - root = full_gem_path -+ ext = ext_dir -+ -+ require_paths.any? do |lib| + root = full_gem_path ++ ext = ext_dir + suffixes = Gem.suffixes + + require_paths.any? do |lib| +- base = "#{root}/#{lib}/#{file}" +- suffixes.any? { |suf| File.file? "#{base}#{suf}" } + base = ["#{root}/#{lib}/#{file}"] + base << "#{ext}/#{lib}/#{file}" unless extensions.empty? - -- require_paths.each do |lib| -- base = "#{root}/#{lib}/#{file}" -- Gem.suffixes.each do |suf| -- path = "#{base}#{suf}" -- return true if File.file? path ++ + base.any? do |path| -+ Gem.suffixes.any? { |suf| File.file? "#{path}#{suf}" } - end ++ suffixes.any? { |suf| File.file? "#{path}#{suf}" } ++ end end -- -- return false end - ## -@@ -1295,6 +1301,23 @@ class Gem::Specification +@@ -1664,6 +1675,23 @@ class Gem::Specification end ## @@ -73,7 +68,7 @@ index 97db19e..263e7d3 100644 # # Formerly used to indicate this gem was RDoc-capable. -- -1.7.7.3 +1.8.0 From 671e4285bf9db948bc5f054d7d3d931cdd7a17f8 Mon Sep 17 00:00:00 2001 @@ -82,18 +77,18 @@ Date: Wed, 16 Nov 2011 13:26:48 +0100 Subject: [PATCH 2/6] Use spec's ext dir for extension installation. --- - lib/rubygems/installer.rb | 2 +- - lib/rubygems/specification.rb | 7 +++---- + lib/rubygems/installer.rb | 2 +- + lib/rubygems/specification.rb | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 74d803d..0063c7f 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -509,7 +509,7 @@ TEXT - def build_extensions - return if spec.extensions.empty? - say "Building native extensions. This could take a while..." +@@ -649,7 +649,7 @@ TEXT + say "This could take a while..." + end + - dest_path = File.join gem_dir, spec.require_paths.first + dest_path = spec.ext_dir ran_rake = false # only run rake once @@ -103,7 +98,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 263e7d3..d31b93b 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -1305,16 +1305,15 @@ class Gem::Specification +@@ -1679,16 +1679,15 @@ class Gem::Specification # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 def ext_dir @@ -124,7 +119,7 @@ index 263e7d3..d31b93b 100644 ## -- -1.7.7.3 +1.8.0 From 11b4a0cbadd8b1d3320f838881aa60feb6f848e7 Mon Sep 17 00:00:00 2001 @@ -133,14 +128,14 @@ Date: Wed, 16 Nov 2011 14:52:16 +0100 Subject: [PATCH 3/6] Simplify the extending of $LOAD_PATH for binary gems. --- - lib/rubygems/specification.rb | 11 +++++------ - 1 files changed, 5 insertions(+), 6 deletions(-) + lib/rubygems/specification.rb | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index d31b93b..e65ea2d 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -859,11 +859,7 @@ class Gem::Specification +@@ -1250,11 +1250,7 @@ class Gem::Specification File.join full_gem_path, path end @@ -153,7 +148,7 @@ index d31b93b..e65ea2d 100644 # gem directories must come after -I and ENV['RUBYLIB'] insert_index = Gem.load_path_insert_index -@@ -1313,7 +1309,10 @@ class Gem::Specification +@@ -1687,7 +1683,10 @@ class Gem::Specification # gem directory. eg: /usr/local/lib/ruby/1.8/gems def exts_dir @@ -166,7 +161,7 @@ index d31b93b..e65ea2d 100644 ## -- -1.7.7.3 +1.8.0 From 5d46cd2b1ac9517a9cbcfa430261e62bb3a376b8 Mon Sep 17 00:00:00 2001 @@ -175,18 +170,18 @@ Date: Fri, 9 Dec 2011 16:31:04 +0100 Subject: [PATCH 4/6] Fix the binary extension search path construction. --- - lib/rubygems/installer.rb | 2 +- - lib/rubygems/specification.rb | 4 ++-- + lib/rubygems/installer.rb | 2 +- + lib/rubygems/specification.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 0063c7f..83b8fd5 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -509,7 +509,7 @@ TEXT - def build_extensions - return if spec.extensions.empty? - say "Building native extensions. This could take a while..." +@@ -649,7 +649,7 @@ TEXT + say "This could take a while..." + end + - dest_path = spec.ext_dir + dest_path = File.join spec.ext_dir, spec.require_paths.first ran_rake = false # only run rake once @@ -196,7 +191,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index e65ea2d..8be2ade 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -859,7 +859,7 @@ class Gem::Specification +@@ -1250,7 +1250,7 @@ class Gem::Specification File.join full_gem_path, path end @@ -205,7 +200,7 @@ index e65ea2d..8be2ade 100644 # gem directories must come after -I and ENV['RUBYLIB'] insert_index = Gem.load_path_insert_index -@@ -1301,7 +1301,7 @@ class Gem::Specification +@@ -1675,7 +1675,7 @@ class Gem::Specification # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 def ext_dir @@ -215,7 +210,7 @@ index e65ea2d..8be2ade 100644 ## -- -1.7.7.3 +1.8.0 From 6229583633802b45e5a3e5689ab9077347cd9ef7 Mon Sep 17 00:00:00 2001 @@ -224,14 +219,14 @@ Date: Tue, 13 Dec 2011 12:14:54 +0100 Subject: [PATCH 5/6] Remove binary extensions during uninstall. --- - lib/rubygems/uninstaller.rb | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + lib/rubygems/uninstaller.rb | 1 + + 1 file changed, 1 insertion(+) diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb index cc32ea4..94d78e0 100644 --- a/lib/rubygems/uninstaller.rb +++ b/lib/rubygems/uninstaller.rb -@@ -213,6 +213,7 @@ class Gem::Uninstaller +@@ -234,6 +234,7 @@ class Gem::Uninstaller File.writable?(spec.base_dir) FileUtils.rm_rf spec.full_gem_path @@ -240,7 +235,7 @@ index cc32ea4..94d78e0 100644 # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) old_platform_name = [spec.name, -- -1.7.7.3 +1.8.0 From bc40e1b9f60a9a04456e3504ffe6ee600b6da269 Mon Sep 17 00:00:00 2001 @@ -249,15 +244,15 @@ Date: Tue, 13 Dec 2011 14:27:14 +0100 Subject: [PATCH 6/6] Avoid dependency on customized operating_system.rb. --- - lib/rubygems/defaults.rb | 11 +++++++++++ - lib/rubygems/specification.rb | 5 +---- + lib/rubygems/defaults.rb | 11 +++++++++++ + lib/rubygems/specification.rb | 5 +---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb index 20b4198..6d8711f 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb -@@ -94,6 +94,17 @@ module Gem +@@ -101,6 +101,17 @@ module Gem end ## @@ -272,14 +267,14 @@ index 20b4198..6d8711f 100644 + end + + ## - # The default system-wide source info cache directory + # A wrapper around RUBY_ENGINE const that may not be defined - def self.default_system_source_cache_dir + def self.ruby_engine diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 8be2ade..f54210a 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -1309,10 +1309,7 @@ class Gem::Specification +@@ -1683,10 +1683,7 @@ class Gem::Specification # gem directory. eg: /usr/local/lib/ruby/1.8/gems def exts_dir @@ -292,5 +287,5 @@ index 8be2ade..f54210a 100644 ## -- -1.7.7.3 +1.8.0 From 6951c61aeec302334258060fbfb268e3b02cdc72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 5 Dec 2012 16:42:40 +0100 Subject: [PATCH 253/529] Update release name to preview2, which is the most actual. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index b6a6108..e4da346 100644 --- a/ruby.spec +++ b/ruby.spec @@ -12,7 +12,7 @@ %global ruby_abi 1.9.1 # Specify the named version. It has precedense to revision. -#%%global milestone preview1 +#%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. %global revision 38184 From 08ec4b6a6cad4917b58df9ba1e9ad66484228c69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 5 Dec 2012 16:46:30 +0100 Subject: [PATCH 254/529] Add TODO to fix ruby_abi for official release. --- ruby.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e4da346..07d7b86 100644 --- a/ruby.spec +++ b/ruby.spec @@ -7,7 +7,9 @@ %global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_version_patch_level %{major_minor_version}.%{teeny_version}.%{patch_level} -# Ruby 2.0 keeps the abi Ruby 1.9.1 compatible. +# TODO: Fix ruby_api for official release according to +# http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/48984 +# It is kept at 1.9.1 just for testing. All dependent libraries need rebuild. # %%global ruby_abi %%{major_minor_version}.0 %global ruby_abi 1.9.1 From 6c9f7f527320c91698a65091a469aba20fcfb520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 7 Dec 2012 13:51:54 +0100 Subject: [PATCH 255/529] Update to Ruby 2.0.0 (r38260). --- ruby.spec | 3 ++- rubygems-1.8.11-binary-extensions.patch | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ruby.spec b/ruby.spec index 07d7b86..587a15d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,7 +17,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 38184 +%global revision 38260 %global ruby_archive %{name}-%{ruby_version} @@ -720,6 +720,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/racc/cparse.so %{ruby_libarchdir}/rbconfig.rb %{ruby_libarchdir}/readline.so +%{ruby_libarchdir}/refinement.so %{ruby_libarchdir}/ripper.so %{ruby_libarchdir}/sdbm.so %{ruby_libarchdir}/socket.so diff --git a/rubygems-1.8.11-binary-extensions.patch b/rubygems-1.8.11-binary-extensions.patch index d44f9cf..dc6f85a 100644 --- a/rubygems-1.8.11-binary-extensions.patch +++ b/rubygems-1.8.11-binary-extensions.patch @@ -24,7 +24,7 @@ index 97db19e..263e7d3 100644 # gem directories must come after -I and ENV['RUBYLIB'] insert_index = Gem.load_path_insert_index -@@ -1364,11 +1370,16 @@ class Gem::Specification +@@ -1368,11 +1374,16 @@ class Gem::Specification def contains_requirable_file? file root = full_gem_path @@ -43,7 +43,7 @@ index 97db19e..263e7d3 100644 end end -@@ -1664,6 +1675,23 @@ class Gem::Specification +@@ -1668,6 +1679,23 @@ class Gem::Specification end ## @@ -98,7 +98,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 263e7d3..d31b93b 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -1679,16 +1679,15 @@ class Gem::Specification +@@ -1683,16 +1683,15 @@ class Gem::Specification # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 def ext_dir @@ -148,7 +148,7 @@ index d31b93b..e65ea2d 100644 # gem directories must come after -I and ENV['RUBYLIB'] insert_index = Gem.load_path_insert_index -@@ -1687,7 +1683,10 @@ class Gem::Specification +@@ -1691,7 +1687,10 @@ class Gem::Specification # gem directory. eg: /usr/local/lib/ruby/1.8/gems def exts_dir @@ -200,7 +200,7 @@ index e65ea2d..8be2ade 100644 # gem directories must come after -I and ENV['RUBYLIB'] insert_index = Gem.load_path_insert_index -@@ -1675,7 +1675,7 @@ class Gem::Specification +@@ -1679,7 +1679,7 @@ class Gem::Specification # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 def ext_dir @@ -274,7 +274,7 @@ diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb index 8be2ade..f54210a 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb -@@ -1683,10 +1683,7 @@ class Gem::Specification +@@ -1687,10 +1687,7 @@ class Gem::Specification # gem directory. eg: /usr/local/lib/ruby/1.8/gems def exts_dir From f54d04c405da8c88627c9e7760a3ea65ea3691ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 7 Dec 2012 16:45:39 +0100 Subject: [PATCH 256/529] RDoc now depends on JSON. --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index 587a15d..e754b8c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -241,6 +241,7 @@ License: GPLv2 and Ruby and MIT Requires: ruby(abi) = %{ruby_abi} Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} +Requires: rubygem(json) >= %{json_version} Provides: rdoc = %{version}-%{release} Provides: ri = %{version}-%{release} Provides: rubygem(rdoc) = %{version}-%{release} From e6ae5c218d63f6943c16e7d269528ac943c06b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 7 Dec 2012 17:12:51 +0100 Subject: [PATCH 257/529] Always add the .gemspec lines before end of block. --- ruby.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index e754b8c..8d95e3f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -504,25 +504,25 @@ mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/exts/psyc mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications # Adjust the gemspec files so that the gems will load properly -sed -i '8 a\ +sed -i '/^end$/ i\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rake-%{rake_version}.gemspec -sed -i '8 a\ +sed -i '/^end$/ i\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec -sed -i '8 a\ +sed -i '/^end$/ i\ s.require_paths = ["lib"]\ s.extensions = ["bigdecimal.so"]' %{buildroot}%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec -sed -i '8 a\ +sed -i '/^end$/ i\ s.require_paths = ["lib"]\ s.extensions = ["io/console.so"]' %{buildroot}%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec -sed -i '8 a\ +sed -i '/^end$/ i\ s.require_paths = ["lib"]\ s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec -sed -i '8 a\ +sed -i '/^end$/ i\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check From f700ed56ad4625bbb49d3e29dbe72d16c7469ccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 10 Dec 2012 16:22:43 +0100 Subject: [PATCH 258/529] Upgrade to Ruby 2.0.0 (r38297). --- ...-1.9.3-added-site-and-vendor-arch-flags.patch | 16 ++++++++-------- ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 12 ++++++------ ruby-1.9.3-custom-rubygems-location.patch | 6 +++--- ruby-1.9.3-disable-versioned-paths.patch | 6 +++--- ruby.spec | 2 +- rubygems-1.8.11-binary-extensions.patch | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index 5f72381..4ec996a 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in index 8e4aaec..c65e0c7 100644 --- a/configure.in +++ b/configure.in -@@ -3170,6 +3170,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -3172,6 +3172,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 8e4aaec..c65e0c7 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], -@@ -3179,19 +3188,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3181,19 +3190,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 8e4aaec..c65e0c7 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -3209,6 +3231,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -3211,6 +3233,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -92,7 +92,7 @@ index 8e4aaec..c65e0c7 100644 AS_CASE(["$RUBY_VENDOR_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' -@@ -3216,6 +3245,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], +@@ -3218,6 +3247,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], [ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" ]) @@ -106,7 +106,7 @@ index 8e4aaec..c65e0c7 100644 pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], ["$RUBY_EXEC_PREFIX/"*], [ -@@ -3237,11 +3273,13 @@ if test "x$SITE_DIR" = xno; then +@@ -3239,11 +3275,13 @@ if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) @@ -120,7 +120,7 @@ index 8e4aaec..c65e0c7 100644 fi AC_SUBST(arch)dnl -@@ -3249,7 +3287,9 @@ AC_SUBST(sitearch)dnl +@@ -3251,7 +3289,9 @@ AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl AC_SUBST(archdir)dnl AC_SUBST(sitedir)dnl @@ -143,7 +143,7 @@ index 03c3332..79b8e44 100755 File.foreach "config.status" do |line| next if /^#/ =~ line name = nil -@@ -79,6 +81,8 @@ File.foreach "config.status" do |line| +@@ -80,6 +82,8 @@ File.foreach "config.status" do |line| when /^RUBY_SO_NAME$/; next if $so_name when /^arch$/; if val.empty? then val = arch else arch = val end when /^archdir$/; archdir_override = val; next @@ -152,7 +152,7 @@ index 03c3332..79b8e44 100755 when /^sitearch/; val = '$(arch)' if val.empty? end case val -@@ -213,11 +217,11 @@ print <!) @@ -76,7 +76,7 @@ index db3641b..8e4aaec 100644 if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else -@@ -3228,6 +3247,7 @@ fi +@@ -3230,6 +3249,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -96,7 +96,7 @@ index d9e26c1..03c3332 100755 File.foreach "config.status" do |line| next if /^#/ =~ line name = nil -@@ -77,6 +78,7 @@ File.foreach "config.status" do |line| +@@ -78,6 +79,7 @@ File.foreach "config.status" do |line| when /^RUBY_INSTALL_NAME$/; next if $install_name when /^RUBY_SO_NAME$/; next if $so_name when /^arch$/; if val.empty? then val = arch else arch = val end @@ -104,7 +104,7 @@ index d9e26c1..03c3332 100755 when /^sitearch/; val = '$(arch)' if val.empty? end case val -@@ -207,7 +209,7 @@ print(*v_fast) +@@ -208,7 +210,7 @@ print(*v_fast) print(*v_others) print < Date: Tue, 11 Dec 2012 10:53:48 +0100 Subject: [PATCH 259/529] Try to make -doc subpackage noarch again The new RDoc should resolve the arch dependent issues (https://github.com/rdoc/rdoc/issues/71). --- ruby.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ruby.spec b/ruby.spec index 78482e4..fbd0c05 100644 --- a/ruby.spec +++ b/ruby.spec @@ -259,11 +259,7 @@ documentation. Summary: Documentation for %{name} Group: Documentation Requires: %{_bindir}/ri -# TODO: It seems that ri documentation differs from platform to platform due to -# some encoding bugs, therefore the documentation should be split out of this gem -# or kept platform specific. -# https://github.com/rdoc/rdoc/issues/71 -# BuildArch: noarch +BuildArch: noarch %description doc This package contains documentation for %{name}. From 66b98259c5d7952c9594f748d70cb743f1e29f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 17 Dec 2012 10:52:59 +0100 Subject: [PATCH 260/529] Update to Ruby 2.0.0 (r38422). --- ruby-1.9.3-added-site-and-vendor-arch-flags.patch | 12 ++++++------ ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 8 ++++---- ruby-1.9.3-custom-rubygems-location.patch | 4 ++-- ruby-1.9.3-disable-versioned-paths.patch | 2 +- ruby.spec | 6 +++--- rubygems-1.8.11-binary-extensions.patch | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index 4ec996a..4900fee 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in index 8e4aaec..c65e0c7 100644 --- a/configure.in +++ b/configure.in -@@ -3172,6 +3172,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -3178,6 +3178,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 8e4aaec..c65e0c7 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], -@@ -3181,19 +3190,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3187,19 +3196,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 8e4aaec..c65e0c7 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -3211,6 +3233,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -3217,6 +3239,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -92,7 +92,7 @@ index 8e4aaec..c65e0c7 100644 AS_CASE(["$RUBY_VENDOR_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' -@@ -3218,6 +3247,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], +@@ -3224,6 +3253,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], [ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" ]) @@ -106,7 +106,7 @@ index 8e4aaec..c65e0c7 100644 pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], ["$RUBY_EXEC_PREFIX/"*], [ -@@ -3239,11 +3275,13 @@ if test "x$SITE_DIR" = xno; then +@@ -3245,11 +3281,13 @@ if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) @@ -120,7 +120,7 @@ index 8e4aaec..c65e0c7 100644 fi AC_SUBST(arch)dnl -@@ -3251,7 +3289,9 @@ AC_SUBST(sitearch)dnl +@@ -3257,7 +3295,9 @@ AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl AC_SUBST(archdir)dnl AC_SUBST(sitedir)dnl diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index ae98ef5..3c4eff8 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index c65e0c7..748edc9 100644 --- a/configure.in +++ b/configure.in -@@ -3296,6 +3296,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3302,6 +3302,8 @@ AC_SUBST(vendorarchdir)dnl configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index e1f025d..1e5bc06 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -26,7 +26,7 @@ diff --git a/configure.in b/configure.in index db3641b..8e4aaec 100644 --- a/configure.in +++ b/configure.in -@@ -3154,6 +3154,15 @@ else +@@ -3160,6 +3160,15 @@ else RUBY_LIB_VERSION="\"${ruby_version}\"" fi @@ -42,7 +42,7 @@ index db3641b..8e4aaec 100644 AC_ARG_WITH(sitedir, AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), [sitedir=$withval], -@@ -3176,16 +3185,25 @@ if test "${LOAD_RELATIVE+set}"; then +@@ -3182,16 +3191,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" @@ -68,7 +68,7 @@ index db3641b..8e4aaec 100644 AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -3216,6 +3234,7 @@ else +@@ -3222,6 +3240,7 @@ else fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !!) @@ -76,7 +76,7 @@ index db3641b..8e4aaec 100644 if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else -@@ -3230,6 +3249,7 @@ fi +@@ -3236,6 +3255,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index ced4897..054b31f 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 748edc9..6a16745 100644 --- a/configure.in +++ b/configure.in -@@ -3199,6 +3199,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D +@@ -3205,6 +3205,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D dir="${VENDORARCH_DIR}" done @@ -29,7 +29,7 @@ index 748edc9..6a16745 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" -@@ -3292,6 +3299,7 @@ AC_SUBST(sitedir)dnl +@@ -3298,6 +3305,7 @@ AC_SUBST(sitedir)dnl AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-1.9.3-disable-versioned-paths.patch b/ruby-1.9.3-disable-versioned-paths.patch index 1b77ef4..32f7e99 100644 --- a/ruby-1.9.3-disable-versioned-paths.patch +++ b/ruby-1.9.3-disable-versioned-paths.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index f2d22ef..db3641b 100644 --- a/configure.in +++ b/configure.in -@@ -3321,6 +3321,17 @@ else +@@ -3327,6 +3327,17 @@ else fi AC_SUBST(USE_RUBYGEMS) diff --git a/ruby.spec b/ruby.spec index fbd0c05..0d9c2ec 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,7 +17,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 38297 +%global revision 38422 %global ruby_archive %{name}-%{ruby_version} @@ -63,10 +63,10 @@ # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 4.0.0.preview2 +%global rdoc_version 4.0.0.preview2.1 %global bigdecimal_version 1.1.0 %global io_console_version 0.3 -%global json_version 1.7.1 +%global json_version 1.7.5 %global minitest_version 4.3.2 %global psych_version 2.0.0 diff --git a/rubygems-1.8.11-binary-extensions.patch b/rubygems-1.8.11-binary-extensions.patch index 0377271..dc6f85a 100644 --- a/rubygems-1.8.11-binary-extensions.patch +++ b/rubygems-1.8.11-binary-extensions.patch @@ -252,7 +252,7 @@ diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb index 20b4198..6d8711f 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb -@@ -104,6 +104,17 @@ module Gem +@@ -101,6 +101,17 @@ module Gem end ## From f558e87b586e7fe87226bcfee82db7a8ee39cbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 17 Dec 2012 15:43:07 +0100 Subject: [PATCH 261/529] Enable SystemTap support. --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index 0d9c2ec..2c5cba5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -145,6 +145,7 @@ BuildRequires: readline-devel BuildRequires: tk-devel # Needed to pass test_set_program_name(TestRubyOptions) BuildRequires: procps +BuildRequires: %{_bindir}/dtrace %description Ruby is the interpreted scripting language for quick and easy From e4abbb6f3e1c91407618ffe467371d9f64d3ecf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 18 Dec 2012 14:43:23 +0100 Subject: [PATCH 262/529] Re-enable tests previously disabled due to bugs. --- ruby.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 2c5cba5..6731b76 100644 --- a/ruby.spec +++ b/ruby.spec @@ -523,9 +523,7 @@ sed -i '/^end$/ i\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %check -# https://bugs.ruby-lang.org/issues/7386 -# http://bugs.ruby-lang.org/issues/7422 -DISABLE_TESTS="-x test_rake_functional.rb -x test_rubyoptions.rb" +DISABLE_TESTS="" %ifarch armv7l armv7hl armv7hnl # test_call_double(DL::TestDL) fails on ARM HardFP From 306a9cfda2536833e0dc02f67cce054af17e1e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 19 Dec 2012 15:19:59 +0100 Subject: [PATCH 263/529] Add TapSet for Ruby. --- libruby.stp | 303 ++++++++++++++++++++++++++++++++++++++++++++++++++++ ruby.spec | 21 ++++ 2 files changed, 324 insertions(+) create mode 100644 libruby.stp diff --git a/libruby.stp b/libruby.stp new file mode 100644 index 0000000..098b39d --- /dev/null +++ b/libruby.stp @@ -0,0 +1,303 @@ +/* SystemTap tapset to make it easier to trace Ruby 2.0 + * + * All probes provided by Ruby can be listed using following command + * (the path to the library must be adjuste appropriately): + * + * stap -L 'process("@LIBRARY_PATH@").mark("*")' + */ + +/** + * probe ruby.array.create - Allocation of new array. + * + * @size: Number of elements (an int) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.array.create = + process("@LIBRARY_PATH@").mark("array__create") +{ + size = $arg1 + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.cmethod.entry - Fired just before a method implemented in C is entered. + * + * @classname: Name of the class (string) + * @methodname: The method about bo be executed (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.cmethod.entry = + process("@LIBRARY_PATH@").mark("cmethod__entry") +{ + classname = user_string($arg1) + methodname = user_string($arg2) + file = user_string($arg3) + line = $arg4 +} + +/** + * probe ruby.cmethod.return - Fired just after a method implemented in C has returned. + * + * @classname: Name of the class (string) + * @methodname: The executed method (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.cmethod.return = + process("@LIBRARY_PATH@").mark("cmethod__return") +{ + classname = user_string($arg1) + methodname = user_string($arg2) + file = user_string($arg3) + line = $arg4 +} + +/** + * probe ruby.find.require.entry - Fired when require starts to search load + * path for suitable file to require. + * + * @requiredfile: The name of the file to be required (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.find.require.entry = + process("@LIBRARY_PATH@").mark("find__require__entry") +{ + requiredfile = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.find.require.return - Fired just after require has finished + * search of load path for suitable file to require. + * + * @requiredfile: The name of the file to be required (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.find.require.return = + process("@LIBRARY_PATH@").mark("find__require__return") +{ + requiredfile = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.gc.mark.begin - Fired when a GC mark phase is about to start. + * + * It takes no arguments. + */ +probe ruby.gc.mark.begin = + process("@LIBRARY_PATH@").mark("gc__mark__begin") +{ +} + +/** + * probe ruby.gc.mark.end - Fired when a GC mark phase has ended. + * + * It takes no arguments. + */ +probe ruby.gc.mark.end = + process("@LIBRARY_PATH@").mark("gc__mark__end") +{ +} + +/** + * probe ruby.gc.sweep.begin - Fired when a GC sweep phase is about to start. + * + * It takes no arguments. + */ +probe ruby.gc.sweep.begin = + process("@LIBRARY_PATH@").mark("gc__sweep__begin") +{ +} + +/** + * probe ruby.gc.sweep.end - Fired when a GC sweep phase has ended. + * + * It takes no arguments. + */ +probe ruby.gc.sweep.end = + process("@LIBRARY_PATH@").mark("gc__sweep__end") +{ +} + +/** + * probe ruby.hash.create - Allocation of new hash. + * + * @size: Number of elements (int) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.hash.create = + process("@LIBRARY_PATH@").mark("hash__create") +{ + size = $arg1 + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.load.entry - Fired when calls to "load" are made. + * + * @loadedfile: The name of the file to be loaded (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.load.entry = + process("@LIBRARY_PATH@").mark("load__entry") +{ + loadedfile = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.load.return - Fired just after require has finished + * search of load path for suitable file to require. + * + * @loadedfile: The name of the file that was loaded (string) + */ +probe ruby.load.return = + process("@LIBRARY_PATH@").mark("load__return") +{ + loadedfile = user_string($arg1) +} + +/** + * probe ruby.method.entry - Fired just before a method implemented in Ruby is entered. + * + * @classname: Name of the class (string) + * @methodname: The method about bo be executed (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.method.entry = + process("@LIBRARY_PATH@").mark("method__entry") +{ + classname = user_string($arg1) + methodname = user_string($arg2) + file = user_string($arg3) + line = $arg4 +} + +/** + * probe ruby.method.return - Fired just after a method implemented in Ruby has returned. + * + * @classname: Name of the class (string) + * @methodname: The executed method (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.method.return = + process("@LIBRARY_PATH@").mark("method__return") +{ + classname = user_string($arg1) + methodname = user_string($arg2) + file = user_string($arg3) + line = $arg4 +} + +/** + * probe ruby.object.create - Allocation of new object. + * + * @classname: Name of the class (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.object.create = + process("@LIBRARY_PATH@").mark("object__create") +{ + classname = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.parse.begin - Fired just before a Ruby source file is parsed. + * + * @parsedfile: The name of the file to be parsed (string) + * @parsedline: The line number of beginning of parsing (int) + */ +probe ruby.parse.begin = + process("@LIBRARY_PATH@").mark("parse__begin") +{ + parsedfile = user_string($arg1) + parsedline = $arg2 +} + +/** + * probe ruby.parse.end - Fired just after a Ruby source file was parsed. + * + * @parsedfile: The name of parsed the file (string) + * @parsedline: The line number of beginning of parsing (int) + */ +probe ruby.parse.end = + process("@LIBRARY_PATH@").mark("parse__end") +{ + parsedfile = user_string($arg1) + parsedline = $arg2 +} + +/** + * probe ruby.raise - Fired when an exception is raised. + * + * @classname: The class name of the raised exception (string) + * @file: The name of the file where the exception was raised (string) + * @line: The line number in the file where the exception was raised (int) + */ +probe ruby.raise = + process("@LIBRARY_PATH@").mark("raise") +{ + classname = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.require.entry - Fired on calls to rb_require_safe (when a file + * is required). + * + * @requiredfile: The name of the file to be required (string) + * @file: The file that called "require" (string) + * @line: The line number where the call to require was made(int) + */ +probe ruby.require.entry = + process("@LIBRARY_PATH@").mark("require__entry") +{ + requiredfile = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.require.return - Fired just after require has finished + * search of load path for suitable file to require. + * + * @requiredfile: The file that was required (string) + */ +probe ruby.require.return = + process("@LIBRARY_PATH@").mark("require__return") +{ + requiredfile = user_string($arg1) +} + +/** + * probe ruby.string.create - Allocation of new string. + * + * @size: Number of elements (an int) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.string.create = + process("@LIBRARY_PATH@").mark("string__create") +{ + size = $arg1 + file = user_string($arg2) + line = $arg3 +} diff --git a/ruby.spec b/ruby.spec index 6731b76..e9dd4c5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -70,6 +70,19 @@ %global minitest_version 4.3.2 %global psych_version 2.0.0 +# Might not be needed in the future, if we are lucky enough. +# https://bugzilla.redhat.com/show_bug.cgi?id=888262 +%global tapset_dir %{_datadir}/systemtap/tapset + +# The distinction between 32 and 64 bit file locations might be done better in +# the future. +# http://sourceware.org/bugzilla/show_bug.cgi?id=10485 +%ifarch ppc64 s390x x86_64 ia64 alpha sparc64 +%global libruby_stp libruby.so.%{ruby_version}-64.stp +%else +%global libruby_stp libruby.so.%{ruby_version}-32.stp +%endif + %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') Summary: An interpreter of object-oriented scripting language @@ -82,6 +95,7 @@ License: (Ruby or BSD) and Public Domain URL: http://ruby-lang.org/ Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.gz Source1: operating_system.rb +Source2: libruby.stp # http://redmine.ruby-lang.org/issues/5231 Patch0: ruby-1.9.3-disable-versioned-paths.patch @@ -522,6 +536,11 @@ sed -i '/^end$/ i\ sed -i '/^end$/ i\ s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec +# Install a tapset and fix up the path to the library. +mkdir -p %{buildroot}%{tapset_dir} +sed -e "s|LIBRARY_PATH|%{_libdir}/libruby.so.%{ruby_version}|" \ + %{SOURCE2} > %{buildroot}%{tapset_dir}/%{libruby_stp} + %check DISABLE_TESTS="" @@ -727,6 +746,8 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{ruby_libarchdir}/tkutil.so %{ruby_libarchdir}/zlib.so +%{tapset_dir}/.. + %files -n rubygems %{_bindir}/gem %{rubygems_dir} From 94da38c804a47a57f20d9bdff553ef96b3ce2821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 20 Dec 2012 14:58:38 +0100 Subject: [PATCH 264/529] Make Tapset platform independent. --- ruby.spec | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/ruby.spec b/ruby.spec index e9dd4c5..cc87289 100644 --- a/ruby.spec +++ b/ruby.spec @@ -72,16 +72,9 @@ # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 -%global tapset_dir %{_datadir}/systemtap/tapset - -# The distinction between 32 and 64 bit file locations might be done better in -# the future. -# http://sourceware.org/bugzilla/show_bug.cgi?id=10485 -%ifarch ppc64 s390x x86_64 ia64 alpha sparc64 -%global libruby_stp libruby.so.%{ruby_version}-64.stp -%else -%global libruby_stp libruby.so.%{ruby_version}-32.stp -%endif +%global tapset_root %{_datadir}/systemtap +%global tapset_dir %{tapset_root}/tapset/ +%global tapset_libdir %(echo %{_libdir} | sed 's/64//')* %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -538,8 +531,8 @@ sed -i '/^end$/ i\ # Install a tapset and fix up the path to the library. mkdir -p %{buildroot}%{tapset_dir} -sed -e "s|LIBRARY_PATH|%{_libdir}/libruby.so.%{ruby_version}|" \ - %{SOURCE2} > %{buildroot}%{tapset_dir}/%{libruby_stp} +sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ + %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp %check DISABLE_TESTS="" @@ -746,7 +739,7 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{ruby_libarchdir}/tkutil.so %{ruby_libarchdir}/zlib.so -%{tapset_dir}/.. +%{tapset_root} %files -n rubygems %{_bindir}/gem From 4574488d84f91f9da95cb752c07cdb8a93056dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 20 Dec 2012 15:32:50 +0100 Subject: [PATCH 265/529] Add small TODO. --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index cc87289..546a6f0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -88,6 +88,7 @@ License: (Ruby or BSD) and Public Domain URL: http://ruby-lang.org/ Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.gz Source1: operating_system.rb +# TODO: Try to push SystemTap support upstream. Source2: libruby.stp # http://redmine.ruby-lang.org/issues/5231 From a91606d4ba7a17440d22ab7fb269d998450e0596 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 20 Dec 2012 16:46:57 +0100 Subject: [PATCH 266/529] Upgrade to Ruby 2.0.0 (r38732). --- ruby-1.9.3-added-site-and-vendor-arch-flags.patch | 14 +++++++------- ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 10 +++++----- ruby-1.9.3-custom-rubygems-location.patch | 4 ++-- ruby-1.9.3-disable-versioned-paths.patch | 2 +- ruby.spec | 9 ++++----- rubygems-1.8.11-binary-extensions.patch | 6 +++--- 7 files changed, 23 insertions(+), 24 deletions(-) diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index 4900fee..45dbc08 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -15,7 +15,7 @@ diff --git a/Makefile.in b/Makefile.in index 690ff8e..8c7dd98 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -39,6 +39,9 @@ arch = @arch@ +@@ -41,6 +41,9 @@ arch = @arch@ archdir = @archdir@ sitearch = @sitearch@ sitedir = @sitedir@ @@ -29,7 +29,7 @@ diff --git a/configure.in b/configure.in index 8e4aaec..c65e0c7 100644 --- a/configure.in +++ b/configure.in -@@ -3178,6 +3178,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do +@@ -3197,6 +3197,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do dir="${SITE_DIR}" done @@ -45,7 +45,7 @@ index 8e4aaec..c65e0c7 100644 AC_ARG_WITH(vendordir, AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), [vendordir=$withval], -@@ -3187,19 +3196,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do +@@ -3206,19 +3215,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do dir="${VENDOR_DIR}" done @@ -78,7 +78,7 @@ index 8e4aaec..c65e0c7 100644 fi pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -3217,6 +3239,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], +@@ -3236,6 +3258,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], [ RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" ]) @@ -92,7 +92,7 @@ index 8e4aaec..c65e0c7 100644 AS_CASE(["$RUBY_VENDOR_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' -@@ -3224,6 +3253,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], +@@ -3243,6 +3272,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], [ RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" ]) @@ -106,7 +106,7 @@ index 8e4aaec..c65e0c7 100644 pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' AS_CASE(["$RUBY_LIB_PREFIX"], ["$RUBY_EXEC_PREFIX/"*], [ -@@ -3245,11 +3281,13 @@ if test "x$SITE_DIR" = xno; then +@@ -3264,11 +3300,13 @@ if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) @@ -120,7 +120,7 @@ index 8e4aaec..c65e0c7 100644 fi AC_SUBST(arch)dnl -@@ -3257,7 +3295,9 @@ AC_SUBST(sitearch)dnl +@@ -3276,7 +3314,9 @@ AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl AC_SUBST(archdir)dnl AC_SUBST(sitedir)dnl diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index 3c4eff8..3cf148e 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index c65e0c7..748edc9 100644 --- a/configure.in +++ b/configure.in -@@ -3302,6 +3302,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3321,6 +3321,8 @@ AC_SUBST(vendorarchdir)dnl configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index 1e5bc06..5906b4c 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -14,7 +14,7 @@ diff --git a/Makefile.in b/Makefile.in index 78d7139..690ff8e 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -36,6 +36,7 @@ libexecdir = @libexecdir@ +@@ -38,6 +38,7 @@ libexecdir = @libexecdir@ datarootdir = @datarootdir@ datadir = @datadir@ arch = @arch@ @@ -26,7 +26,7 @@ diff --git a/configure.in b/configure.in index db3641b..8e4aaec 100644 --- a/configure.in +++ b/configure.in -@@ -3160,6 +3160,15 @@ else +@@ -3179,6 +3179,15 @@ else RUBY_LIB_VERSION="\"${ruby_version}\"" fi @@ -42,7 +42,7 @@ index db3641b..8e4aaec 100644 AC_ARG_WITH(sitedir, AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), [sitedir=$withval], -@@ -3182,16 +3191,25 @@ if test "${LOAD_RELATIVE+set}"; then +@@ -3201,16 +3210,25 @@ if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" @@ -68,7 +68,7 @@ index db3641b..8e4aaec 100644 AS_CASE(["$RUBY_SITE_LIB_PATH"], ["$RUBY_LIB_PREFIX/"*], [ RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -3222,6 +3240,7 @@ else +@@ -3241,6 +3259,7 @@ else fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !!) @@ -76,7 +76,7 @@ index db3641b..8e4aaec 100644 if test "x$SITE_DIR" = xno; then AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) else -@@ -3236,6 +3255,7 @@ fi +@@ -3255,6 +3274,7 @@ fi AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 054b31f..b4d95a6 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 748edc9..6a16745 100644 --- a/configure.in +++ b/configure.in -@@ -3205,6 +3205,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D +@@ -3224,6 +3224,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D dir="${VENDORARCH_DIR}" done @@ -29,7 +29,7 @@ index 748edc9..6a16745 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX="" -@@ -3298,6 +3305,7 @@ AC_SUBST(sitedir)dnl +@@ -3317,6 +3324,7 @@ AC_SUBST(sitedir)dnl AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-1.9.3-disable-versioned-paths.patch b/ruby-1.9.3-disable-versioned-paths.patch index 32f7e99..be13c08 100644 --- a/ruby-1.9.3-disable-versioned-paths.patch +++ b/ruby-1.9.3-disable-versioned-paths.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index f2d22ef..db3641b 100644 --- a/configure.in +++ b/configure.in -@@ -3327,6 +3327,17 @@ else +@@ -3346,6 +3346,17 @@ else fi AC_SUBST(USE_RUBYGEMS) diff --git a/ruby.spec b/ruby.spec index 546a6f0..e2d77c3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -17,7 +17,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 38422 +%global revision 38732 %global ruby_archive %{name}-%{ruby_version} @@ -46,7 +46,7 @@ %global ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir} %global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir} -%global rubygems_version 2.0.0.preview2 +%global rubygems_version 2.0.0.preview3.1 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -59,11 +59,11 @@ # http://rpm.org/ticket/78 %global gem_extdir %{_exec_prefix}/lib{,64}/gems -%global rake_version 0.9.5 +%global rake_version 0.9.6 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 4.0.0.preview2.1 +%global rdoc_version 4.0.0.preview3.1 %global bigdecimal_version 1.1.0 %global io_console_version 0.3 %global json_version 1.7.5 @@ -729,7 +729,6 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/racc/cparse.so %{ruby_libarchdir}/rbconfig.rb %{ruby_libarchdir}/readline.so -%{ruby_libarchdir}/refinement.so %{ruby_libarchdir}/ripper.so %{ruby_libarchdir}/sdbm.so %{ruby_libarchdir}/socket.so diff --git a/rubygems-1.8.11-binary-extensions.patch b/rubygems-1.8.11-binary-extensions.patch index dc6f85a..4517e0a 100644 --- a/rubygems-1.8.11-binary-extensions.patch +++ b/rubygems-1.8.11-binary-extensions.patch @@ -85,7 +85,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 74d803d..0063c7f 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -649,7 +649,7 @@ TEXT +@@ -641,7 +641,7 @@ TEXT say "This could take a while..." end @@ -178,7 +178,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 0063c7f..83b8fd5 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -649,7 +649,7 @@ TEXT +@@ -641,7 +641,7 @@ TEXT say "This could take a while..." end @@ -226,7 +226,7 @@ diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb index cc32ea4..94d78e0 100644 --- a/lib/rubygems/uninstaller.rb +++ b/lib/rubygems/uninstaller.rb -@@ -234,6 +234,7 @@ class Gem::Uninstaller +@@ -246,6 +246,7 @@ class Gem::Uninstaller File.writable?(spec.base_dir) FileUtils.rm_rf spec.full_gem_path From 924ee344ab87713c6ccb71fced6ce5417fe9e89f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 8 Jan 2013 11:59:38 +0100 Subject: [PATCH 267/529] Escape example command in tapset comment. --- ruby.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruby.spec b/ruby.spec index e2d77c3..767ad62 100644 --- a/ruby.spec +++ b/ruby.spec @@ -534,6 +534,8 @@ sed -i '/^end$/ i\ mkdir -p %{buildroot}%{tapset_dir} sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp +# Escape '*/' in comment. +sed -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp %check DISABLE_TESTS="" From d5af6071346f9056299824aa94d7ebd88ca4d03e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 8 Jan 2013 12:00:25 +0100 Subject: [PATCH 268/529] Add example tapset file. --- ruby.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruby.spec b/ruby.spec index 767ad62..9b67911 100644 --- a/ruby.spec +++ b/ruby.spec @@ -90,6 +90,7 @@ Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archi Source1: operating_system.rb # TODO: Try to push SystemTap support upstream. Source2: libruby.stp +Source3: ruby-exercise.stp # http://redmine.ruby-lang.org/issues/5231 Patch0: ruby-1.9.3-disable-versioned-paths.patch @@ -394,6 +395,9 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. #%%patch13 -p1 %patch14 -p1 +# Provide an example of usage of the tapset: +cp -a %{SOURCE3} . + %build autoconf @@ -790,6 +794,7 @@ make check TESTS="-v $DISABLE_TESTS" %lang(ja) %doc README.ja %doc ChangeLog %doc doc/ChangeLog-* +%doc ruby-exercise.stp %{_datadir}/ri %files -n rubygem-bigdecimal From 152afa6f245c0cfa87ae4d85035d9c028d410400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 8 Jan 2013 13:12:11 +0100 Subject: [PATCH 269/529] Add missing ruby-exercise.stp file. --- ruby-exercise.stp | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 ruby-exercise.stp diff --git a/ruby-exercise.stp b/ruby-exercise.stp new file mode 100644 index 0000000..df9df41 --- /dev/null +++ b/ruby-exercise.stp @@ -0,0 +1,39 @@ +/* Example tapset file. + * + * You can execute the tapset using following command (please adjust the path + * prior running the command, if needed): + * + * stap /usr/share/doc/ruby-2.0.0.0/ruby-exercise.stp -c "ruby -e \"puts 'test'\"" + */ + +probe ruby.cmethod.entry { + printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line); +} + +probe ruby.cmethod.return { + printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line); +} + +probe ruby.method.entry { + printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line); +} + +probe ruby.method.return { + printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line); +} + +probe ruby.gc.mark.begin { printf("%d gc.mark.begin\n", tid()); } + +probe ruby.gc.mark.end { printf("%d gc.mark.end\n", tid()); } + +probe ruby.gc.sweep.begin { printf("%d gc.sweep.begin\n", tid()); } + +probe ruby.gc.sweep.end { printf("%d gc.sweep.end\n", tid()); } + +probe ruby.object.create{ + printf("%d obj.create %s %s:%d\n", tid(), classname, file, line); +} + +probe ruby.raise { + printf("%d raise %s %s:%d\n", tid(), classname, file, line); +} From cd4b13663635b197f0e4eba054c5effb2e659a7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 8 Jan 2013 16:23:30 +0100 Subject: [PATCH 270/529] Move rubygems native extension from gems/exts into gems/%{name}. This allows to provide native extensions for alternative implementations. --- operating_system.rb | 22 +++++++++++----------- ruby.spec | 42 +++++++++++++++++++++--------------------- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/operating_system.rb b/operating_system.rb index b81425f..7b3930e 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -2,15 +2,14 @@ module Gem class << self ## - # Returns a string representing that part or the directory tree that is - # common to all specified directories. + # Returns full path of previous but one directory of dir in path + # E.g. for '/usr/share/ruby', 'ruby', it returns '/usr' - def common_path(dirs) - paths = dirs.collect {|dir| dir.split(File::SEPARATOR)} - uncommon_idx = paths.transpose.each_with_index.find {|dirnames, idx| dirnames.uniq.length > 1}.last - paths[0][0 ... uncommon_idx].join(File::SEPARATOR) + def previous_but_one_dir_to(path, dir) + split_path = path.split(File::SEPARATOR) + File.join(split_path.take_while { |one_dir| one_dir !~ /^#{dir}$/ }[0..-2]) end - private :common_path + private :previous_but_one_dir_to ## # Default gems locations allowed on FHS system (/usr, /usr/share). @@ -19,8 +18,8 @@ module Gem def default_locations @default_locations ||= { - :system => common_path([ConfigMap[:vendorlibdir], ConfigMap[:vendorarchdir]]), - :local => common_path([ConfigMap[:sitelibdir], ConfigMap[:sitearchdir]]) + :system => previous_but_one_dir_to(ConfigMap[:vendordir], ConfigMap[:RUBY_INSTALL_NAME]), + :local => previous_but_one_dir_to(ConfigMap[:sitedir], ConfigMap[:RUBY_INSTALL_NAME]) } end @@ -29,11 +28,12 @@ module Gem # platform independent (:gem_dir) and dependent (:ext_dir) files. def default_dirs + @libdir ||= ConfigMap[:sitelibdir] == ConfigMap[:sitearchdir] ? ConfigMap[:datadir] : ConfigMap[:libdir] @default_dirs ||= Hash[default_locations.collect do |destination, path| [destination, { :bin_dir => File.join(path, ConfigMap[:bindir].split(File::SEPARATOR).last), :gem_dir => File.join(path, ConfigMap[:datadir].split(File::SEPARATOR).last, 'gems'), - :ext_dir => File.join(path, ConfigMap[:libdir].split(File::SEPARATOR).last, 'gems') + :ext_dir => File.join(path, @libdir.split(File::SEPARATOR).last, 'gems') }] end] end @@ -64,7 +64,7 @@ module Gem def default_ext_dir_for base_dir dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} - dirs && File.join(dirs.last[:ext_dir], 'exts') + dirs && File.join(dirs.last[:ext_dir], RbConfig::CONFIG['RUBY_INSTALL_NAME']) end end end diff --git a/ruby.spec b/ruby.spec index 9b67911..699d5b6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -453,7 +453,7 @@ cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF # Common gem locations and files. %%gem_instdir %%{gem_dir}/gems/%%{gem_name}-%%{version} -%%gem_extdir %%{_libdir}/gems/exts/%%{gem_name}-%%{version} +%%gem_extdir %%{_libdir}/gems/%{name}/%%{gem_name}-%%{version} %%gem_libdir %%{gem_instdir}/lib %%gem_cache %%{gem_dir}/cache/%%{gem_name}-%%{version}.gem %%gem_spec %%{gem_dir}/specifications/%%{gem_name}-%%{version}.gemspec @@ -468,7 +468,7 @@ cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults mv %{buildroot}%{ruby_libdir}/gems/2.0.0 %{buildroot}%{gem_dir} # Create folders for gem binary extensions. -mkdir -p %{buildroot}%{gem_extdir}/exts +mkdir -p %{buildroot}%{gem_extdir}/%{name} # Move bundled rubygems to %%gem_dir and %%gem_extdir # make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems @@ -481,25 +481,25 @@ mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_vers mv %{buildroot}%{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib -mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib +mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib mv %{buildroot}%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/specifications ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal -ln -s %{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version}/lib/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so +ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib -mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io +mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io mv %{buildroot}%{gem_dir}/specifications/default/io-console-%{io_console_version}.gemspec %{buildroot}%{gem_dir}/specifications ln -s %{gem_dir}/gems/io-console-%{io_console_version}/lib/io %{buildroot}%{ruby_libdir}/io -ln -s %{_libdir}/gems/exts/io-console-%{io_console_version}/lib/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so +ln -s %{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so mkdir -p %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/lib mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib -mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/exts/json-%{json_version}/lib/ +mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/lib/ mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib @@ -507,9 +507,9 @@ mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{mi mv %{buildroot}%{gem_dir}/specifications/default/minitest-%{minitest_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/exts/psych-%{psych_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib -mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/exts/psych-%{psych_version}/lib/ +mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib/ mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications # Adjust the gemspec files so that the gems will load properly @@ -537,7 +537,7 @@ sed -i '/^end$/ i\ # Install a tapset and fix up the path to the library. mkdir -p %{buildroot}%{tapset_dir} sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ - %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp + %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp # Escape '*/' in comment. sed -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp @@ -753,10 +753,10 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir} %exclude %{gem_dir}/gems/* %{_exec_prefix}/lib*/gems -%exclude %{_exec_prefix}/lib*/gems/exts/bigdecimal-%{bigdecimal_version} -%exclude %{_exec_prefix}/lib*/gems/exts/io-console-%{io_console_version} -%exclude %{_exec_prefix}/lib*/gems/exts/json-%{json_version} -%exclude %{_exec_prefix}/lib*/gems/exts/psych-%{psych_version} +%exclude %{_exec_prefix}/lib*/gems/%{name}/bigdecimal-%{bigdecimal_version} +%exclude %{_exec_prefix}/lib*/gems/%{name}/io-console-%{io_console_version} +%exclude %{_exec_prefix}/lib*/gems/%{name}/json-%{json_version} +%exclude %{_exec_prefix}/lib*/gems/%{name}/psych-%{psych_version} %exclude %{gem_dir}/gems/rake-%{rake_version} %exclude %{gem_dir}/gems/rdoc-%{rdoc_version} %exclude %{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec @@ -800,19 +800,19 @@ make check TESTS="-v $DISABLE_TESTS" %files -n rubygem-bigdecimal %{ruby_libdir}/bigdecimal %{ruby_libarchdir}/bigdecimal.so -%{_libdir}/gems/exts/bigdecimal-%{bigdecimal_version} +%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} %{gem_dir}/gems/bigdecimal-%{bigdecimal_version} %{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec %files -n rubygem-io-console %{ruby_libdir}/io %{ruby_libarchdir}/io/console.so -%{_libdir}/gems/exts/io-console-%{io_console_version} +%{_libdir}/gems/%{name}/io-console-%{io_console_version} %{gem_dir}/gems/io-console-%{io_console_version} %{gem_dir}/specifications/io-console-%{io_console_version}.gemspec %files -n rubygem-json -%{_libdir}/gems/exts/json-%{json_version} +%{_libdir}/gems/%{name}/json-%{json_version} %{gem_dir}/gems/json-%{json_version} %{gem_dir}/specifications/json-%{json_version}.gemspec @@ -821,7 +821,7 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %files -n rubygem-psych -%{_libdir}/gems/exts/psych-%{psych_version} +%{_libdir}/gems/%{name}/psych-%{psych_version} %{gem_dir}/gems/psych-%{psych_version} %{gem_dir}/specifications/psych-%{psych_version}.gemspec From 205b40da9d461f0d996be452be82d40566f7692f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 8 Jan 2013 16:28:55 +0100 Subject: [PATCH 271/529] Bump ruby(abi), since rubygems layout is now incompatible anyway. --- ruby.spec | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ruby.spec b/ruby.spec index 699d5b6..1e8104f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -7,11 +7,7 @@ %global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_version_patch_level %{major_minor_version}.%{teeny_version}.%{patch_level} -# TODO: Fix ruby_api for official release according to -# http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/48984 -# It is kept at 1.9.1 just for testing. All dependent libraries need rebuild. -# %%global ruby_abi %%{major_minor_version}.0 -%global ruby_abi 1.9.1 +%global ruby_abi %{ruby_version} # Specify the named version. It has precedense to revision. #%%global milestone preview2 From a3b6f46f68fcde9d77f4b43c927a04537b193eed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 16 Jan 2013 16:17:47 +0100 Subject: [PATCH 272/529] Upgrade to Ruby 2.0.0 (r38848). --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 1e8104f..f5a2fb8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 38732 +%global revision 38848 %global ruby_archive %{name}-%{ruby_version} From 465cd2abbf21289f6ecdb0f22ad1efe37f4089be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 17 Jan 2013 15:10:39 +0100 Subject: [PATCH 273/529] Provide nonversioned packageconfig (rhbz#789532). --- ruby.spec | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ruby.spec b/ruby.spec index f5a2fb8..1a2e652 100644 --- a/ruby.spec +++ b/ruby.spec @@ -406,7 +406,7 @@ autoconf --with-vendorarchdir='%{ruby_vendorarchdir}' \ --with-rubyhdrdir='%{_includedir}' \ --with-rubygemsdir='%{rubygems_dir}' \ - --with-ruby_pc='%{name}.pc' \ + --with-ruby-pc='%{name}.pc' \ --disable-rpath \ --enable-shared \ --disable-versioned-paths @@ -579,12 +579,7 @@ make check TESTS="-v $DISABLE_TESTS" %{_includedir}/* %{_libdir}/libruby.so -# TODO -# ruby.pc still needs fixing, see bug 789532 comment 8 -%{_libdir}/pkgconfig/ruby.pc -%if 0%{?fedora} <= 18 -%{_libdir}/pkgconfig/ruby-%{major_minor_version}.pc -%endif +%{_libdir}/pkgconfig/%{name}.pc %files libs %doc COPYING From 9814bf8bf6f36a70c7dc14a16ff07c5e24436975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 18 Jan 2013 12:36:59 +0100 Subject: [PATCH 274/529] Remove unneeded patch. --- ...0-r36832-rb_float_value-optimization.patch | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 ruby-2.0-r36832-rb_float_value-optimization.patch diff --git a/ruby-2.0-r36832-rb_float_value-optimization.patch b/ruby-2.0-r36832-rb_float_value-optimization.patch deleted file mode 100644 index 97dc58b..0000000 --- a/ruby-2.0-r36832-rb_float_value-optimization.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 0b89d6d5f9f8c788f4391d8a0499f10aed624371 Mon Sep 17 00:00:00 2001 -From: ko1 -Date: Mon, 27 Aug 2012 09:22:21 +0000 -Subject: [PATCH] * include/ruby/ruby.h (rb_float_value): optimize it. This - technique was pointed by shinichiro.hamaji - . - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 6 ++++++ - include/ruby/ruby.h | 10 +++++----- - 2 files changed, 11 insertions(+), 5 deletions(-) - -diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h -index 3905b32..b8b2267 100644 ---- a/include/ruby/ruby.h -+++ b/include/ruby/ruby.h -@@ -733,10 +733,7 @@ struct RFloat { - rb_float_value(VALUE v) - { - if (FLONUM_P(v)) { -- if (v == (VALUE)0x8000000000000002) { -- return 0.0; -- } -- else { -+ if (v != (VALUE)0x8000000000000002) { /* LIKELY */ - union { - double d; - VALUE v; -@@ -746,9 +743,12 @@ struct RFloat { - /* e: xx1... -> 011... */ - /* xx0... -> 100... */ - /* ^b63 */ -- t.v = RUBY_BIT_ROTR(((b63 ^ 1) << 1) | b63 | (v & ~0x03), 3); -+ t.v = RUBY_BIT_ROTR(2 - b63 | (v & ~0x03), 3); - return t.d; - } -+ else { -+ return 0.0; -+ } - } - else { - return ((struct RFloat *)v)->float_value; --- -1.7.10 - From 2aa9685103198ac924a1d3457b3906c58dd5f0f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 18 Jan 2013 12:37:26 +0100 Subject: [PATCH 275/529] Build against libdb instead of libdb4 (rhbz#894022). --- ruby.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 1a2e652..aeeabe9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -138,11 +138,7 @@ Requires: rubygem(bigdecimal) >= %{bigdecimal_version} BuildRequires: autoconf BuildRequires: gdbm-devel BuildRequires: ncurses-devel -%if 0%{?fedora} >= 19 BuildRequires: libdb-devel -%else -BuildRequires: db4-devel -%endif BuildRequires: libffi-devel BuildRequires: openssl-devel BuildRequires: libyaml-devel From eca05efe334464737efc3280c42ea5bc0f6b44fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 18 Jan 2013 16:28:03 +0100 Subject: [PATCH 276/529] Fix variables provided by ruby.pc (rhbz#789532, comment 8). --- ruby.spec | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/ruby.spec b/ruby.spec index aeeabe9..0dab721 100644 --- a/ruby.spec +++ b/ruby.spec @@ -105,17 +105,9 @@ Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 Patch9: rubygems-1.8.11-binary-extensions.patch -# Opening /dev/tty fails with ENXIO (ref: man 2 open) on koji. -# Let's rescue this -# Fixed in ruby 1.9.3 p327 -#Patch10: ruby-1.9.3-p286-open-devtty-on-koji.patch -# On koji, network related tests sometimes cause internal server error, -# ignore these -Patch10: ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch -# http://bugs.ruby-lang.org/issues/show/7312 -# test_str_crypt fails with glibc 2.17 -# Fixed in 1.9.3 p 362 -#Patch11: ruby-1.9.3-p327-crypt-argument-glibc217.patch +# Fixes issues mentioned in rhbz#789532, comment 8. +# TODO: Should be probably upstreamed with #5281. +Patch10: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch # http://bugs.ruby-lang.org/issues/7629 @@ -382,7 +374,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch8 -p1 %patch9 -p1 %patch10 -p1 -#%%patch11 -p1 %patch12 -p1 #%%patch13 -p1 %patch14 -p1 From e15c1cf2f46a6f9799ffcbf800c9f60083a113c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 21 Jan 2013 18:00:52 +0100 Subject: [PATCH 277/529] Enable most of the PPC test suite. --- ruby.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 0dab721..39123c4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -533,10 +533,20 @@ DISABLE_TESTS="" DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" %endif -%ifnarch ppc ppc64 -make check TESTS="-v $DISABLE_TESTS" +%ifarch ppc ppc64 +# test_ioctl_linux(TestIO) fails with #. +# https://bugs.ruby-lang.org/issues/7718 +DISABLE_TESTS="-x test_io.rb $DISABLE_TESTS" %endif +%ifarch ppc +# test_stack_size(TestFiber) fails. +# https://bugs.ruby-lang.org/issues/7719 +DISABLE_TESTS="-x test_fiber.rb $DISABLE_TESTS" +%endif + +make check TESTS="-v $DISABLE_TESTS" + %post libs -p /sbin/ldconfig %postun libs -p /sbin/ldconfig From f5934325a4c73e2eece05e38fc00eb3db8a974a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 22 Jan 2013 15:52:00 +0100 Subject: [PATCH 278/529] Upgrade to Ruby 2.0.0 (r38894). Enable test_stack_size(TestFiber) on PPC, since it was fixed upstream. --- ...9.3-added-site-and-vendor-arch-flags.patch | 6 ++--- ruby-1.9.3-arch-specific-dir.patch | 6 ++--- ruby-1.9.3-custom-rubygems-location.patch | 2 +- ruby-1.9.3-disable-versioned-paths.patch | 6 ++--- ruby-1.9.3-mkmf-verbose.patch | 2 +- ruby.spec | 8 +------ rubygems-1.8.11-binary-extensions.patch | 22 +++++++++---------- 7 files changed, 23 insertions(+), 29 deletions(-) diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch index 45dbc08..c3b007b 100644 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch @@ -134,7 +134,7 @@ diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 03c3332..79b8e44 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb -@@ -44,6 +44,8 @@ continued_name = nil +@@ -45,6 +45,8 @@ continued_name = nil continued_line = nil path_version = "/$(ruby_version)" archdir_override = "$(vendorlibdir)/$(sitearch)" @@ -143,7 +143,7 @@ index 03c3332..79b8e44 100755 File.foreach "config.status" do |line| next if /^#/ =~ line name = nil -@@ -80,6 +82,8 @@ File.foreach "config.status" do |line| +@@ -81,6 +83,8 @@ File.foreach "config.status" do |line| when /^RUBY_SO_NAME$/; next if $so_name when /^arch$/; if val.empty? then val = arch else arch = val end when /^archdir$/; archdir_override = val; next @@ -152,7 +152,7 @@ index 03c3332..79b8e44 100755 when /^sitearch/; val = '$(arch)' if val.empty? end case val -@@ -214,11 +218,11 @@ print < Date: Tue, 22 Jan 2013 17:06:43 +0100 Subject: [PATCH 279/529] Let Sed escape in original file. --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 08764d3..1da7350 100644 --- a/ruby.spec +++ b/ruby.spec @@ -69,7 +69,7 @@ # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 %global tapset_root %{_datadir}/systemtap -%global tapset_dir %{tapset_root}/tapset/ +%global tapset_dir %{tapset_root}/tapset %global tapset_libdir %(echo %{_libdir} | sed 's/64//')* %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') @@ -522,7 +522,7 @@ mkdir -p %{buildroot}%{tapset_dir} sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp # Escape '*/' in comment. -sed -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp +sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp %check DISABLE_TESTS="" From 8a758df48196e88c99f628511b5dfaf7e22f411c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 24 Jan 2013 15:42:10 +0100 Subject: [PATCH 280/529] Change ruby(abi) -> ruby(release). --- ruby.spec | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ruby.spec b/ruby.spec index 1da7350..1f88f89 100644 --- a/ruby.spec +++ b/ruby.spec @@ -7,7 +7,7 @@ %global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_version_patch_level %{major_minor_version}.%{teeny_version}.%{patch_level} -%global ruby_abi %{ruby_version} +%global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. #%%global milestone preview2 @@ -161,7 +161,7 @@ Ruby or an application embedding Ruby. Summary: Libraries necessary to run Ruby Group: Development/Libraries License: Ruby or BSD -Provides: ruby(abi) = %{ruby_abi} +Provides: ruby(release) = %{ruby_release} %description libs This package includes the libruby, necessary to run Ruby. @@ -172,7 +172,7 @@ Summary: The Ruby standard for packaging ruby libraries Version: %{rubygems_version} Group: Development/Libraries License: Ruby or MIT -Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(release) = %{ruby_release} Requires: rubygem(rdoc) >= %{rdoc_version} Requires: rubygem(io-console) >= %{io_console_version} Requires: rubygem(psych) >= %{psych_version} @@ -202,7 +202,7 @@ Summary: Ruby based make-like utility Version: %{rake_version} Group: Development/Libraries License: Ruby or MIT -Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(release) = %{ruby_release} Requires: ruby(rubygems) >= %{rubygems_version} Provides: rake = %{version}-%{release} Provides: rubygem(rake) = %{version}-%{release} @@ -232,7 +232,7 @@ Summary: A tool to generate HTML and command-line documentation for Ruby proj Version: %{rdoc_version} Group: Development/Libraries License: GPLv2 and Ruby and MIT -Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(release) = %{ruby_release} Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} Requires: rubygem(json) >= %{json_version} @@ -264,7 +264,7 @@ Summary: BigDecimal provides arbitrary-precision floating point decimal arith Version: %{bigdecimal_version} Group: Development/Libraries License: GPL+ or Artistic -Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(release) = %{ruby_release} Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(bigdecimal) = %{version}-%{release} @@ -285,7 +285,7 @@ conversion between base 10 and base 2. Summary: IO/Console is a simple console utilizing library Version: %{io_console_version} Group: Development/Libraries -Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(release) = %{ruby_release} Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(io-console) = %{version}-%{release} @@ -299,7 +299,7 @@ Summary: This is a JSON implementation as a Ruby extension in C Version: %{json_version} Group: Development/Libraries License: Ruby or GPLv2 -Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(release) = %{ruby_release} Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(json) = %{version}-%{release} @@ -315,7 +315,7 @@ Summary: Minitest provides a complete suite of testing facilities Version: %{minitest_version} Group: Development/Libraries License: MIT -Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(release) = %{ruby_release} Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(minitest) = %{version}-%{release} BuildArch: noarch @@ -340,7 +340,7 @@ Summary: A libyaml wrapper for Ruby Version: %{psych_version} Group: Development/Libraries License: MIT -Requires: ruby(abi) = %{ruby_abi} +Requires: ruby(release) = %{ruby_release} Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(psych) = %{version}-%{release} From 21e3c8f22fc6a63cf12297907f39d421d42692c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 24 Jan 2013 16:08:55 +0100 Subject: [PATCH 281/529] Rename ruby executable to ruby-mri, to be prepared for RubyPick. --- ruby.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ruby.spec b/ruby.spec index 1f88f89..7fb7504 100644 --- a/ruby.spec +++ b/ruby.spec @@ -407,10 +407,8 @@ make %{?_smp_mflags} COPY="cp -p" Q= rm -rf %{buildroot} make install DESTDIR=%{buildroot} -# On F-18 and below, also provide %%{hame}-%%{major_minor_version}.pc -%if 0%{?fedora} <= 18 -cp -p %{buildroot}%{_libdir}/pkgconfig/%{name}{,-%{major_minor_version}}.pc -%endif +# Rename the ruby executable. It is replaced by RubyPick. +mv %{buildroot}%{_bindir}/%{name}{,-mri} # Dump the macros into macro.ruby to use them to build other Ruby libraries. mkdir -p %{buildroot}%{_sysconfdir}/rpm @@ -551,7 +549,7 @@ make check TESTS="-v $DISABLE_TESTS" %doc GPL %doc LEGAL %{_bindir}/erb -%{_bindir}/ruby +%{_bindir}/%{name}-mri %{_bindir}/testrb %{_mandir}/man1/erb* %{_mandir}/man1/ruby* From 48c266a57a9b66f0b0a95dda6f3208db950dde02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 24 Jan 2013 16:58:41 +0100 Subject: [PATCH 282/529] Upgrade to Ruby 2.0.0 (r38929). --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 7fb7504..82c0afc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 38894 +%global revision 38929 %global ruby_archive %{name}-%{ruby_version} From 53c48319dd4f241a85c0ab22b6593c3fdcd9cda5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 4 Feb 2013 17:23:28 +0100 Subject: [PATCH 283/529] Drop versioned ruby(release) dependencies. --- ruby.spec | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ruby.spec b/ruby.spec index 82c0afc..17de9c4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -172,7 +172,7 @@ Summary: The Ruby standard for packaging ruby libraries Version: %{rubygems_version} Group: Development/Libraries License: Ruby or MIT -Requires: ruby(release) = %{ruby_release} +Requires: ruby(release) Requires: rubygem(rdoc) >= %{rdoc_version} Requires: rubygem(io-console) >= %{io_console_version} Requires: rubygem(psych) >= %{psych_version} @@ -202,7 +202,7 @@ Summary: Ruby based make-like utility Version: %{rake_version} Group: Development/Libraries License: Ruby or MIT -Requires: ruby(release) = %{ruby_release} +Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rake = %{version}-%{release} Provides: rubygem(rake) = %{version}-%{release} @@ -232,7 +232,7 @@ Summary: A tool to generate HTML and command-line documentation for Ruby proj Version: %{rdoc_version} Group: Development/Libraries License: GPLv2 and Ruby and MIT -Requires: ruby(release) = %{ruby_release} +Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} Requires: rubygem(json) >= %{json_version} @@ -264,7 +264,7 @@ Summary: BigDecimal provides arbitrary-precision floating point decimal arith Version: %{bigdecimal_version} Group: Development/Libraries License: GPL+ or Artistic -Requires: ruby(release) = %{ruby_release} +Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(bigdecimal) = %{version}-%{release} @@ -285,7 +285,7 @@ conversion between base 10 and base 2. Summary: IO/Console is a simple console utilizing library Version: %{io_console_version} Group: Development/Libraries -Requires: ruby(release) = %{ruby_release} +Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(io-console) = %{version}-%{release} @@ -299,7 +299,7 @@ Summary: This is a JSON implementation as a Ruby extension in C Version: %{json_version} Group: Development/Libraries License: Ruby or GPLv2 -Requires: ruby(release) = %{ruby_release} +Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(json) = %{version}-%{release} @@ -315,7 +315,7 @@ Summary: Minitest provides a complete suite of testing facilities Version: %{minitest_version} Group: Development/Libraries License: MIT -Requires: ruby(release) = %{ruby_release} +Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(minitest) = %{version}-%{release} BuildArch: noarch @@ -340,7 +340,7 @@ Summary: A libyaml wrapper for Ruby Version: %{psych_version} Group: Development/Libraries License: MIT -Requires: ruby(release) = %{ruby_release} +Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(psych) = %{version}-%{release} From aa7e2f369c2b097d856e03c922d2f88f7a4a79a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 6 Feb 2013 14:43:39 +0100 Subject: [PATCH 284/529] Upgrade to Ruby 2.0.0 (r39070). --- ruby.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 17de9c4..4afadd1 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 38929 +%global revision 39070 %global ruby_archive %{name}-%{ruby_version} @@ -42,7 +42,7 @@ %global ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir} %global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir} -%global rubygems_version 2.0.0.preview3.1 +%global rubygems_version 2.0.0.rc.2 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -61,7 +61,7 @@ %global irb_version %{ruby_version_patch_level} %global rdoc_version 4.0.0.preview3.1 %global bigdecimal_version 1.1.0 -%global io_console_version 0.3 +%global io_console_version 0.4.1 %global json_version 1.7.5 %global minitest_version 4.3.2 %global psych_version 2.0.0 From 2096cfc8bc632ec21ef2dd210a4fe4b6a48e0b83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 6 Feb 2013 14:45:54 +0100 Subject: [PATCH 285/529] Add ruby(runtime_executable) virtual provide, which is later used by RubyPick. --- ruby.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby.spec b/ruby.spec index 4afadd1..2838762 100644 --- a/ruby.spec +++ b/ruby.spec @@ -140,6 +140,10 @@ BuildRequires: tk-devel BuildRequires: procps BuildRequires: %{_bindir}/dtrace +# This package provides %%{_bindir}/ruby-mri therefore it is marked by this +# virtual provide. It can be installed as dependency of rubypick. +Provides: ruby(runtime_executable) = %{ruby_release} + %description Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text From e811eb017bf2bdf506d354459a0bb149d9f3c921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 6 Feb 2013 16:56:47 +0100 Subject: [PATCH 286/529] Fix "gem install --install-dir" behavior. --- ruby.spec | 17 ++-- rubygems-1.8.11-binary-extensions.patch | 81 ++++++++++++------- ...obal-Specification.dirs-during-insta.patch | 33 ++++++++ 3 files changed, 94 insertions(+), 37 deletions(-) create mode 100644 rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch diff --git a/ruby.spec b/ruby.spec index 2838762..d89f3c5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -110,14 +110,12 @@ Patch9: rubygems-1.8.11-binary-extensions.patch Patch10: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch -# http://bugs.ruby-lang.org/issues/7629 -# https://bugzilla.redhat.com/show_bug.cgi?id=895173 -# save the proc made from the given block -# Fixed in p374 -#Patch13: ruby-1.9.3-p327-PR7629-save-proc.patch -# Fixes issues mentioned in rhbz#789532, comment 8. -# TODO: Should be probably upstreamed with #5281. -Patch14: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch +# This slightly changes behavior of "gem install --install-dir" behavior. +# Without this patch, Specifications.dirs is modified and gems installed on +# the system cannot be required anymore. This causes later issues when RDoc +# documentation should be generated, since json gem is sudenly not accessible. +# https://github.com/rubygems/rubygems/pull/442 +Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -379,8 +377,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch9 -p1 %patch10 -p1 %patch12 -p1 -#%%patch13 -p1 -%patch14 -p1 +%patch13 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . diff --git a/rubygems-1.8.11-binary-extensions.patch b/rubygems-1.8.11-binary-extensions.patch index e158896..43f3599 100644 --- a/rubygems-1.8.11-binary-extensions.patch +++ b/rubygems-1.8.11-binary-extensions.patch @@ -1,14 +1,14 @@ -From 5a37a3489491a33f2e7011043fbbcd9a765e1777 Mon Sep 17 00:00:00 2001 +From ec90622235ae19b28a327cb50a10e0311e8f3d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 3 Nov 2011 16:43:05 +0100 -Subject: [PATCH 1/6] Add dedicate extensions folder into $LOAD_PATH. +Subject: [PATCH 1/7] Add dedicate extensions folder into $LOAD_PATH. --- lib/rubygems/specification.rb | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 97db19e..263e7d3 100644 +index cabdf8d..87b14d2 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1256,6 +1256,12 @@ class Gem::Specification @@ -68,13 +68,13 @@ index 97db19e..263e7d3 100644 # # Formerly used to indicate this gem was RDoc-capable. -- -1.8.0 +1.8.1 -From 671e4285bf9db948bc5f054d7d3d931cdd7a17f8 Mon Sep 17 00:00:00 2001 +From e42819f32fc5d935f7e7189ec4be8bdab0a2cf3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 16 Nov 2011 13:26:48 +0100 -Subject: [PATCH 2/6] Use spec's ext dir for extension installation. +Subject: [PATCH 2/7] Use spec's ext dir for extension installation. --- lib/rubygems/installer.rb | 2 +- @@ -82,7 +82,7 @@ Subject: [PATCH 2/6] Use spec's ext dir for extension installation. 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 74d803d..0063c7f 100644 +index 780a88b..854c177 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -642,7 +642,7 @@ TEXT @@ -95,7 +95,7 @@ index 74d803d..0063c7f 100644 spec.extensions.each do |extension| diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 263e7d3..d31b93b 100644 +index 87b14d2..492ddbe 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1689,16 +1689,15 @@ class Gem::Specification @@ -119,20 +119,20 @@ index 263e7d3..d31b93b 100644 ## -- -1.8.0 +1.8.1 -From 11b4a0cbadd8b1d3320f838881aa60feb6f848e7 Mon Sep 17 00:00:00 2001 +From 0e9dd0655111f7dda805233c79a3771459d9a66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 16 Nov 2011 14:52:16 +0100 -Subject: [PATCH 3/6] Simplify the extending of $LOAD_PATH for binary gems. +Subject: [PATCH 3/7] Simplify the extending of $LOAD_PATH for binary gems. --- lib/rubygems/specification.rb | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index d31b93b..e65ea2d 100644 +index 492ddbe..c703827 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1256,11 +1256,7 @@ class Gem::Specification @@ -161,13 +161,13 @@ index d31b93b..e65ea2d 100644 ## -- -1.8.0 +1.8.1 -From 5d46cd2b1ac9517a9cbcfa430261e62bb3a376b8 Mon Sep 17 00:00:00 2001 +From 9a8556c609e800d0dbd24af416d613f2e82f323c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 9 Dec 2011 16:31:04 +0100 -Subject: [PATCH 4/6] Fix the binary extension search path construction. +Subject: [PATCH 4/7] Fix the binary extension search path construction. --- lib/rubygems/installer.rb | 2 +- @@ -175,7 +175,7 @@ Subject: [PATCH 4/6] Fix the binary extension search path construction. 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 0063c7f..83b8fd5 100644 +index 854c177..f1f2ad7 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb @@ -642,7 +642,7 @@ TEXT @@ -188,7 +188,7 @@ index 0063c7f..83b8fd5 100644 spec.extensions.each do |extension| diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index e65ea2d..8be2ade 100644 +index c703827..fa9ea6e 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1256,7 +1256,7 @@ class Gem::Specification @@ -210,20 +210,20 @@ index e65ea2d..8be2ade 100644 ## -- -1.8.0 +1.8.1 -From 6229583633802b45e5a3e5689ab9077347cd9ef7 Mon Sep 17 00:00:00 2001 +From 476c2f90cc6f5f490858f253a9b23eb19d53d2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 13 Dec 2011 12:14:54 +0100 -Subject: [PATCH 5/6] Remove binary extensions during uninstall. +Subject: [PATCH 5/7] Remove binary extensions during uninstall. --- lib/rubygems/uninstaller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb -index cc32ea4..94d78e0 100644 +index d672b9d..5c31a0c 100644 --- a/lib/rubygems/uninstaller.rb +++ b/lib/rubygems/uninstaller.rb @@ -246,6 +246,7 @@ class Gem::Uninstaller @@ -235,13 +235,13 @@ index cc32ea4..94d78e0 100644 # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) old_platform_name = [spec.name, -- -1.8.0 +1.8.1 -From bc40e1b9f60a9a04456e3504ffe6ee600b6da269 Mon Sep 17 00:00:00 2001 +From 35dc17e86f701fe1be80d98ace79735c535fd570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 13 Dec 2011 14:27:14 +0100 -Subject: [PATCH 6/6] Avoid dependency on customized operating_system.rb. +Subject: [PATCH 6/7] Avoid dependency on customized operating_system.rb. --- lib/rubygems/defaults.rb | 11 +++++++++++ @@ -249,7 +249,7 @@ Subject: [PATCH 6/6] Avoid dependency on customized operating_system.rb. 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index 20b4198..6d8711f 100644 +index ea84e5c..b221954 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb @@ -101,6 +101,17 @@ module Gem @@ -271,7 +271,7 @@ index 20b4198..6d8711f 100644 def self.ruby_engine diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 8be2ade..f54210a 100644 +index fa9ea6e..2b10499 100644 --- a/lib/rubygems/specification.rb +++ b/lib/rubygems/specification.rb @@ -1693,10 +1693,7 @@ class Gem::Specification @@ -287,5 +287,32 @@ index 8be2ade..f54210a 100644 ## -- -1.8.0 +1.8.1 + + +From 0937c0b0a3c2ed08ab5b0875f7f95e24157525c2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 7 Feb 2013 13:07:34 +0100 +Subject: [PATCH 7/7] Fix binary extensions installation when --install-dir is + specified. + +--- + lib/rubygems/installer.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb +index f1f2ad7..e1577fc 100644 +--- a/lib/rubygems/installer.rb ++++ b/lib/rubygems/installer.rb +@@ -642,7 +642,7 @@ TEXT + say "This could take a while..." + end + +- dest_path = File.join spec.ext_dir, spec.require_paths.first ++ dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first) + ran_rake = false # only run rake once + + spec.extensions.each do |extension| +-- +1.8.1 diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch new file mode 100644 index 0000000..8747b88 --- /dev/null +++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -0,0 +1,33 @@ +From 95ee154e3f3d324f5dcd47ed76f26194f727b5d3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 6 Feb 2013 14:07:30 +0100 +Subject: [PATCH] Do not modify global Specification.dirs during installation. + +While gems are installed into --install-dir just fine even without +modifications of Specification.dirs, change in it makes inaccessible +gems already present on the system. +--- + lib/rubygems/dependency_installer.rb | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb +index ed90af0..8b6f93f 100644 +--- a/lib/rubygems/dependency_installer.rb ++++ b/lib/rubygems/dependency_installer.rb +@@ -58,12 +58,7 @@ class Gem::DependencyInstaller + + def initialize(options = {}) + if options[:install_dir] then +- @gem_home = options[:install_dir] +- +- # HACK shouldn't change the global settings +- Gem::Specification.dirs = @gem_home +- Gem.ensure_gem_subdirectories @gem_home +- options[:install_dir] = @gem_home # FIX: because we suck and reuse below ++ Gem.ensure_gem_subdirectories options[:install_dir] + end + + options = DEFAULT_OPTIONS.merge options +-- +1.8.1 + From f4e4d19314846eb56c501cd565a4cdfb6457bb9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 7 Feb 2013 13:25:20 +0100 Subject: [PATCH 287/529] Rename the rubygems patch to follow rubygems version. --- ruby.spec | 2 +- ...y-extensions.patch => rubygems-2.0.0-binary-extensions.patch | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename rubygems-1.8.11-binary-extensions.patch => rubygems-2.0.0-binary-extensions.patch (100%) diff --git a/ruby.spec b/ruby.spec index d89f3c5..55fb132 100644 --- a/ruby.spec +++ b/ruby.spec @@ -104,7 +104,7 @@ Patch4: ruby-1.9.3-fix-s390x-build.patch Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 -Patch9: rubygems-1.8.11-binary-extensions.patch +Patch9: rubygems-2.0.0-binary-extensions.patch # Fixes issues mentioned in rhbz#789532, comment 8. # TODO: Should be probably upstreamed with #5281. Patch10: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch diff --git a/rubygems-1.8.11-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch similarity index 100% rename from rubygems-1.8.11-binary-extensions.patch rename to rubygems-2.0.0-binary-extensions.patch From 10f5cf664baf689033e269d1f8b777ae1f6e8a95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 7 Feb 2013 14:44:59 +0100 Subject: [PATCH 288/529] Add architecture dependency on ruby-libs to ruby-irb. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 55fb132..f6d174a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -219,7 +219,7 @@ specified in standard Ruby syntax. Summary: The Interactive Ruby Version: %{irb_version} Group: Development/Libraries -Requires: %{name}-libs = %{ruby_version_patch_level} +Requires: %{name}-libs%{?_isa} = %{ruby_version_patch_level} Provides: irb = %{version}-%{release} Provides: ruby(irb) = %{version}-%{release} BuildArch: noarch From bf92566673ad56f43e2fec75ad3f02713e5f3f51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Sat, 9 Feb 2013 00:54:37 +0100 Subject: [PATCH 289/529] Upgrade to Ruby 2.0.0 (rc2). --- ...9.3-added-site-and-vendor-arch-flags.patch | 188 ------------------ ruby-1.9.3-always-use-i386.patch | 8 +- ruby-1.9.3-arch-specific-dir.patch | 133 ++----------- ruby-1.9.3-custom-rubygems-location.patch | 32 +-- ruby-1.9.3-disable-versioned-paths.patch | 149 -------------- ruby-1.9.3-fix-s390x-build.patch | 6 +- ...pc-variable-by-configuration-process.patch | 35 ---- ...ed-paths-when-empty-version-string-i.patch | 70 +++++++ ruby.spec | 28 +-- ...obal-Specification.dirs-during-insta.patch | 16 +- 10 files changed, 121 insertions(+), 544 deletions(-) delete mode 100644 ruby-1.9.3-added-site-and-vendor-arch-flags.patch delete mode 100644 ruby-1.9.3-disable-versioned-paths.patch delete mode 100644 ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch create mode 100644 ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch diff --git a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch b/ruby-1.9.3-added-site-and-vendor-arch-flags.patch deleted file mode 100644 index c3b007b..0000000 --- a/ruby-1.9.3-added-site-and-vendor-arch-flags.patch +++ /dev/null @@ -1,188 +0,0 @@ -From be687364922657501e861e9f53f8ec647a73fe00 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Mon, 5 Sep 2011 13:10:47 +0200 -Subject: [PATCH] Added configuration flags for site and vendor architecture - specific directories. - ---- - Makefile.in | 3 +++ - configure.in | 40 ++++++++++++++++++++++++++++++++++++++++ - tool/mkconfig.rb | 8 ++++++-- - version.c | 4 ++++ - 4 files changed, 53 insertions(+), 2 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index 690ff8e..8c7dd98 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -41,6 +41,9 @@ arch = @arch@ - archdir = @archdir@ - sitearch = @sitearch@ - sitedir = @sitedir@ -+sitearchdir= @sitearchdir@ -+vendordir = @vendordir@ -+vendorarchdir = @vendorarchdir@ - ruby_version = @ruby_version@ - - TESTUI = console -diff --git a/configure.in b/configure.in -index 8e4aaec..c65e0c7 100644 ---- a/configure.in -+++ b/configure.in -@@ -3197,6 +3197,15 @@ until SITE_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITE_DIR}"; do - dir="${SITE_DIR}" - done - -+AC_ARG_WITH(sitearchdir, -+ AS_HELP_STRING([--with-sitearchdir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]]]), -+ [sitearchdir=$withval], -+ [sitearchdir='${rubylibprefix}/site_ruby/${arch}']) -+dir="${sitearchdir}" -+until SITEARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${SITEARCH_DIR}"; do -+ dir="${SITEARCH_DIR}" -+done -+ - AC_ARG_WITH(vendordir, - AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), - [vendordir=$withval], -@@ -3206,19 +3215,32 @@ until VENDOR_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDOR_DIR}"; do - dir="${VENDOR_DIR}" - done - -+AC_ARG_WITH(vendorarchdir, -+ AS_HELP_STRING([--with-vendorarchdir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]]]), -+ [vendorarchdir=$withval], -+ [vendorarchdir='${rubylibprefix}/vendor_ruby/${arch}']) -+dir="${vendorarchdir}" -+until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_DIR}"; do -+ dir="${VENDORARCH_DIR}" -+done -+ - if test "${LOAD_RELATIVE+set}"; then - AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) - RUBY_EXEC_PREFIX="" - RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" - RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" - RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" -+ RUBY_SITE_ARCHLIB_PATH="`eval echo "$SITEARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" - RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" -+ RUBY_VENDOR_ARCHLIB_PATH="`eval echo "$VENDORARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" - else - RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`" - RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`" - RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" - RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" -+ RUBY_SITE_ARCHLIB_PATH="`eval echo \\"$SITEARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" - RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" -+ RUBY_VENDOR_ARCHLIB_PATH="`eval echo \\"$VENDORARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" - fi - - pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -@@ -3236,6 +3258,13 @@ AS_CASE(["$RUBY_SITE_LIB_PATH"], - [ - RUBY_SITE_LIB_PATH="\"${RUBY_SITE_LIB_PATH}\"" - ]) -+AS_CASE(["$RUBY_SITE_ARCHLIB_PATH"], -+ ["$RUBY_LIB_PREFIX/"*], [ -+ RUBY_SITE_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_ARCHLIB_PATH\" : \"$pat\"`"'"' -+ ], -+ [ -+ RUBY_SITE_ARCHLIB_PATH="\"${RUBY_SITE_ARCHLIB_PATH}\"" -+ ]) - AS_CASE(["$RUBY_VENDOR_LIB_PATH"], - ["$RUBY_LIB_PREFIX/"*], [ - RUBY_VENDOR_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_LIB_PATH\" : \"$pat\"`"'"' -@@ -3243,6 +3272,13 @@ AS_CASE(["$RUBY_VENDOR_LIB_PATH"], - [ - RUBY_VENDOR_LIB_PATH="\"${RUBY_VENDOR_LIB_PATH}\"" - ]) -+AS_CASE(["$RUBY_VENDOR_ARCHLIB_PATH"], -+ ["$RUBY_LIB_PREFIX/"*], [ -+ RUBY_VENDOR_ARCHLIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_VENDOR_ARCHLIB_PATH\" : \"$pat\"`"'"' -+ ], -+ [ -+ RUBY_VENDOR_ARCHLIB_PATH="\"${RUBY_VENDOR_ARCHLIB_PATH}\"" -+ ]) - pat=`echo "$RUBY_EXEC_PREFIX/" | tr -c '\012' .`'\(.*\)' - AS_CASE(["$RUBY_LIB_PREFIX"], - ["$RUBY_EXEC_PREFIX/"*], [ -@@ -3264,11 +3300,13 @@ if test "x$SITE_DIR" = xno; then - AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) - else - AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB_PATH} !!) -+ AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, ${RUBY_SITE_ARCHLIB_PATH} !!) - fi - if test "x$VENDOR_DIR" = xno; then - AC_DEFINE(NO_RUBY_VENDOR_LIB, [] !!) - else - AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB_PATH} !!) -+ AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, ${RUBY_VENDOR_ARCHLIB_PATH} !!) - fi - - AC_SUBST(arch)dnl -@@ -3276,7 +3314,9 @@ AC_SUBST(sitearch)dnl - AC_SUBST(ruby_version)dnl - AC_SUBST(archdir)dnl - AC_SUBST(sitedir)dnl -+AC_SUBST(sitearchdir)dnl - AC_SUBST(vendordir)dnl -+AC_SUBST(vendorarchdir)dnl - - configure_args=$ac_configure_args - AC_SUBST(configure_args)dnl -diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb -index 03c3332..79b8e44 100755 ---- a/tool/mkconfig.rb -+++ b/tool/mkconfig.rb -@@ -45,6 +45,8 @@ continued_name = nil - continued_line = nil - path_version = "/$(ruby_version)" - archdir_override = "$(vendorlibdir)/$(sitearch)" -+sitearchdir_override = "$(sitelibdir)/$(sitearch)" -+vendorarchdir_override = "$(vendorlibdir)/$(sitearch)" - File.foreach "config.status" do |line| - next if /^#/ =~ line - name = nil -@@ -81,6 +83,8 @@ File.foreach "config.status" do |line| - when /^RUBY_SO_NAME$/; next if $so_name - when /^arch$/; if val.empty? then val = arch else arch = val end - when /^archdir$/; archdir_override = val; next -+ when /^sitearchdir$/; sitearchdir_override = val; next -+ when /^vendorarchdir$/; vendorarchdir_override = val; next - when /^sitearch/; val = '$(arch)' if val.empty? - end - case val -@@ -217,11 +221,11 @@ print < Date: Mon, 19 Nov 2012 14:37:28 +0100 Subject: [PATCH] Always use i386. @@ -8,10 +8,10 @@ Subject: [PATCH] Always use i386. 1 file changed, 2 insertions(+) diff --git a/configure.in b/configure.in -index c65e0c7..748edc9 100644 +index 418b0cb..d26fe5b 100644 --- a/configure.in +++ b/configure.in -@@ -3321,6 +3321,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3320,6 +3320,8 @@ AC_SUBST(vendorarchdir)dnl configure_args=$ac_configure_args AC_SUBST(configure_args)dnl @@ -21,5 +21,5 @@ index c65e0c7..748edc9 100644 arch="universal-${target_os}" AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available, -- -1.8.0 +1.8.1 diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index 8bfce1f..5c24947 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -1,132 +1,27 @@ -From 50d6113cc3752d1810d58b78d9d009662e143041 Mon Sep 17 00:00:00 2001 +From 770799128d4cf0b2908f8cd15d935fc6cc24397a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 8 Sep 2011 15:30:05 +0200 +Date: Fri, 8 Feb 2013 18:20:50 +0100 Subject: [PATCH] Add configuration arch specific dir flag. --- - Makefile.in | 1 + - configure.in | 20 ++++++++++++++++++++ - tool/mkconfig.rb | 4 +++- - version.c | 2 ++ - 4 files changed, 26 insertions(+), 1 deletion(-) + configure.in | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) -diff --git a/Makefile.in b/Makefile.in -index 78d7139..690ff8e 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -38,6 +38,7 @@ libexecdir = @libexecdir@ - datarootdir = @datarootdir@ - datadir = @datadir@ - arch = @arch@ -+archdir = @archdir@ - sitearch = @sitearch@ - sitedir = @sitedir@ - ruby_version = @ruby_version@ diff --git a/configure.in b/configure.in -index db3641b..8e4aaec 100644 +index 7604bb8..418b0cb 100644 --- a/configure.in +++ b/configure.in -@@ -3179,6 +3179,15 @@ else - RUBY_LIB_VERSION="\"${ruby_version}\"" - fi +@@ -3186,6 +3191,10 @@ AC_ARG_WITH(rubylibprefix, + rubylibdir='${rubylibprefix}/${ruby_version}' + rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} +AC_ARG_WITH(archdir, -+ AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]), -+ [archdir=$withval], -+ [archdir='${rubylibprefix}/${arch}']) -+dir="${archdir}" -+until ARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${ARCH_DIR}"; do -+ dir="${ARCH_DIR}" -+done ++ AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]), ++ [rubyarchdir=$withval]) + - AC_ARG_WITH(sitedir, - AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), - [sitedir=$withval], -@@ -3201,16 +3210,25 @@ if test "${LOAD_RELATIVE+set}"; then - AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) - RUBY_EXEC_PREFIX="" - RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" -+ RUBY_ARCH_LIB_PATH="`eval echo "$ARCH_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" - RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" - RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" - else - RUBY_EXEC_PREFIX="`eval echo \\"$exec_prefix/\\" | sed 's|^NONE/|'"$prefix"'/|;s|/$||'`" - RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`" -+ RUBY_ARCH_LIB_PATH="`eval echo \\"$ARCH_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" - RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" - RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" - fi - - pat=`echo "$RUBY_LIB_PREFIX/" | tr -c '\012' .`'\(.*\)' -+AS_CASE(["$RUBY_ARCH_LIB_PATH"], -+ ["$RUBY_LIB_PREFIX/"*], [ -+ RUBY_ARCH_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_ARCH_LIB_PATH\" : \"$pat\"`"'"' -+ ], -+ [ -+ RUBY_ARCH_LIB_PATH="\"${RUBY_ARCH_LIB_PATH}\"" -+ ]) - AS_CASE(["$RUBY_SITE_LIB_PATH"], - ["$RUBY_LIB_PREFIX/"*], [ - RUBY_SITE_LIB_PATH='RUBY_LIB_PREFIX"/'"`expr \"$RUBY_SITE_LIB_PATH\" : \"$pat\"`"'"' -@@ -3241,6 +3259,7 @@ else - fi - AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, "${RUBY_EXEC_PREFIX}") - AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !!) -+AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, ${RUBY_ARCH_LIB_PATH} !!) - if test "x$SITE_DIR" = xno; then - AC_DEFINE(NO_RUBY_SITE_LIB, [] !!) - else -@@ -3255,6 +3274,7 @@ fi - AC_SUBST(arch)dnl - AC_SUBST(sitearch)dnl - AC_SUBST(ruby_version)dnl -+AC_SUBST(archdir)dnl - AC_SUBST(sitedir)dnl - AC_SUBST(vendordir)dnl - -diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb -index d9e26c1..03c3332 100755 ---- a/tool/mkconfig.rb -+++ b/tool/mkconfig.rb -@@ -44,6 +44,7 @@ vars = {} - continued_name = nil - continued_line = nil - path_version = "/$(ruby_version)" -+archdir_override = "$(vendorlibdir)/$(sitearch)" - File.foreach "config.status" do |line| - next if /^#/ =~ line - name = nil -@@ -79,6 +80,7 @@ File.foreach "config.status" do |line| - when /^RUBY_INSTALL_NAME$/; next if $install_name - when /^RUBY_SO_NAME$/; next if $so_name - when /^arch$/; if val.empty? then val = arch else arch = val end -+ when /^archdir$/; archdir_override = val; next - when /^sitearch/; val = '$(arch)' if val.empty? - end - case val -@@ -211,7 +213,7 @@ print(*v_fast) - print(*v_others) - print < -Date: Thu, 25 Aug 2011 14:33:51 +0200 -Subject: [PATCH] Allow to disable versioned paths. - ---- - configure.in | 11 +++++++++++ - lib/rdoc/ri/paths.rb | 4 ++-- - tool/mkconfig.rb | 9 ++++++--- - tool/rbinstall.rb | 2 +- - version.c | 10 ++++++++++ - 5 files changed, 30 insertions(+), 6 deletions(-) - -diff --git a/configure.in b/configure.in -index f2d22ef..db3641b 100644 ---- a/configure.in -+++ b/configure.in -@@ -3346,6 +3346,17 @@ else - fi - AC_SUBST(USE_RUBYGEMS) - -+AC_ARG_ENABLE(versioned-paths, -+ AS_HELP_STRING([--disable-versioned-paths], [disable paths with version number]), -+ [enable_versioned_paths="$enableval"], [enable_versioned_paths=yes]) -+if test x"$enable_versioned_paths" = xno; then -+ AC_DEFINE(DISABLE_VERSIONED_PATHS, 1) -+ USE_VERSIONED_PATHS=NO -+else -+ USE_VERSIONED_PATHS=YES -+fi -+AC_SUBST(USE_VERSIONED_PATHS) -+ - arch_hdrdir="${EXTOUT}/include/${arch}/ruby" - AS_MKDIR_P("${arch_hdrdir}") - config_h="${arch_hdrdir}/config.h" -diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb -index a3c65bf..a4e8559 100644 ---- a/lib/rdoc/ri/paths.rb -+++ b/lib/rdoc/ri/paths.rb -@@ -12,9 +12,9 @@ module RDoc::RI::Paths - version = RbConfig::CONFIG['ruby_version'] - - BASE = if RbConfig::CONFIG.key? 'ridir' then -- File.join RbConfig::CONFIG['ridir'], version -+ File.join [RbConfig::CONFIG['ridir'], RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact - else -- File.join RbConfig::CONFIG['datadir'], 'ri', version -+ File.join [RbConfig::CONFIG['datadir'], 'ri', RbConfig::CONFIG['USE_VERSIONED_PATHS'] == 'YES' ? version : nil].compact - end - - homedir = begin -diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb -index f9d97d3..d9e26c1 100755 ---- a/tool/mkconfig.rb -+++ b/tool/mkconfig.rb -@@ -43,6 +43,7 @@ v_runtime = {} - vars = {} - continued_name = nil - continued_line = nil -+path_version = "/$(ruby_version)" - File.foreach "config.status" do |line| - next if /^#/ =~ line - name = nil -@@ -142,6 +143,8 @@ File.foreach "config.status" do |line| - case name - when "ruby_version" - version = val[/\A"(.*)"\z/, 1] -+ when /^USE_VERSIONED_PATHS$/ -+ path_version = nil if /NO/ =~ val - end - end - # break if /^CEOF/ -@@ -207,15 +210,15 @@ end - print(*v_fast) - print(*v_others) - print < $data_mode) - end -diff --git a/version.c b/version.c -index 26e275a..05e5069 100644 ---- a/version.c -+++ b/version.c -@@ -39,9 +39,15 @@ - #define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby" - #endif - -+#ifdef DISABLE_VERSIONED_PATHS -+#define RUBY_LIB RUBY_LIB_PREFIX -+#define RUBY_SITE_LIB2 RUBY_SITE_LIB -+#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB -+#else - #define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION - #define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION - #define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION -+#endif - #define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH - #define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH - #define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH -@@ -76,8 +82,10 @@ const char ruby_initial_load_paths[] = - RUBY_SITE_THIN_ARCHLIB "\0" - #endif - RUBY_SITE_ARCHLIB "\0" -+#ifndef DISABLE_VERSIONED_PATHS - RUBY_SITE_LIB "\0" - #endif -+#endif - - #ifndef NO_RUBY_VENDOR_LIB - RUBY_VENDOR_LIB2 "\0" -@@ -85,8 +93,10 @@ const char ruby_initial_load_paths[] = - RUBY_VENDOR_THIN_ARCHLIB "\0" - #endif - RUBY_VENDOR_ARCHLIB "\0" -+#ifndef DISABLE_VERSIONED_PATHS - RUBY_VENDOR_LIB "\0" - #endif -+#endif - - RUBY_LIB "\0" - #ifdef RUBY_THIN_ARCHLIB --- -1.8.0 - diff --git a/ruby-1.9.3-fix-s390x-build.patch b/ruby-1.9.3-fix-s390x-build.patch index 5f91aae..3e7056f 100644 --- a/ruby-1.9.3-fix-s390x-build.patch +++ b/ruby-1.9.3-fix-s390x-build.patch @@ -1,4 +1,4 @@ -From d710179fcc088a201339a28fa6a5779da8e6ab62 Mon Sep 17 00:00:00 2001 +From d006c4d04aecbe80469a26a6114b776e9de4e3c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 19 Nov 2012 14:39:19 +0100 Subject: [PATCH] Fix s390x build. @@ -8,7 +8,7 @@ Subject: [PATCH] Fix s390x build. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb -index 72dd6cf..5c6081e 100644 +index 8f3bff8..69e90a1 100644 --- a/ext/tk/extconf.rb +++ b/ext/tk/extconf.rb @@ -114,7 +114,7 @@ def is_macosx? @@ -21,5 +21,5 @@ index 72dd6cf..5c6081e 100644 def check_tcltk_version(version) -- -1.8.0 +1.8.1 diff --git a/ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch b/ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch deleted file mode 100644 index 20dd78d..0000000 --- a/ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch +++ /dev/null @@ -1,35 +0,0 @@ -From bf4959bc763167b2245a5f4c699fcb72afead5a5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 18 Jan 2013 15:51:49 +0100 -Subject: [PATCH] Expand ruby.pc variable by configuration process. - ---- - template/ruby.pc.in | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/template/ruby.pc.in b/template/ruby.pc.in -index 2d6716c..25e42f3 100644 ---- a/template/ruby.pc.in -+++ b/template/ruby.pc.in -@@ -25,12 +25,12 @@ LIBS=@LIBS@ - DLDFLAGS=@DLDFLAGS@ - ruby=${bindir}/${RUBY_INSTALL_NAME}@EXEEXT@ - rubylibprefix=@rubylibprefix@ --rubylibdir=${rubylibprefix}/${ruby_version} --vendordir=${rubylibprefix}/vendor_ruby --sitedir=${rubylibprefix}/site_ruby --rubyarchdir=${rubylibdir}/${arch} --vendorarchdir=${vendordir}/${sitearch} --sitearchdir=${sitedir}/${sitearch} -+rubylibdir=@rubylibprefix@ -+vendordir=@vendordir@ -+sitedir=@sitedir@ -+rubyarchdir=@archdir@ -+vendorarchdir=@vendorarchdir@ -+sitearchdir=@sitearchdir@ - rubyhdrdir=@rubyhdrdir@ - vendorhdrdir=@vendorhdrdir@ - sitehdrdir=@sitehdrdir@ --- -1.8.0.2 - diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch new file mode 100644 index 0000000..1e31179 --- /dev/null +++ b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -0,0 +1,70 @@ +From 5afb0d89ab0e6297b333f45b4bd30a20024e80c7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 8 Feb 2013 22:48:41 +0100 +Subject: [PATCH] Prevent duplicated paths when empty version string is + configured. + +--- + configure.in | 3 +++ + version.c | 10 ++++++++++ + 2 files changed, 13 insertions(+) + +diff --git a/configure.in b/configure.in +index 5850bbf..7604bb8 100644 +--- a/configure.in ++++ b/configure.in +@@ -3265,6 +3265,9 @@ shvar_to_cpp RIDIR "${ridir}" + if test ${RUBY_LIB_VERSION_STYLE+set}; then + AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !!) + else ++ if test "x${ruby_version}" = 'x'; then ++ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1) ++ fi + AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION] !!) + fi + AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX}) +diff --git a/version.c b/version.c +index 282960d..54c4513 100644 +--- a/version.c ++++ b/version.c +@@ -39,9 +39,15 @@ + #define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby" + #endif + ++#ifdef RUBY_LIB_VERSION_BLANK ++#define RUBY_LIB RUBY_LIB_PREFIX ++#define RUBY_SITE_LIB2 RUBY_SITE_LIB ++#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB ++#else + #define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION + #define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION + #define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION ++#endif + #ifndef RUBY_ARCH_LIB_FOR + #define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch + #endif +@@ -77,8 +83,10 @@ const char ruby_initial_load_paths[] = + RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0" + #endif + RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_SITE_LIB "\0" + #endif ++#endif + + #ifndef NO_RUBY_VENDOR_LIB + RUBY_VENDOR_LIB2 "\0" +@@ -86,8 +94,10 @@ const char ruby_initial_load_paths[] = + RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" + #endif + RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_VENDOR_LIB "\0" + #endif ++#endif + + RUBY_LIB "\0" + #ifdef RUBY_THINARCH +-- +1.8.1 + diff --git a/ruby.spec b/ruby.spec index f6d174a..53b2a90 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,6 +11,7 @@ # Specify the named version. It has precedense to revision. #%%global milestone preview2 +%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. %global revision 39070 @@ -59,7 +60,7 @@ # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 4.0.0.preview3.1 +%global rdoc_version 4.0.0.rc.2.1 %global bigdecimal_version 1.1.0 %global io_console_version 0.4.1 %global json_version 1.7.5 @@ -88,12 +89,10 @@ Source1: operating_system.rb Source2: libruby.stp Source3: ruby-exercise.stp -# http://redmine.ruby-lang.org/issues/5231 -Patch0: ruby-1.9.3-disable-versioned-paths.patch -# TODO: Should be submitted upstream? +# http://bugs.ruby-lang.org/issues/7807 +Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +# http://bugs.ruby-lang.org/issues/7808 Patch1: ruby-1.9.3-arch-specific-dir.patch -# http://redmine.ruby-lang.org/issues/5281 -Patch2: ruby-1.9.3-added-site-and-vendor-arch-flags.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. Patch3: ruby-1.9.3-always-use-i386.patch @@ -105,9 +104,6 @@ Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 Patch9: rubygems-2.0.0-binary-extensions.patch -# Fixes issues mentioned in rhbz#789532, comment 8. -# TODO: Should be probably upstreamed with #5281. -Patch10: ruby-2.0.0-Expand-ruby.pc-variable-by-configuration-process.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch # This slightly changes behavior of "gem install --install-dir" behavior. @@ -370,12 +366,10 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch0 -p1 %patch1 -p1 -%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch8 -p1 %patch9 -p1 -%patch10 -p1 %patch12 -p1 %patch13 -p1 @@ -397,7 +391,9 @@ autoconf --with-ruby-pc='%{name}.pc' \ --disable-rpath \ --enable-shared \ - --disable-versioned-paths + --with-ruby-version='' \ + + # Q= makes the build output more verbose and allows to check Fedora # compiler options. @@ -411,6 +407,10 @@ make install DESTDIR=%{buildroot} # Rename the ruby executable. It is replaced by RubyPick. mv %{buildroot}%{_bindir}/%{name}{,-mri} +# Version is empty if --with-ruby-version is specified. +# http://bugs.ruby-lang.org/issues/7807 +sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc + # Dump the macros into macro.ruby to use them to build other Ruby libraries. mkdir -p %{buildroot}%{_sysconfdir}/rpm cat >> %{buildroot}%{_sysconfdir}/rpm/macros.ruby << \EOF @@ -447,7 +447,7 @@ mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults # Move gems root into common direcotry, out of Ruby directory structure. -mv %{buildroot}%{ruby_libdir}/gems/2.0.0 %{buildroot}%{gem_dir} +mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir} # Create folders for gem binary extensions. mkdir -p %{buildroot}%{gem_extdir}/%{name} @@ -538,7 +538,7 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" DISABLE_TESTS="-x test_io.rb $DISABLE_TESTS" %endif -make check TESTS="-v $DISABLE_TESTS" +#make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch index 8747b88..f0585c4 100644 --- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -14,20 +14,16 @@ diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_inst index ed90af0..8b6f93f 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb -@@ -58,12 +58,7 @@ class Gem::DependencyInstaller +@@ -60,9 +60,6 @@ class Gem::DependencyInstaller + @install_dir = options[:install_dir] || Gem.dir - def initialize(options = {}) if options[:install_dir] then -- @gem_home = options[:install_dir] -- -- # HACK shouldn't change the global settings -- Gem::Specification.dirs = @gem_home -- Gem.ensure_gem_subdirectories @gem_home -- options[:install_dir] = @gem_home # FIX: because we suck and reuse below -+ Gem.ensure_gem_subdirectories options[:install_dir] +- # HACK shouldn't change the global settings, needed for -i behavior +- # maybe move to the install command? See also github #442 +- Gem::Specification.dirs = @install_dir + Gem.ensure_gem_subdirectories @install_dir end - options = DEFAULT_OPTIONS.merge options -- 1.8.1 From 14d28871b54fb3d01dfb9214628a03eaaec5013c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 13 Feb 2013 16:33:54 +0100 Subject: [PATCH 290/529] Update rubygems --install-dir patch. --- ruby.spec | 2 +- ...obal-Specification.dirs-during-insta.patch | 96 +++++++++++++++++-- 2 files changed, 87 insertions(+), 11 deletions(-) diff --git a/ruby.spec b/ruby.spec index 53b2a90..df43a70 100644 --- a/ruby.spec +++ b/ruby.spec @@ -110,7 +110,7 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # Without this patch, Specifications.dirs is modified and gems installed on # the system cannot be required anymore. This causes later issues when RDoc # documentation should be generated, since json gem is sudenly not accessible. -# https://github.com/rubygems/rubygems/pull/442 +# https://github.com/rubygems/rubygems/pull/452 Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch index f0585c4..b082597 100644 --- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -1,29 +1,105 @@ -From 95ee154e3f3d324f5dcd47ed76f26194f727b5d3 Mon Sep 17 00:00:00 2001 +From b95b9942361104dc5b7fd08eb4970f893d8c1a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 6 Feb 2013 14:07:30 +0100 -Subject: [PATCH] Do not modify global Specification.dirs during installation. +Date: Wed, 13 Feb 2013 13:12:30 +0100 +Subject: [PATCH 1/2] Remove duplicated check. + +The loaded specifications are rejected already in #gather_dependencies, +so this condition cannot trigger. +--- + lib/rubygems/dependency_installer.rb | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb +index d811f62..dffa8df 100644 +--- a/lib/rubygems/dependency_installer.rb ++++ b/lib/rubygems/dependency_installer.rb +@@ -319,9 +319,6 @@ class Gem::DependencyInstaller + + last = @gems_to_install.size - 1 + @gems_to_install.each_with_index do |spec, index| +- # REFACTOR more current spec set hardcoding, should be abstracted? +- next if Gem::Specification.include?(spec) and index != last +- + # TODO: make this sorta_verbose so other users can benefit from it + say "Installing gem #{spec.full_name}" if Gem.configuration.really_verbose + +-- +1.8.1.2 + + +From 2fa9087b1986db6c7945c0f997fed2bfff5ce06a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 13 Feb 2013 15:47:47 +0100 +Subject: [PATCH 2/2] Do not modify global Specification.dirs during + installation. While gems are installed into --install-dir just fine even without modifications of Specification.dirs, change in it makes inaccessible gems already present on the system. --- - lib/rubygems/dependency_installer.rb | 7 +------ - 1 file changed, 1 insertion(+), 6 deletions(-) + lib/rubygems/dependency_installer.rb | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index ed90af0..8b6f93f 100644 +index dffa8df..841f26a 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb -@@ -60,9 +60,6 @@ class Gem::DependencyInstaller - @install_dir = options[:install_dir] || Gem.dir +@@ -57,17 +57,14 @@ class Gem::DependencyInstaller + # :build_args:: See Gem::Installer::new + + def initialize(options = {}) +- @install_dir = options[:install_dir] || Gem.dir if options[:install_dir] then - # HACK shouldn't change the global settings, needed for -i behavior - # maybe move to the install command? See also github #442 - Gem::Specification.dirs = @install_dir - Gem.ensure_gem_subdirectories @install_dir +- Gem.ensure_gem_subdirectories @install_dir ++ Gem.ensure_gem_subdirectories options[:install_dir] end + options = DEFAULT_OPTIONS.merge options + ++ @install_dir = options[:install_dir] + @bin_dir = options[:bin_dir] + @dev_shallow = options[:dev_shallow] + @development = options[:development] +@@ -91,7 +88,7 @@ class Gem::DependencyInstaller + @installed_gems = [] + @toplevel_specs = nil + +- @cache_dir = options[:cache_dir] || @install_dir ++ @cache_dir = options[:cache_dir] || @install_dir || Gem.dir + + # Set with any errors that SpecFetcher finds while search through + # gemspecs for a dep +@@ -185,7 +182,7 @@ class Gem::DependencyInstaller + # that this isn't dependent only on the currently installed gems + dependency_list.specs.reject! { |spec| + not keep_names.include?(spec.full_name) and +- Gem::Specification.include?(spec) ++ (!@install_dir && Gem::Specification.include?(spec)) + } + + unless dependency_list.ok? or @ignore_dependencies or @force then +@@ -237,7 +234,7 @@ class Gem::DependencyInstaller + to_do.push t.spec + end + +- results.remove_installed! dep ++ results.remove_installed! dep unless @install_dir + + @available << results + results.inject_into_list dependency_list +@@ -349,7 +346,7 @@ class Gem::DependencyInstaller + :force => @force, + :format_executable => @format_executable, + :ignore_dependencies => @ignore_dependencies, +- :install_dir => @install_dir, ++ :install_dir => (@install_dir || Gem.dir), + :security_policy => @security_policy, + :user_install => @user_install, + :wrappers => @wrappers, -- -1.8.1 +1.8.1.2 From f731780a81890119d7a71ff631e1901bfeeb3187 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 14 Feb 2013 15:26:28 +0100 Subject: [PATCH 291/529] Upgrade to Ruby 2.0.0 (r39217). --- ruby-1.9.3-arch-specific-dir.patch | 12 +-- ...ed-paths-when-empty-version-string-i.patch | 14 ++-- ruby.spec | 11 ++- ...s-2.0.0-Fixes-for-empty-ruby-version.patch | 81 +++++++++++++++++++ 4 files changed, 101 insertions(+), 17 deletions(-) create mode 100644 rubygems-2.0.0-Fixes-for-empty-ruby-version.patch diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index 5c24947..2546128 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -1,17 +1,17 @@ -From 770799128d4cf0b2908f8cd15d935fc6cc24397a Mon Sep 17 00:00:00 2001 +From 2e15c6bdac1c145cce0c21677477ced8df26718b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 8 Feb 2013 18:20:50 +0100 Subject: [PATCH] Add configuration arch specific dir flag. --- - configure.in | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) + configure.in | 4 ++++ + 1 file changed, 4 insertions(+) diff --git a/configure.in b/configure.in -index 7604bb8..418b0cb 100644 +index d6af000..1c094a3 100644 --- a/configure.in +++ b/configure.in -@@ -3186,6 +3191,10 @@ AC_ARG_WITH(rubylibprefix, +@@ -3221,6 +3221,10 @@ AC_SUBST(rubylibprefix) rubylibdir='${rubylibprefix}/${ruby_version}' rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} @@ -23,5 +23,5 @@ index 7604bb8..418b0cb 100644 AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -- -1.8.1 +1.8.1.2 diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 1e31179..5a6c79a 100644 --- a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -1,4 +1,4 @@ -From 5afb0d89ab0e6297b333f45b4bd30a20024e80c7 Mon Sep 17 00:00:00 2001 +From 1e109d1a0265dfdde2324a6a97e4225eb4343efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 8 Feb 2013 22:48:41 +0100 Subject: [PATCH] Prevent duplicated paths when empty version string is @@ -10,10 +10,10 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is 2 files changed, 13 insertions(+) diff --git a/configure.in b/configure.in -index 5850bbf..7604bb8 100644 +index e83cfb4..d6af000 100644 --- a/configure.in +++ b/configure.in -@@ -3265,6 +3265,9 @@ shvar_to_cpp RIDIR "${ridir}" +@@ -3308,6 +3308,9 @@ shvar_to_cpp RIDIR "${ridir}" if test ${RUBY_LIB_VERSION_STYLE+set}; then AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !!) else @@ -24,7 +24,7 @@ index 5850bbf..7604bb8 100644 fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX}) diff --git a/version.c b/version.c -index 282960d..54c4513 100644 +index 6ba6453..c78f609 100644 --- a/version.c +++ b/version.c @@ -39,9 +39,15 @@ @@ -43,7 +43,7 @@ index 282960d..54c4513 100644 #ifndef RUBY_ARCH_LIB_FOR #define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch #endif -@@ -77,8 +83,10 @@ const char ruby_initial_load_paths[] = +@@ -79,8 +85,10 @@ const char ruby_initial_load_paths[] = RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" @@ -54,7 +54,7 @@ index 282960d..54c4513 100644 #ifndef NO_RUBY_VENDOR_LIB RUBY_VENDOR_LIB2 "\0" -@@ -86,8 +94,10 @@ const char ruby_initial_load_paths[] = +@@ -88,8 +96,10 @@ const char ruby_initial_load_paths[] = RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" @@ -66,5 +66,5 @@ index 282960d..54c4513 100644 RUBY_LIB "\0" #ifdef RUBY_THINARCH -- -1.8.1 +1.8.1.2 diff --git a/ruby.spec b/ruby.spec index df43a70..3c0dd2c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -11,10 +11,9 @@ # Specify the named version. It has precedense to revision. #%%global milestone preview2 -%global milestone rc2 # Keep the revision enabled for pre-releases from SVN. -%global revision 39070 +%global revision 39217 %global ruby_archive %{name}-%{ruby_version} @@ -63,7 +62,7 @@ %global rdoc_version 4.0.0.rc.2.1 %global bigdecimal_version 1.1.0 %global io_console_version 0.4.1 -%global json_version 1.7.5 +%global json_version 1.7.7 %global minitest_version 4.3.2 %global psych_version 2.0.0 @@ -112,6 +111,9 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # documentation should be generated, since json gem is sudenly not accessible. # https://github.com/rubygems/rubygems/pull/452 Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +# This prevents issues, when ruby configuration specifies --with-ruby-version=''. +# https://github.com/rubygems/rubygems/pull/455 +Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -372,6 +374,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch9 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -538,7 +541,7 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" DISABLE_TESTS="-x test_io.rb $DISABLE_TESTS" %endif -#make check TESTS="-v $DISABLE_TESTS" +make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig diff --git a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch b/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch new file mode 100644 index 0000000..9b275a9 --- /dev/null +++ b/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch @@ -0,0 +1,81 @@ +From c9b2eff36728266052ccfff54d3ac0a0624fd0f1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 14 Feb 2013 11:50:41 +0100 +Subject: [PATCH 1/2] Use File.join insteado of manual path creation. + +This prevents issues, when File.join in #new_default_spec removes +superfluous slashes while they are kept in expected paths. E.g. the test +would fail if ruby configuration specifies --with-ruby-version=''. +--- + test/rubygems/test_gem_commands_contents_command.rb | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb +index 60df53f..35c9631 100644 +--- a/test/rubygems/test_gem_commands_contents_command.rb ++++ b/test/rubygems/test_gem_commands_contents_command.rb +@@ -140,10 +140,10 @@ lib/foo.rb + @cmd.execute + end + +- expected = %W[ +- #{Gem::ConfigMap[:bindir]}/default_command +- #{Gem::ConfigMap[:rubylibdir]}/default/gem.rb +- #{Gem::ConfigMap[:archdir]}/default_gem.so ++ expected = [ ++ File.join(Gem::ConfigMap[:bindir], 'default_command'), ++ File.join(Gem::ConfigMap[:rubylibdir], 'default/gem.rb'), ++ File.join(Gem::ConfigMap[:archdir], 'default_gem.so') + ].sort.join "\n" + + assert_equal expected, @ui.output.chomp +-- +1.8.1.2 + + +From b022cef7b2e6c2d138388a6c2db02cca8c408cc6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 14 Feb 2013 13:35:20 +0100 +Subject: [PATCH 2/2] Do not add last slash to Gem.user_dir if ruby_version + string is empty. + +--- + lib/rubygems/defaults.rb | 4 +++- + test/rubygems/test_gem.rb | 6 ++++-- + 2 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb +index ea84e5c..05c35bb 100644 +--- a/lib/rubygems/defaults.rb ++++ b/lib/rubygems/defaults.rb +@@ -54,7 +54,9 @@ module Gem + # Path for gems in the user's home directory + + def self.user_dir +- File.join Gem.user_home, '.gem', ruby_engine, ConfigMap[:ruby_version] ++ parts = [Gem.user_home, '.gem', ruby_engine] ++ parts << ConfigMap[:ruby_version] unless ConfigMap[:ruby_version].empty? ++ File.join parts + end + + ## +diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb +index bf77009..9ee78f7 100644 +--- a/test/rubygems/test_gem.rb ++++ b/test/rubygems/test_gem.rb +@@ -1186,8 +1186,10 @@ class TestGem < Gem::TestCase + end + + def test_self_user_dir +- assert_equal File.join(@userhome, '.gem', Gem.ruby_engine, +- Gem::ConfigMap[:ruby_version]), Gem.user_dir ++ parts = [@userhome, '.gem', Gem.ruby_engine] ++ parts << Gem::ConfigMap[:ruby_version] unless Gem::ConfigMap[:ruby_version].empty? ++ ++ assert_equal File.join(parts), Gem.user_dir + end + + def test_self_user_home +-- +1.8.1.2 + From 9c188645b496d9bfbc480870b1a9a71c0bf6fdfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 14 Feb 2013 17:13:24 +0100 Subject: [PATCH 292/529] Upgrade to Ruby 2.0.0 (r39237). --- ruby-1.9.3-arch-specific-dir.patch | 2 +- ruby-1.9.3-custom-rubygems-location.patch | 19 +++++++++---------- ruby-1.9.3-mkmf-verbose.patch | 8 ++++---- ...ed-paths-when-empty-version-string-i.patch | 12 ++++++------ ruby.spec | 2 +- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index 2546128..7a79c18 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index d6af000..1c094a3 100644 --- a/configure.in +++ b/configure.in -@@ -3221,6 +3221,10 @@ AC_SUBST(rubylibprefix) +@@ -3188,6 +3188,10 @@ AC_SUBST(rubylibprefix) rubylibdir='${rubylibprefix}/${ruby_version}' rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 368d39b..c0b507a 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -1,4 +1,4 @@ -From 643a3d3af2a3847e730c79515bc586768053119a Mon Sep 17 00:00:00 2001 +From b5e9dc3683cb085aa57e7b12c35a4f21b2cc1482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 11 Nov 2011 13:14:45 +0100 Subject: [PATCH] Allow to install RubyGems into custom location, outside of @@ -6,16 +6,15 @@ Subject: [PATCH] Allow to install RubyGems into custom location, outside of --- configure.in | 8 ++++++++ - tool/mkconfig.rb | 1 + tool/rbinstall.rb | 9 +++++++++ version.c | 4 ++++ - 4 files changed, 22 insertions(+) + 3 files changed, 21 insertions(+) diff --git a/configure.in b/configure.in -index 748edc9..6a16745 100644 +index 1627d12..e064b2b 100644 --- a/configure.in +++ b/configure.in -@@ -3256,6 +3256,13 @@ until VENDORARCH_DIR=`eval echo \\"${dir}\\"`; test "x${dir}" = "x${VENDORARCH_D +@@ -3256,6 +3256,13 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubyarchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -29,7 +28,7 @@ index 748edc9..6a16745 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='""' -@@ -3316,6 +3323,7 @@ @@ AC_SUBST(sitedir)dnl +@@ -3316,6 +3323,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -38,7 +37,7 @@ index 748edc9..6a16745 100644 configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index 17294a2..2757a73 100755 +index 92e54c6..c72dfb6 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -313,6 +313,7 @@ sitelibdir = CONFIG["sitelibdir"] @@ -66,7 +65,7 @@ index 17294a2..2757a73 100755 install?(:local, :arch, :lib) do diff --git a/version.c b/version.c -index 962f39f..979701d 100644 +index 54c4513..d76100b 100644 --- a/version.c +++ b/version.c @@ -99,6 +99,10 @@ const char ruby_initial_load_paths[] = @@ -80,6 +79,6 @@ index 962f39f..979701d 100644 RUBY_LIB "\0" #ifdef RUBY_THINARCH RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0" ---- -1.8.0 +-- +1.8.1.2 diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 30ffea8..de78ad8 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -1,4 +1,4 @@ -From b6f6f0b8cd750e97c15f1b739b1c95d6c1989294 Mon Sep 17 00:00:00 2001 +From ec16398159a161fc77436b4855d489f193b2515b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 19 Nov 2012 15:14:51 +0100 Subject: [PATCH] Verbose mkmf. @@ -8,10 +8,10 @@ Subject: [PATCH] Verbose mkmf. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mkmf.rb b/lib/mkmf.rb -index ded4e89..0870f22 100644 +index 4b6c52e..67a15ee 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1752,7 +1752,7 @@ SRC +@@ -1777,7 +1777,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. @@ -21,5 +21,5 @@ index ded4e89..0870f22 100644 Q = $(Q1:0=@) ECHO1 = $(V:1=@#{CONFIG['NULLCMD']}) -- -1.8.0 +1.8.1.2 diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 5a6c79a..1727e4c 100644 --- a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -1,4 +1,4 @@ -From 1e109d1a0265dfdde2324a6a97e4225eb4343efc Mon Sep 17 00:00:00 2001 +From e943a89efd63dcfb80a0ab8d9a4db37f523f508e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 8 Feb 2013 22:48:41 +0100 Subject: [PATCH] Prevent duplicated paths when empty version string is @@ -10,10 +10,10 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is 2 files changed, 13 insertions(+) diff --git a/configure.in b/configure.in -index e83cfb4..d6af000 100644 +index 5850bbf..7604bb8 100644 --- a/configure.in +++ b/configure.in -@@ -3308,6 +3308,9 @@ shvar_to_cpp RIDIR "${ridir}" +@@ -3265,6 +3265,9 @@ shvar_to_cpp RIDIR "${ridir}" if test ${RUBY_LIB_VERSION_STYLE+set}; then AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !!) else @@ -24,7 +24,7 @@ index e83cfb4..d6af000 100644 fi AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX}) diff --git a/version.c b/version.c -index 6ba6453..c78f609 100644 +index 282960d..54c4513 100644 --- a/version.c +++ b/version.c @@ -39,9 +39,15 @@ @@ -43,7 +43,7 @@ index 6ba6453..c78f609 100644 #ifndef RUBY_ARCH_LIB_FOR #define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch #endif -@@ -79,8 +85,10 @@ const char ruby_initial_load_paths[] = +@@ -77,8 +83,10 @@ const char ruby_initial_load_paths[] = RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" @@ -54,7 +54,7 @@ index 6ba6453..c78f609 100644 #ifndef NO_RUBY_VENDOR_LIB RUBY_VENDOR_LIB2 "\0" -@@ -88,8 +96,10 @@ const char ruby_initial_load_paths[] = +@@ -86,8 +94,10 @@ const char ruby_initial_load_paths[] = RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" diff --git a/ruby.spec b/ruby.spec index 3c0dd2c..706493b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 39217 +%global revision 39237 %global ruby_archive %{name}-%{ruby_version} From 929678a63d1d43dd7a74b8acc9e47ec1b650625f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 15 Feb 2013 18:06:40 +0100 Subject: [PATCH 293/529] Fix installation of binary gems. --- ...obal-Specification.dirs-during-insta.patch | 51 ++++++++++- rubygems-2.0.0-binary-extensions.patch | 84 +++++++++++++++---- 2 files changed, 119 insertions(+), 16 deletions(-) diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch index b082597..c7c4ef7 100644 --- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -1,7 +1,7 @@ From b95b9942361104dc5b7fd08eb4970f893d8c1a54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 13 Feb 2013 13:12:30 +0100 -Subject: [PATCH 1/2] Remove duplicated check. +Subject: [PATCH 1/3] Remove duplicated check. The loaded specifications are rejected already in #gather_dependencies, so this condition cannot trigger. @@ -30,7 +30,7 @@ index d811f62..dffa8df 100644 From 2fa9087b1986db6c7945c0f997fed2bfff5ce06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 13 Feb 2013 15:47:47 +0100 -Subject: [PATCH 2/2] Do not modify global Specification.dirs during +Subject: [PATCH 2/3] Do not modify global Specification.dirs during installation. While gems are installed into --install-dir just fine even without @@ -103,3 +103,50 @@ index dffa8df..841f26a 100644 -- 1.8.1.2 + +From d473204ce920702dd87257db49355929f31530d4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 15 Feb 2013 17:02:44 +0100 +Subject: [PATCH 3/3] Default to Gem.dir as late as possible. + +--- + lib/rubygems/dependency_installer.rb | 2 +- + lib/rubygems/installer.rb | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb +index 841f26a..abcfa0f 100644 +--- a/lib/rubygems/dependency_installer.rb ++++ b/lib/rubygems/dependency_installer.rb +@@ -346,7 +346,7 @@ class Gem::DependencyInstaller + :force => @force, + :format_executable => @format_executable, + :ignore_dependencies => @ignore_dependencies, +- :install_dir => (@install_dir || Gem.dir), ++ :install_dir => @install_dir, + :security_policy => @security_policy, + :user_install => @user_install, + :wrappers => @wrappers, +diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb +index 780a88b..6543130 100644 +--- a/lib/rubygems/installer.rb ++++ b/lib/rubygems/installer.rb +@@ -535,13 +535,13 @@ class Gem::Installer + :bin_dir => nil, + :env_shebang => false, + :force => false, +- :install_dir => Gem.dir, + :only_install_dir => false + }.merge options + + @env_shebang = options[:env_shebang] + @force = options[:force] +- @gem_home = options[:install_dir] ++ @install_dir = options[:install_dir] ++ @gem_home = options[:install_dir] || Gem.dir + @ignore_dependencies = options[:ignore_dependencies] + @format_executable = options[:format_executable] + @security_policy = options[:security_policy] +-- +1.8.1.2 + diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch index 43f3599..359b578 100644 --- a/rubygems-2.0.0-binary-extensions.patch +++ b/rubygems-2.0.0-binary-extensions.patch @@ -1,7 +1,7 @@ From ec90622235ae19b28a327cb50a10e0311e8f3d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 3 Nov 2011 16:43:05 +0100 -Subject: [PATCH 1/7] Add dedicate extensions folder into $LOAD_PATH. +Subject: [PATCH 1/9] Add dedicate extensions folder into $LOAD_PATH. --- lib/rubygems/specification.rb | 32 ++++++++++++++++++++++++++++++-- @@ -68,13 +68,13 @@ index cabdf8d..87b14d2 100644 # # Formerly used to indicate this gem was RDoc-capable. -- -1.8.1 +1.8.1.2 From e42819f32fc5d935f7e7189ec4be8bdab0a2cf3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 16 Nov 2011 13:26:48 +0100 -Subject: [PATCH 2/7] Use spec's ext dir for extension installation. +Subject: [PATCH 2/9] Use spec's ext dir for extension installation. --- lib/rubygems/installer.rb | 2 +- @@ -119,13 +119,13 @@ index 87b14d2..492ddbe 100644 ## -- -1.8.1 +1.8.1.2 From 0e9dd0655111f7dda805233c79a3771459d9a66a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 16 Nov 2011 14:52:16 +0100 -Subject: [PATCH 3/7] Simplify the extending of $LOAD_PATH for binary gems. +Subject: [PATCH 3/9] Simplify the extending of $LOAD_PATH for binary gems. --- lib/rubygems/specification.rb | 11 +++++------ @@ -161,13 +161,13 @@ index 492ddbe..c703827 100644 ## -- -1.8.1 +1.8.1.2 From 9a8556c609e800d0dbd24af416d613f2e82f323c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 9 Dec 2011 16:31:04 +0100 -Subject: [PATCH 4/7] Fix the binary extension search path construction. +Subject: [PATCH 4/9] Fix the binary extension search path construction. --- lib/rubygems/installer.rb | 2 +- @@ -210,13 +210,13 @@ index c703827..fa9ea6e 100644 ## -- -1.8.1 +1.8.1.2 From 476c2f90cc6f5f490858f253a9b23eb19d53d2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 13 Dec 2011 12:14:54 +0100 -Subject: [PATCH 5/7] Remove binary extensions during uninstall. +Subject: [PATCH 5/9] Remove binary extensions during uninstall. --- lib/rubygems/uninstaller.rb | 1 + @@ -235,13 +235,13 @@ index d672b9d..5c31a0c 100644 # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) old_platform_name = [spec.name, -- -1.8.1 +1.8.1.2 From 35dc17e86f701fe1be80d98ace79735c535fd570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 13 Dec 2011 14:27:14 +0100 -Subject: [PATCH 6/7] Avoid dependency on customized operating_system.rb. +Subject: [PATCH 6/9] Avoid dependency on customized operating_system.rb. --- lib/rubygems/defaults.rb | 11 +++++++++++ @@ -287,13 +287,13 @@ index fa9ea6e..2b10499 100644 ## -- -1.8.1 +1.8.1.2 From 0937c0b0a3c2ed08ab5b0875f7f95e24157525c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 7 Feb 2013 13:07:34 +0100 -Subject: [PATCH 7/7] Fix binary extensions installation when --install-dir is +Subject: [PATCH 7/9] Fix binary extensions installation when --install-dir is specified. --- @@ -314,5 +314,61 @@ index f1f2ad7..e1577fc 100644 spec.extensions.each do |extension| -- -1.8.1 +1.8.1.2 + + +From 4d9675cab5decaef3c9f7f91b2f9c9abd2a19cea Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 15 Feb 2013 16:24:29 +0100 +Subject: [PATCH 8/9] mkmf does not create folder for binary extensions + anymore. + +This was dropped in Ruby r37016 for some reasons :/ +--- + lib/rubygems/ext/builder.rb | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb +index d7d953f..812c20c 100644 +--- a/lib/rubygems/ext/builder.rb ++++ b/lib/rubygems/ext/builder.rb +@@ -21,6 +21,10 @@ class Gem::Ext::Builder + mf = mf.gsub(/^RUBYLIBDIR\s*=\s*\$[^$]*/, "RUBYLIBDIR = #{dest_path}") + mf = mf.gsub(/\s*\S+\.time$/, "") + ++ # Folder creation was dropped in r37016 for some reasons :/ ++ target_prefix = mf[/^target_prefix\s*=\s*(.*)/, 1] ++ FileUtils.mkdir_p File.join(dest_path, target_prefix) rescue nil # in case of perms issues -- lame ++ + File.open('Makefile', 'wb') {|f| f.print mf} + + # try to find make program from Ruby configure arguments first +-- +1.8.1.2 + + +From 062a11c59731f5875d5a8821a212c8a41cb84577 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 15 Feb 2013 17:07:07 +0100 +Subject: [PATCH 9/9] Use correct option. + +--- + lib/rubygems/installer.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb +index e1577fc..1492c68 100644 +--- a/lib/rubygems/installer.rb ++++ b/lib/rubygems/installer.rb +@@ -642,7 +642,7 @@ TEXT + say "This could take a while..." + end + +- dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first) ++ dest_path = File.join(@install_dir ? gem_dir : spec.ext_dir, spec.require_paths.first) + ran_rake = false # only run rake once + + spec.extensions.each do |extension| +-- +1.8.1.2 From 2ec8c6e8c95a254c4b7bd7aef4f415efad6d2fe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 19 Feb 2013 10:13:20 +0100 Subject: [PATCH 294/529] Introduce %gem_install macro. --- ruby.spec | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ruby.spec b/ruby.spec index 706493b..2a698b4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -443,6 +443,19 @@ cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF %%gem_cache %%{gem_dir}/cache/%%{gem_name}-%%{version}.gem %%gem_spec %%{gem_dir}/specifications/%%{gem_name}-%%{version}.gemspec %%gem_docdir %%{gem_dir}/doc/%%{gem_name}-%%{version} + +# Install gem into appropriate directory. +# -n Allows to override gem for installation. +%%gem_install(n:) \ +CONFIGURE_ARGS="--with-cflags='%%{optflags}' $CONFIGURE_ARGS" \\\ +gem install \\\ + -V \\\ + --local \\\ + --install-dir .%{gem_dir} \\\ + --bindir .%{_bindir} \\\ + --force \\\ + --document=ri,rdoc \\\ + %%{-n*}%%{!?-n:%{gem_name}-%{version}.gem} EOF # Install custom operating_system.rb. From bb479d9770cd83c318da6dbe1c91c42d7735f0a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 19 Feb 2013 13:46:31 +0100 Subject: [PATCH 295/529] Create the .%{gem_dir} and allow to override gem installation dir. --- ruby.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 2a698b4..1468412 100644 --- a/ruby.spec +++ b/ruby.spec @@ -445,17 +445,20 @@ cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF %%gem_docdir %%{gem_dir}/doc/%%{gem_name}-%%{version} # Install gem into appropriate directory. -# -n Allows to override gem for installation. -%%gem_install(n:) \ +# -n Overrides gem file name for installation. +# -d Set installation directory. +%%gem_install(d:n:) \ +mkdir -p '%%{-d*}%%{!?-d:.%{gem_dir}}' \ +\ CONFIGURE_ARGS="--with-cflags='%%{optflags}' $CONFIGURE_ARGS" \\\ gem install \\\ -V \\\ --local \\\ - --install-dir .%{gem_dir} \\\ + --install-dir '%%{-d*}%%{!?-d:.%{gem_dir}}' \\\ --bindir .%{_bindir} \\\ --force \\\ --document=ri,rdoc \\\ - %%{-n*}%%{!?-n:%{gem_name}-%{version}.gem} + '%%{-n*}%%{!?-n:%{gem_name}-%{version}.gem}' EOF # Install custom operating_system.rb. From 03c34a7e1f37ea8670bf9c6034ea3961de15e1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 21 Feb 2013 09:58:27 +0100 Subject: [PATCH 296/529] Macros should not be expanded during Ruby build. --- ruby.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 1468412..fca2c65 100644 --- a/ruby.spec +++ b/ruby.spec @@ -448,17 +448,17 @@ cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF # -n Overrides gem file name for installation. # -d Set installation directory. %%gem_install(d:n:) \ -mkdir -p '%%{-d*}%%{!?-d:.%{gem_dir}}' \ +mkdir -p %%{-d*}%%{!?-d:.%%{gem_dir}} \ \ CONFIGURE_ARGS="--with-cflags='%%{optflags}' $CONFIGURE_ARGS" \\\ gem install \\\ -V \\\ --local \\\ - --install-dir '%%{-d*}%%{!?-d:.%{gem_dir}}' \\\ - --bindir .%{_bindir} \\\ + --install-dir %%{-d*}%%{!?-d:.%%{gem_dir}} \\\ + --bindir .%%{_bindir} \\\ --force \\\ --document=ri,rdoc \\\ - '%%{-n*}%%{!?-n:%{gem_name}-%{version}.gem}' + %%{-n*}%%{!?-n:%%{gem_name}-%%{version}.gem} EOF # Install custom operating_system.rb. From cdd0186c3116d5fc6a6316503aae9c9ec9827730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 21 Feb 2013 14:36:05 +0100 Subject: [PATCH 297/529] Upgrade to Ruby 2.0.0 (r39357). --- ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-arch-specific-dir.patch | 2 +- ruby-1.9.3-custom-rubygems-location.patch | 12 ++++++------ ...uplicated-paths-when-empty-version-string-i.patch | 2 +- ruby.spec | 10 +++++++--- ...dify-global-Specification.dirs-during-insta.patch | 2 +- rubygems-2.0.0-binary-extensions.patch | 8 ++++---- 7 files changed, 21 insertions(+), 17 deletions(-) diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index bcb3a08..dec6994 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 418b0cb..d26fe5b 100644 --- a/configure.in +++ b/configure.in -@@ -3320,6 +3320,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3362,6 +3362,8 @@ AC_SUBST(vendorarchdir)dnl configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index 7a79c18..e32814b 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index d6af000..1c094a3 100644 --- a/configure.in +++ b/configure.in -@@ -3188,6 +3188,10 @@ AC_SUBST(rubylibprefix) +@@ -3217,6 +3217,10 @@ AC_SUBST(rubylibprefix) rubylibdir='${rubylibprefix}/${ruby_version}' rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index c0b507a..4a3e7cb 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -14,9 +14,9 @@ diff --git a/configure.in b/configure.in index 1627d12..e064b2b 100644 --- a/configure.in +++ b/configure.in -@@ -3256,6 +3256,13 @@ AC_ARG_WITH(vendorarchdir, +@@ -3292,6 +3292,13 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], - [vendorarchdir=${multiarch+'${rubyarchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) + [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) +AC_ARG_WITH(rubygemsdir, + AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]), @@ -25,10 +25,10 @@ index 1627d12..e064b2b 100644 + AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir" !!) +fi + - if test "${LOAD_RELATIVE+set}"; then - AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) - RUBY_EXEC_PREFIX='""' -@@ -3316,6 +3323,7 @@ AC_SUBST(sitearchdir)dnl + unexpand_shvar rubylibprefix exec_prefix libdir RUBY_BASE_NAME + unexpand_shvar rubyarchprefix exec_prefix libdir arch RUBY_BASE_NAME archlibdir rubylibprefix + unexpand_shvar rubysitearchprefix exec_prefix libdir sitearch arch RUBY_BASE_NAME archlibdir sitearchlibdir rubylibprefix +@@ -3358,6 +3365,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 1727e4c..a6a8106 100644 --- a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index 5850bbf..7604bb8 100644 --- a/configure.in +++ b/configure.in -@@ -3265,6 +3265,9 @@ shvar_to_cpp RIDIR "${ridir}" +@@ -3306,6 +3306,9 @@ unexpand_shvar exec_prefix prefix if test ${RUBY_LIB_VERSION_STYLE+set}; then AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !!) else diff --git a/ruby.spec b/ruby.spec index fca2c65..e4ca8f6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 39237 +%global revision 39357 %global ruby_archive %{name}-%{ruby_version} @@ -42,7 +42,7 @@ %global ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir} %global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir} -%global rubygems_version 2.0.0.rc.2 +%global rubygems_version 2.0.0 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -59,7 +59,7 @@ # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 4.0.0.rc.2.1 +%global rdoc_version 4.0.0 %global bigdecimal_version 1.1.0 %global io_console_version 0.4.1 %global json_version 1.7.7 @@ -557,6 +557,10 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" DISABLE_TESTS="-x test_io.rb $DISABLE_TESTS" %endif +# The TestRbConfig errors, which does not respect configuration options. +# http://bugs.ruby-lang.org/issues/7902 +DISABLE_TESTS="-x test_rbconfig.rb $DISABLE_TESTS" + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch index c7c4ef7..a6d2334 100644 --- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -131,7 +131,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 780a88b..6543130 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -535,13 +535,13 @@ class Gem::Installer +@@ -536,13 +536,13 @@ class Gem::Installer :bin_dir => nil, :env_shebang => false, :force => false, diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch index 359b578..d826472 100644 --- a/rubygems-2.0.0-binary-extensions.patch +++ b/rubygems-2.0.0-binary-extensions.patch @@ -85,7 +85,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 780a88b..854c177 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -642,7 +642,7 @@ TEXT +@@ -645,7 +645,7 @@ TEXT say "This could take a while..." end @@ -178,7 +178,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 854c177..f1f2ad7 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -642,7 +642,7 @@ TEXT +@@ -645,7 +645,7 @@ TEXT say "This could take a while..." end @@ -304,7 +304,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index f1f2ad7..e1577fc 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -642,7 +642,7 @@ TEXT +@@ -645,7 +645,7 @@ TEXT say "This could take a while..." end @@ -360,7 +360,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index e1577fc..1492c68 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -642,7 +642,7 @@ TEXT +@@ -645,7 +645,7 @@ TEXT say "This could take a while..." end From 56d12042aa2ea78e84a114d1efa58f7345536379 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 21 Feb 2013 14:37:50 +0100 Subject: [PATCH 298/529] Ensure that rubygem-bigdecimal has higher release then the one from Ruby 1.9.3. --- ruby.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e4ca8f6..fc62915 100644 --- a/ruby.spec +++ b/ruby.spec @@ -27,6 +27,7 @@ %global release 1 +%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global ruby_libdir %{_datadir}/%{name} %global ruby_libarchdir %{_libdir}/%{name} @@ -77,7 +78,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} -Release: %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist} +Release: %{release_string} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -262,6 +263,11 @@ This package contains documentation for %{name}. %package -n rubygem-bigdecimal Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic Version: %{bigdecimal_version} +# This could colide with previous releases of bigdecimal. Prefix +# the bigdecimal release number with Ruby version to avoid collisions (this +# breaks prerelease versioning, but I see no way around). +# https://bugs.ruby-lang.org/issues/7761 +Release: %{major_version}%{minor_version}%{teeny_version}.%{release_string} Group: Development/Libraries License: GPL+ or Artistic Requires: ruby(release) From 111d4ef777cc4646d10ae7d3773c81ba32220941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 21 Feb 2013 15:52:32 +0100 Subject: [PATCH 299/529] Add reference to upstream ticket possibly removing one patch. --- ruby.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruby.spec b/ruby.spec index fc62915..415eee8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -103,6 +103,8 @@ Patch4: ruby-1.9.3-fix-s390x-build.patch Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 +# Note that 8th patch might be resolved by +# https://bugs.ruby-lang.org/issues/7897 Patch9: rubygems-2.0.0-binary-extensions.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch From deee8f95aa71ec388378be73104d129240f11fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 09:09:33 +0100 Subject: [PATCH 300/529] Revert "Add architecture dependency on ruby-libs to ruby-irb." This reverts commit d3938ffb0a8cf3e4917fd8a2ad8e491791ff23d0, since it produces build error: BuildError: mismatch when analyzing ruby-irb-2.0.0.0-0.1.r39357.fc19.noarch.rpm, rpmdiff output was: removed REQUIRES ruby-libs(x86-64) = 2.0.0.0 added REQUIRES ruby-libs(x86-32) = 2.0.0.0 --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 415eee8..0bc18d7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -220,7 +220,7 @@ specified in standard Ruby syntax. Summary: The Interactive Ruby Version: %{irb_version} Group: Development/Libraries -Requires: %{name}-libs%{?_isa} = %{ruby_version_patch_level} +Requires: %{name}-libs = %{ruby_version_patch_level} Provides: irb = %{version}-%{release} Provides: ruby(irb) = %{version}-%{release} BuildArch: noarch From 58664af968a5e7482f9fb6aa04e5a6557590c106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 11:52:15 +0100 Subject: [PATCH 301/529] Adjust the patch to pass test_archdirs(TestRbConfig). This is hopefuly better aligned with upstream intentions. --- ruby-1.9.3-arch-specific-dir.patch | 4 ++-- ruby.spec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch index e32814b..fcdc2fc 100644 --- a/ruby-1.9.3-arch-specific-dir.patch +++ b/ruby-1.9.3-arch-specific-dir.patch @@ -15,8 +15,8 @@ index d6af000..1c094a3 100644 rubylibdir='${rubylibprefix}/${ruby_version}' rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} -+AC_ARG_WITH(archdir, -+ AS_HELP_STRING([--with-archdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]), ++AC_ARG_WITH(rubyarchdir, ++ AS_HELP_STRING([--with-rubyarchdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]), + [rubyarchdir=$withval]) + rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} diff --git a/ruby.spec b/ruby.spec index 0bc18d7..d369ac3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -392,7 +392,7 @@ autoconf %configure \ --with-rubylibprefix='%{ruby_libdir}' \ - --with-archdir='%{ruby_libarchdir}' \ + --with-rubyarchdir='%{ruby_libarchdir}' \ --with-sitedir='%{ruby_sitelibdir}' \ --with-sitearchdir='%{ruby_sitearchdir}' \ --with-vendordir='%{ruby_vendorlibdir}' \ From 72e167a6f8203ec407fa9115e60a049e5991681f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 12:08:37 +0100 Subject: [PATCH 302/529] One PPC error was fixed, other was introduced. --- ruby.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index d369ac3..ce2cd8b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -560,9 +560,9 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" %endif %ifarch ppc ppc64 -# test_ioctl_linux(TestIO) fails with #. -# https://bugs.ruby-lang.org/issues/7718 -DISABLE_TESTS="-x test_io.rb $DISABLE_TESTS" +# test_spawn_too_long_path(TestProcess) fails with [Errno::ENOENT, Errno::E2BIG, nil] expected but nothing was raised. +# https://bugs.ruby-lang.org/issues/7904 +DISABLE_TESTS="-x test_process.rb $DISABLE_TESTS" %endif # The TestRbConfig errors, which does not respect configuration options. From 65fdd909e82e0d4103bfe60b0e569000e904e109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 12:09:14 +0100 Subject: [PATCH 303/529] Change to backport error number. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index ce2cd8b..e111f17 100644 --- a/ruby.spec +++ b/ruby.spec @@ -566,7 +566,7 @@ DISABLE_TESTS="-x test_process.rb $DISABLE_TESTS" %endif # The TestRbConfig errors, which does not respect configuration options. -# http://bugs.ruby-lang.org/issues/7902 +# http://bugs.ruby-lang.org/issues/7912 DISABLE_TESTS="-x test_rbconfig.rb $DISABLE_TESTS" make check TESTS="-v $DISABLE_TESTS" From 9bef4a9bb17de74ab6d6dbc91537dd773905c7f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 12:24:10 +0100 Subject: [PATCH 304/529] Upgrade to Ruby 2.0.0 (r39387). --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e111f17..bc342e7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 39357 +%global revision 39387 %global ruby_archive %{name}-%{ruby_version} From 565e8feaf28036556a21e59eb446af94b0a48023 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 12:25:06 +0100 Subject: [PATCH 305/529] Fix rubygem-bigdecimal version. Upstream patch applied, until it is backported for 2.0.0. --- ruby.spec | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index bc342e7..aba1f66 100644 --- a/ruby.spec +++ b/ruby.spec @@ -61,7 +61,7 @@ # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} %global rdoc_version 4.0.0 -%global bigdecimal_version 1.1.0 +%global bigdecimal_version 1.2.0 %global io_console_version 0.4.1 %global json_version 1.7.7 %global minitest_version 4.3.2 @@ -93,6 +93,9 @@ Source3: ruby-exercise.stp Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch # http://bugs.ruby-lang.org/issues/7808 Patch1: ruby-1.9.3-arch-specific-dir.patch +# Fixes rubygem-bigdecimla version. +# https://bugs.ruby-lang.org/issues/7761 +Patch2: ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. Patch3: ruby-1.9.3-always-use-i386.patch @@ -265,11 +268,6 @@ This package contains documentation for %{name}. %package -n rubygem-bigdecimal Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic Version: %{bigdecimal_version} -# This could colide with previous releases of bigdecimal. Prefix -# the bigdecimal release number with Ruby version to avoid collisions (this -# breaks prerelease versioning, but I see no way around). -# https://bugs.ruby-lang.org/issues/7761 -Release: %{major_version}%{minor_version}%{teeny_version}.%{release_string} Group: Development/Libraries License: GPL+ or Artistic Requires: ruby(release) @@ -376,6 +374,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch0 -p1 %patch1 -p1 +%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch8 -p1 From 19c0535a63c8fb11b2dd5fc7719898ba7dc320b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 13:43:34 +0100 Subject: [PATCH 306/529] Fix random WEBRick test failures. --- ruby-1.9.3.p195-fix-webrick-tests.patch | 13 +++++++++++++ ruby.spec | 4 ++++ 2 files changed, 17 insertions(+) create mode 100644 ruby-1.9.3.p195-fix-webrick-tests.patch diff --git a/ruby-1.9.3.p195-fix-webrick-tests.patch b/ruby-1.9.3.p195-fix-webrick-tests.patch new file mode 100644 index 0000000..b340bff --- /dev/null +++ b/ruby-1.9.3.p195-fix-webrick-tests.patch @@ -0,0 +1,13 @@ +diff --git a/test/runner.rb b/test/runner.rb +index 49844c7..8e59a85 100644 +--- a/test/runner.rb ++++ b/test/runner.rb +@@ -2,6 +2,8 @@ require 'rbconfig' + + require 'test/unit' + ++require_relative 'ruby/envutil' ++ + src_testdir = File.dirname(File.realpath(__FILE__)) + $LOAD_PATH << src_testdir + module Gem diff --git a/ruby.spec b/ruby.spec index aba1f66..f5d1308 100644 --- a/ruby.spec +++ b/ruby.spec @@ -101,6 +101,9 @@ Patch2: ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch Patch3: ruby-1.9.3-always-use-i386.patch # http://redmine.ruby-lang.org/issues/5465 Patch4: ruby-1.9.3-fix-s390x-build.patch +# Fixes random WEBRick test failures. +# https://bugs.ruby-lang.org/issues/6573. +Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 Patch8: ruby-1.9.3-custom-rubygems-location.patch @@ -377,6 +380,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %patch8 -p1 %patch9 -p1 %patch12 -p1 From a97a9bad50e5c3163a066171530834c671126931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 14:36:35 +0100 Subject: [PATCH 307/529] Update changelog entry. --- ruby.spec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/ruby.spec b/ruby.spec index f5d1308..e1b8db0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -850,6 +850,23 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Feb 22 2013 V鱈t Ondruch - 2.0.0.0-0.1.r39387 +- Upgrade to Ruby 2.0.0 (r39387). +- Introduce %%gem_install macro. +- Build against libdb instead of libdb4 (rhbz#894022). +- Move native extensions from exts to ruby directory. +- Enable most of the PPC test suite. +- Change ruby(abi) -> ruby(release). +- Rename ruby executable to ruby-mri, to be prepared for RubyPick. +- Add ruby(runtime_executable) virtual provide, which is later used + by RubyPick. +- RDoc now depends on JSON. +- Try to make -doc subpackage noarch again, since the new RDoc should resolve + the arch dependent issues (https://github.com/rdoc/rdoc/issues/71). +- Enable SystemTap support. +- Add TapSet for Ruby. +- Split Psych into rubygem-psych subpackage. + * Mon Feb 11 2013 Mamoru TASAKA - 1.9.3.385-28 - Update to 1.9.3 p385 From 7e85d9bf7b07520ae8274f83a7d0133520495a43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 14:50:53 +0100 Subject: [PATCH 308/529] Hopefuly replaced by ruby-1.9.3.p195-fix-webrick-tests.patch. --- ...ignore-internal-server-error-on-test.patch | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100644 ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch diff --git a/ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch b/ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch deleted file mode 100644 index ab37119..0000000 --- a/ruby-1.9.3-p327-ignore-internal-server-error-on-test.patch +++ /dev/null @@ -1,49 +0,0 @@ ---- ruby-1.9.3-p327/test/webrick/test_cgi.rb.koji 2012-08-28 00:40:30.000000000 +0900 -+++ ruby-1.9.3-p327/test/webrick/test_cgi.rb 2012-11-10 16:33:36.000000000 +0900 -@@ -28,6 +28,15 @@ - end - - def test_cgi -+''' -+On koji: -+test_cgi(TestWEBrickCGI) [/builddir/build/BUILD/ruby-1.9.3-p327/test/webrick/test_cgi.rb:34]: -+.... -+.... -+<"/webrick.cgi"> expected but was -+<"\n\n Internal Server Error\n \n

Internal Server Error

\n Broken pipe\n
\n
\n WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) OpenSSL/1.0.1c at\n 127.0.0.1:58617\n
\n \n\n">. -+''' -+ return # Skip on koji - start_cgi_server{|server, addr, port, log| - http = Net::HTTP.new(addr, port) - req = Net::HTTP::Get.new("/webrick.cgi") -@@ -84,6 +93,13 @@ - end - - def test_bad_request -+''' -+On koji: -+test_bad_request(TestWEBrickCGI) [/builddir/build/BUILD/ruby-1.9.3-p327/test/webrick/test_cgi.rb:96]: -+.... -+Expected /\AHTTP\/\d.\d 400 Bad Request/ to match "HTTP/1.1 500 Internal Server Error \r\nContent-Type: text/html; charset=ISO-8859-1\r\nServer: WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) OpenSSL/1.0.1c\r\nDate: Sat, 10 Nov 2012 07:17:08 GMT\r\nContent-Length: 307\r\nConnection: close\r\n\r\n\n\n Internal Server Error\n \n

Internal Server Error

\n Broken pipe\n
\n
\n WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10) OpenSSL/1.0.1c at\n localhost:41188\n
\n \n\n". -+''' -+ return # Skip on koji - start_cgi_server{|server, addr, port, log| - sock = TCPSocket.new(addr, port) - begin ---- ruby-1.9.3-p327/test/webrick/test_filehandler.rb.koji 2012-08-28 00:40:30.000000000 +0900 -+++ ruby-1.9.3-p327/test/webrick/test_filehandler.rb 2012-11-10 16:33:02.000000000 +0900 -@@ -244,6 +244,14 @@ - end - - def test_script_disclosure -+''' -+On koji: -+test_script_disclosure(WEBrick::TestFileHandler) [/builddir/build/BUILD/ruby-1.9.3-p327/test/webrick/test_filehandler.rb:265]: -+.... -+<"200"> expected but was -+<"500">. -+''' -+ return # Skip on koji - config = { - :CGIInterpreter => TestWEBrick::RubyBin, - :DocumentRoot => File.dirname(__FILE__), From eedc10e71bc60c89fa4ae14d4e10a7e4e5bece1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 15:28:37 +0100 Subject: [PATCH 309/529] Add missing patch. --- .gitignore | 1 + ...mal-bigdecimal.gemspec-bump-to-1.2.0.patch | 31 +++++++++++++++++++ sources | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch diff --git a/.gitignore b/.gitignore index f5ae591..01e3dda 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.9.3-p362.tar.gz /ruby-1.9.3-p374.tar.gz /ruby-1.9.3-p385.tar.gz +/ruby-2.0.0-r39387.tar.gz diff --git a/ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch b/ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch new file mode 100644 index 0000000..15a8edf --- /dev/null +++ b/ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch @@ -0,0 +1,31 @@ +From c42cf83f26309b0cba46917f79d20d680e667054 Mon Sep 17 00:00:00 2001 +From: mrkn +Date: Tue, 19 Feb 2013 11:50:48 +0000 +Subject: [PATCH] * ext/bigdecimal/bigdecimal.gemspec: bump to 1.2.0. + [ruby-core:51777] [Bug #7761] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ext/bigdecimal/bigdecimal.gemspec | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec +index 362808c..4240f82 100644 +--- a/ext/bigdecimal/bigdecimal.gemspec ++++ b/ext/bigdecimal/bigdecimal.gemspec +@@ -1,10 +1,10 @@ + # -*- ruby -*- +-_VERSION = "1.1.0" ++_VERSION = "1.2.0" + + Gem::Specification.new do |s| + s.name = "bigdecimal" + s.version = _VERSION +- s.date = "2011-07-30" ++ s.date = "2012-02-19" + s.summary = "Arbitrary-precision decimal floating-point number library." + s.homepage = "http://www.ruby-lang.org" + s.email = "mrkn@mrkn.jp" +-- +1.8.1.2 + diff --git a/sources b/sources index 2c2210c..e9ec93d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -3e0d7f8512400c1a6732327728a56f1d ruby-1.9.3-p385.tar.gz +6e9c4c75894dfebd5bf3b75989237662 ruby-2.0.0-r39387.tar.gz From 12131c17275d4efc43fc83adf6c8dfd797f540d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Feb 2013 21:54:38 +0100 Subject: [PATCH 310/529] Fix issues with wrong value of Rubygem's shebang introduced in r39267. --- ruby-2.0.0-revert-unexpand-exec-prefix.patch | 43 ++++++++++++++++++++ ruby.spec | 9 +++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 ruby-2.0.0-revert-unexpand-exec-prefix.patch diff --git a/ruby-2.0.0-revert-unexpand-exec-prefix.patch b/ruby-2.0.0-revert-unexpand-exec-prefix.patch new file mode 100644 index 0000000..2a38296 --- /dev/null +++ b/ruby-2.0.0-revert-unexpand-exec-prefix.patch @@ -0,0 +1,43 @@ +* Unmerged path ChangeLog +diff --git a/configure.in b/configure.in +index be7d4fe..2d511e5 100644 +--- a/configure.in ++++ b/configure.in +@@ -2597,14 +2597,9 @@ AS_CASE(["$target_os"], + + AC_SUBST(setup) + +-test x"$prefix" = xNONE && prefix=$ac_default_prefix +-test x"${exec_prefix}" = xNONE && exec_prefix="$prefix" +-pat=`echo "${exec_prefix}" | tr -c '\012' .`'\(.*\)' +-for var in bindir libdir; do +- eval val='"$'$var'"' +- AS_CASE(["$val"], ["${exec_prefix}"*], [val='${exec_prefix}'"`expr \"$val\" : \"$pat\"`"]) +- eval $var='"$val"' +-done ++if test "$prefix" = NONE; then ++ prefix=$ac_default_prefix ++fi + + BTESTRUBY='$(MINIRUBY)' + if test x"$cross_compiling" = xyes; then +@@ -3244,9 +3239,6 @@ AS_CASE(["$target_os"], + + shvar_to_cpp() { + local var="$1" val="$2" +- local exec_prefix_pat="`echo \"${exec_prefix}\" | sed 's/\\./\\\\./g'`" +- local arch_pat="`echo \"${arch}\" | sed 's/\\./\\\\./g'`" +- local sitearch_pat="`echo \"${sitearch}\" | sed 's/\\./\\\\./g'`" + val="`echo '"'"${val}"'"' | + sed \ + -e 's/\${\([[A-Z][A-Z_]]*\)}/"\1"/g' \ +@@ -3269,9 +3261,6 @@ shvar_to_cpp() { + -e 's/\${rubyarchprefix}/"RUBY_ARCH_PREFIX_FOR(arch)"/g' \ + -e 's/\${rubysitearchprefix}/"RUBY_SITEARCH_PREFIX_FOR(arch)"/g' \ + -e 's/\${exec_prefix}/"RUBY_EXEC_PREFIX"/g' \ +- -e "s|${exec_prefix_pat}/|"'"RUBY_EXEC_PREFIX"/|g' \ +- -e "s|${arch_pat}|"'"arch"|g' \ +- -e "s|${sitearch_pat}|"'"sitearch"|g' \ + -e 's|^\"NONE/|RUBY_EXEC_PREFIX\"/|' \ + -e 's|^\"NONE\"|\"'"${prefix}"'\"|' \ + -e 's/^\"\"\(.\)/\1/;s/\(.\)\"\"$/\1/' diff --git a/ruby.spec b/ruby.spec index e1b8db0..b03f72d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 1 +%global release 2 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global ruby_libdir %{_datadir}/%{name} @@ -123,6 +123,9 @@ Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.pat # This prevents issues, when ruby configuration specifies --with-ruby-version=''. # https://github.com/rubygems/rubygems/pull/455 Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch +# Fixes issues with wrong value of Rubygem's shebang introduced in r39267. +# https://bugs.ruby-lang.org/issues/7915 +Patch15: ruby-2.0.0-revert-unexpand-exec-prefix.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -386,6 +389,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -850,6 +854,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Feb 22 2013 V鱈t Ondruch - 2.0.0.0-0.2.r39387 +- Fix issues with wrong value of Rubygem's shebang introduced in r39267. + * Fri Feb 22 2013 V鱈t Ondruch - 2.0.0.0-0.1.r39387 - Upgrade to Ruby 2.0.0 (r39387). - Introduce %%gem_install macro. From 405ae9bea21fa8337675caf386bdd6129852c0ed Mon Sep 17 00:00:00 2001 From: TASAKA Mamoru Date: Mon, 25 Feb 2013 17:06:45 +0900 Subject: [PATCH 311/529] Move test-unit.gemspec to -libs subpackage for now because rubygems 2.0.0 does not create this --- ruby.spec | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index b03f72d..1079448 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 2 +%global release 3 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global ruby_libdir %{_datadir}/%{name} @@ -766,6 +766,15 @@ make check TESTS="-v $DISABLE_TESTS" %{tapset_root} +# TODO rubygems 2.0.0 does not create test-unit gemspec +# TODO for now put this in ruby-libs rpm +# TODO check if the following can be removed after +# TODO test-unit rebuild +%dir %{gem_dir} +%dir %{gem_dir}/specifications +%dir %{gem_dir}/specifications/default +%{gem_dir}/specifications/default/test-unit-*.gemspec + %files -n rubygems %{_bindir}/gem %{rubygems_dir} @@ -785,6 +794,9 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{gem_dir}/specifications/rake-%{rake_version}.gemspec %exclude %{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec %exclude %{gem_dir}/specifications/psych-%{psych_version}.gemspec +# TODO rubygems 2.0.0 does not create test-unit gemspec +# TODO where to put test-unit-*.gemspec?? +%exclude %{gem_dir}/specifications/default/test-unit-*.gemspec %files -n rubygems-devel %config(noreplace) %{_sysconfdir}/rpm/macros.rubygems @@ -854,6 +866,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Feb 25 2013 Mamoru TASAKA - 2.0.0.0-0.3.r39387 +- Move test-unit.gemspec to -libs subpackage for now because rubygems + 2.0.0 does not create this + * Fri Feb 22 2013 V鱈t Ondruch - 2.0.0.0-0.2.r39387 - Fix issues with wrong value of Rubygem's shebang introduced in r39267. From eba90976c0006f899f1b7b39138f509a2d4df016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 25 Feb 2013 12:46:22 +0100 Subject: [PATCH 312/529] Update to Ruby 2.0.0-p0. --- .gitignore | 1 + ...mal-bigdecimal.gemspec-bump-to-1.2.0.patch | 31 ------------------- ruby.spec | 13 ++++---- sources | 2 +- 4 files changed, 8 insertions(+), 39 deletions(-) delete mode 100644 ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch diff --git a/.gitignore b/.gitignore index 01e3dda..9bdb3fc 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.9.3-p374.tar.gz /ruby-1.9.3-p385.tar.gz /ruby-2.0.0-r39387.tar.gz +/ruby-2.0.0-p0.tar.gz diff --git a/ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch b/ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch deleted file mode 100644 index 15a8edf..0000000 --- a/ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch +++ /dev/null @@ -1,31 +0,0 @@ -From c42cf83f26309b0cba46917f79d20d680e667054 Mon Sep 17 00:00:00 2001 -From: mrkn -Date: Tue, 19 Feb 2013 11:50:48 +0000 -Subject: [PATCH] * ext/bigdecimal/bigdecimal.gemspec: bump to 1.2.0. - [ruby-core:51777] [Bug #7761] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ext/bigdecimal/bigdecimal.gemspec | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/ext/bigdecimal/bigdecimal.gemspec b/ext/bigdecimal/bigdecimal.gemspec -index 362808c..4240f82 100644 ---- a/ext/bigdecimal/bigdecimal.gemspec -+++ b/ext/bigdecimal/bigdecimal.gemspec -@@ -1,10 +1,10 @@ - # -*- ruby -*- --_VERSION = "1.1.0" -+_VERSION = "1.2.0" - - Gem::Specification.new do |s| - s.name = "bigdecimal" - s.version = _VERSION -- s.date = "2011-07-30" -+ s.date = "2012-02-19" - s.summary = "Arbitrary-precision decimal floating-point number library." - s.homepage = "http://www.ruby-lang.org" - s.email = "mrkn@mrkn.jp" --- -1.8.1.2 - diff --git a/ruby.spec b/ruby.spec index 1079448..7924456 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 39387 +#%%global revision 39387 %global ruby_archive %{name}-%{ruby_version} @@ -26,7 +26,7 @@ %endif -%global release 3 +%global release 1 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global ruby_libdir %{_datadir}/%{name} @@ -62,7 +62,7 @@ %global irb_version %{ruby_version_patch_level} %global rdoc_version 4.0.0 %global bigdecimal_version 1.2.0 -%global io_console_version 0.4.1 +%global io_console_version 0.4.2 %global json_version 1.7.7 %global minitest_version 4.3.2 %global psych_version 2.0.0 @@ -93,9 +93,6 @@ Source3: ruby-exercise.stp Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch # http://bugs.ruby-lang.org/issues/7808 Patch1: ruby-1.9.3-arch-specific-dir.patch -# Fixes rubygem-bigdecimla version. -# https://bugs.ruby-lang.org/issues/7761 -Patch2: ruby-2.0.0-ext-bigdecimal-bigdecimal.gemspec-bump-to-1.2.0.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. Patch3: ruby-1.9.3-always-use-i386.patch @@ -380,7 +377,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch0 -p1 %patch1 -p1 -%patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 @@ -866,6 +862,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Feb 25 2013 V鱈t Ondruch - 2.0.0.0-1 +- Update to Ruby 2.0.0-p0. + * Mon Feb 25 2013 Mamoru TASAKA - 2.0.0.0-0.3.r39387 - Move test-unit.gemspec to -libs subpackage for now because rubygems 2.0.0 does not create this diff --git a/sources b/sources index e9ec93d..3115fba 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6e9c4c75894dfebd5bf3b75989237662 ruby-2.0.0-r39387.tar.gz +50d307c4dc9297ae59952527be4e755d ruby-2.0.0-p0.tar.gz From 57ec2c6da223666635f1e4980e02ef9e33e0111c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 25 Feb 2013 12:49:05 +0100 Subject: [PATCH 313/529] Provide to %{ruby_extdir_mri} in preparation for better JRuby support. --- ruby.spec | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 7924456..2a3ea95 100644 --- a/ruby.spec +++ b/ruby.spec @@ -54,7 +54,7 @@ # TODO: These folders should go into rubygem-filesystem but how to achieve it, # since noarch package cannot provide arch dependent subpackages? # http://rpm.org/ticket/78 -%global gem_extdir %{_exec_prefix}/lib{,64}/gems +%global gem_extdir_mri %{_exec_prefix}/lib{,64}/gems %global rake_version 0.9.6 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. @@ -449,7 +449,7 @@ cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF # Common gem locations and files. %%gem_instdir %%{gem_dir}/gems/%%{gem_name}-%%{version} -%%gem_extdir %%{_libdir}/gems/%{name}/%%{gem_name}-%%{version} +%%gem_extdir_mri %%{_libdir}/gems/%{name}/%%{gem_name}-%%{version} %%gem_libdir %%{gem_instdir}/lib %%gem_cache %%{gem_dir}/cache/%%{gem_name}-%%{version}.gem %%gem_spec %%{gem_dir}/specifications/%%{gem_name}-%%{version}.gemspec @@ -480,9 +480,9 @@ cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir} # Create folders for gem binary extensions. -mkdir -p %{buildroot}%{gem_extdir}/%{name} +mkdir -p %{buildroot}%{gem_extdir_mri}/%{name} -# Move bundled rubygems to %%gem_dir and %%gem_extdir +# Move bundled rubygems to %%gem_dir and %%gem_extdir_mri # make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems mkdir -p %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib mv %{buildroot}%{ruby_libdir}/rake* %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib @@ -864,6 +864,8 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Mon Feb 25 2013 V鱈t Ondruch - 2.0.0.0-1 - Update to Ruby 2.0.0-p0. +- Change %{ruby_extdir} to %{ruby_extdir_mri} in preparation for better + JRuby support. * Mon Feb 25 2013 Mamoru TASAKA - 2.0.0.0-0.3.r39387 - Move test-unit.gemspec to -libs subpackage for now because rubygems From a9ecc1d6877a484225c25217aa4ed00ae9890cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 26 Feb 2013 08:41:51 +0100 Subject: [PATCH 314/529] Prevent squash of %gem_install with following line. --- ruby.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 2a3ea95..ceb1327 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 1 +%global release 2 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global ruby_libdir %{_datadir}/%{name} @@ -469,7 +469,8 @@ gem install \\\ --bindir .%%{_bindir} \\\ --force \\\ --document=ri,rdoc \\\ - %%{-n*}%%{!?-n:%%{gem_name}-%%{version}.gem} + %%{-n*}%%{!?-n:%%{gem_name}-%%{version}.gem} \ +%%{nil} EOF # Install custom operating_system.rb. @@ -862,6 +863,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Feb 25 2013 V鱈t Ondruch - 2.0.0.0-2 +- Prevent squash of %%gem_install with following line. + * Mon Feb 25 2013 V鱈t Ondruch - 2.0.0.0-1 - Update to Ruby 2.0.0-p0. - Change %{ruby_extdir} to %{ruby_extdir_mri} in preparation for better From b0d63dbf0fd3d05499b9f5ff7411d3c27e285290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 5 Mar 2013 08:35:05 +0100 Subject: [PATCH 315/529] Avoid "method redefined;" warnings due to modified operating_system.rb. Fix strange paths created during build of binary gems. --- operating_system.rb | 9 +++++++++ ruby.spec | 6 +++++- rubygems-2.0.0-binary-extensions.patch | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/operating_system.rb b/operating_system.rb index 7b3930e..4055ed5 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -38,6 +38,15 @@ module Gem end] end + ## + # Remove methods we are going to override. This avoids "method redefined;" + # warnings otherwise issued by Ruby. + + remove_method :default_dir if method_defined? :default_dir + remove_method :default_path if method_defined? :default_path + remove_method :default_bindir if method_defined? :default_bindir + remove_method :default_ext_dir_for if method_defined? :default_ext_dir_for + ## # RubyGems default overrides. diff --git a/ruby.spec b/ruby.spec index ceb1327..86be561 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 2 +%global release 3 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global ruby_libdir %{_datadir}/%{name} @@ -863,6 +863,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Mar 05 2013 V鱈t Ondruch - 2.0.0.0-3 +- Avoid "method redefined;" warnings due to modified operating_system.rb. +- Fix strange paths created during build of binary gems. + * Mon Feb 25 2013 V鱈t Ondruch - 2.0.0.0-2 - Prevent squash of %%gem_install with following line. diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch index d826472..fa30892 100644 --- a/rubygems-2.0.0-binary-extensions.patch +++ b/rubygems-2.0.0-binary-extensions.patch @@ -337,7 +337,7 @@ index d7d953f..812c20c 100644 mf = mf.gsub(/\s*\S+\.time$/, "") + # Folder creation was dropped in r37016 for some reasons :/ -+ target_prefix = mf[/^target_prefix\s*=\s*(.*)/, 1] ++ target_prefix = mf[/^target_prefix\s*=[^\S\n]*(.*)$/, 1] + FileUtils.mkdir_p File.join(dest_path, target_prefix) rescue nil # in case of perms issues -- lame + File.open('Makefile', 'wb') {|f| f.print mf} From bc925acb7d3faf7b81fb0f5cb7591bb24d6275ca Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 8 Mar 2013 16:38:23 +0900 Subject: [PATCH 316/529] Don't mark rpm config file as %config (fpc#259) --- ruby.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 86be561..b2be51c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 3 +%global release 4 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global ruby_libdir %{_datadir}/%{name} @@ -600,7 +600,7 @@ make check TESTS="-v $DISABLE_TESTS" %doc README.EXT %lang(ja) %doc README.EXT.ja -%config(noreplace) %{_sysconfdir}/rpm/macros.ruby +%{_sysconfdir}/rpm/macros.ruby %{_includedir}/* %{_libdir}/libruby.so @@ -796,7 +796,7 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{gem_dir}/specifications/default/test-unit-*.gemspec %files -n rubygems-devel -%config(noreplace) %{_sysconfdir}/rpm/macros.rubygems +%{_sysconfdir}/rpm/macros.rubygems %files -n rubygem-rake %{_bindir}/rake @@ -863,6 +863,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Mar 08 2013 Mamoru TASAKA - 2.0.0.0-4 +- Don't mark rpm config file as %%config (fpc#259) + * Tue Mar 05 2013 V鱈t Ondruch - 2.0.0.0-3 - Avoid "method redefined;" warnings due to modified operating_system.rb. - Fix strange paths created during build of binary gems. From 1757c4302bbced6ad76e66db7641128d84e3019d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 21 Mar 2013 13:26:25 +0100 Subject: [PATCH 317/529] Make Ruby buildable without rubypick. --- ruby.spec | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index b2be51c..40c3bcb 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 4 +%global release 5 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global ruby_libdir %{_datadir}/%{name} @@ -75,6 +75,10 @@ %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') +%if 0%{?fedora} >= 19 +%global with_rubypick 1 +%endif + Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version_patch_level} @@ -419,7 +423,7 @@ rm -rf %{buildroot} make install DESTDIR=%{buildroot} # Rename the ruby executable. It is replaced by RubyPick. -mv %{buildroot}%{_bindir}/%{name}{,-mri} +%{?with_rubypick:mv %{buildroot}%{_bindir}/%{name}{,-mri}} # Version is empty if --with-ruby-version is specified. # http://bugs.ruby-lang.org/issues/7807 @@ -585,7 +589,7 @@ make check TESTS="-v $DISABLE_TESTS" %doc GPL %doc LEGAL %{_bindir}/erb -%{_bindir}/%{name}-mri +%{_bindir}/%{name}%{?with_rubypick:-mri} %{_bindir}/testrb %{_mandir}/man1/erb* %{_mandir}/man1/ruby* @@ -863,6 +867,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Mar 21 2013 V鱈t Ondruch - 2.0.0.0-5 +- Make Ruby buildable without rubypick. + * Fri Mar 08 2013 Mamoru TASAKA - 2.0.0.0-4 - Don't mark rpm config file as %%config (fpc#259) From 8f31ccc91906fc4617fb74363f66605f5c69fda3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Mar 2013 10:09:09 +0100 Subject: [PATCH 318/529] Prevent random test failures. --- ruby-2.0.0-p57-test_thr_kill.patch | 49 ++++++++++++++++++++++++++++++ ruby.spec | 5 +++ 2 files changed, 54 insertions(+) create mode 100644 ruby-2.0.0-p57-test_thr_kill.patch diff --git a/ruby-2.0.0-p57-test_thr_kill.patch b/ruby-2.0.0-p57-test_thr_kill.patch new file mode 100644 index 0000000..c65ab23 --- /dev/null +++ b/ruby-2.0.0-p57-test_thr_kill.patch @@ -0,0 +1,49 @@ +Index: ChangeLog +=================================================================== +--- ChangeLog (revision 39727) ++++ ChangeLog (revision 39728) +@@ -1,3 +1,15 @@ ++Tue Mar 12 00:56:19 2013 KOSAKI Motohiro ++ ++ * test/thread/test_queue.rb (TestQueue#test_thr_kill): reduce ++ iterations from 2000 to 250. When running on uniprocessor ++ systems, every th.kill needs TIME_QUANTUM_USEC time (i.e. ++ 100msec on posix systems). Because, "r.read 1" is 3 steps ++ operations that 1) release GVL 2) read 3) acquire gvl and ++ (1) invoke context switch to main thread. and then, main ++ thread's th.kill resume (1), but not (2). Thus read interrupt ++ need TIME_QUANTUM_USEC. Then maximum iteration is 30sec/100msec ++ = 300. ++ + Sun Feb 24 15:16:00 2013 Eric Hodel + + * lib/net/http.rb: Removed duplicate Accept-Encoding in Net::HTTP#get. +Index: test/thread/test_queue.rb +=================================================================== +--- test/thread/test_queue.rb (revision 39727) ++++ test/thread/test_queue.rb (revision 39728) +@@ -85,7 +85,7 @@ + bug5343 = '[ruby-core:39634]' + Dir.mktmpdir {|d| + timeout = 30 +- total_count = 2000 ++ total_count = 250 + begin + assert_normal_exit(<<-"_eom", bug5343, {:timeout => timeout, :chdir=>d}) + require "thread" +@@ -98,7 +98,8 @@ + r.read 1 + } + queue.pop +- th.kill.join ++ th.kill ++ th.join + end + _eom + rescue Timeout::Error + +Property changes on: . +___________________________________________________________________ +Modified: svn:mergeinfo + Merged /trunk:r39688 + diff --git a/ruby.spec b/ruby.spec index 40c3bcb..7830d3b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -127,6 +127,9 @@ Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch # Fixes issues with wrong value of Rubygem's shebang introduced in r39267. # https://bugs.ruby-lang.org/issues/7915 Patch15: ruby-2.0.0-revert-unexpand-exec-prefix.patch +# Fixes test_thr_kill(TestQueue) random test failure. +# https://bugs.ruby-lang.org/issues/7521 +Patch16: ruby-2.0.0-p57-test_thr_kill.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -390,6 +393,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p0 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -869,6 +873,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Thu Mar 21 2013 V鱈t Ondruch - 2.0.0.0-5 - Make Ruby buildable without rubypick. +- Prevent random test failures. * Fri Mar 08 2013 Mamoru TASAKA - 2.0.0.0-4 - Don't mark rpm config file as %%config (fpc#259) From 61fb1adee2f4fdde3cc7fb5d2358b43706320f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 22 Mar 2013 23:02:04 +0100 Subject: [PATCH 319/529] Fix RbConfig::CONFIG['exec_prefix'] returns empty string (rhbz#924851). --- ruby-1.9.3-arch-specific-dir.patch | 27 --------------------------- ruby.spec | 15 +++++++++------ 2 files changed, 9 insertions(+), 33 deletions(-) delete mode 100644 ruby-1.9.3-arch-specific-dir.patch diff --git a/ruby-1.9.3-arch-specific-dir.patch b/ruby-1.9.3-arch-specific-dir.patch deleted file mode 100644 index fcdc2fc..0000000 --- a/ruby-1.9.3-arch-specific-dir.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2e15c6bdac1c145cce0c21677477ced8df26718b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 8 Feb 2013 18:20:50 +0100 -Subject: [PATCH] Add configuration arch specific dir flag. - ---- - configure.in | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/configure.in b/configure.in -index d6af000..1c094a3 100644 ---- a/configure.in -+++ b/configure.in -@@ -3217,6 +3217,10 @@ AC_SUBST(rubylibprefix) - rubylibdir='${rubylibprefix}/${ruby_version}' - rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} - -+AC_ARG_WITH(rubyarchdir, -+ AS_HELP_STRING([--with-rubyarchdir=DIR], [architecture specific ruby libraries [[LIBDIR/RUBY_BASE_NAME/ARCH]]]), -+ [rubyarchdir=$withval]) -+ - rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} - AC_ARG_WITH(rubyarchprefix, - AS_HELP_STRING([--with-rubyarchprefix=DIR], --- -1.8.1.2 - diff --git a/ruby.spec b/ruby.spec index 7830d3b..7adaecd 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 5 +%global release 6 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global ruby_libdir %{_datadir}/%{name} @@ -95,8 +95,6 @@ Source3: ruby-exercise.stp # http://bugs.ruby-lang.org/issues/7807 Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch -# http://bugs.ruby-lang.org/issues/7808 -Patch1: ruby-1.9.3-arch-specific-dir.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. Patch3: ruby-1.9.3-always-use-i386.patch @@ -383,7 +381,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %setup -q -n %{ruby_archive} %patch0 -p1 -%patch1 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 @@ -403,17 +400,21 @@ autoconf %configure \ --with-rubylibprefix='%{ruby_libdir}' \ - --with-rubyarchdir='%{ruby_libarchdir}' \ + --with-rubyarchprefix='%{ruby_libarchdir}' \ --with-sitedir='%{ruby_sitelibdir}' \ --with-sitearchdir='%{ruby_sitearchdir}' \ --with-vendordir='%{ruby_vendorlibdir}' \ --with-vendorarchdir='%{ruby_vendorarchdir}' \ --with-rubyhdrdir='%{_includedir}' \ + --with-rubyarchhdrdir='$(archincludedir)' \ + --with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \ + --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ --with-rubygemsdir='%{rubygems_dir}' \ --with-ruby-pc='%{name}.pc' \ --disable-rpath \ --enable-shared \ --with-ruby-version='' \ + --enable-multiarch \ @@ -421,7 +422,6 @@ autoconf # compiler options. make %{?_smp_mflags} COPY="cp -p" Q= - %install rm -rf %{buildroot} make install DESTDIR=%{buildroot} @@ -871,6 +871,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Mar 22 2013 V鱈t Ondruch - 2.0.0.0-6 +- Fix RbConfig::CONFIG['exec_prefix'] returns empty string (rhbz#924851). + * Thu Mar 21 2013 V鱈t Ondruch - 2.0.0.0-5 - Make Ruby buildable without rubypick. - Prevent random test failures. From bdaca0631c258d488c497fdad5020fa837ff8111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Sat, 23 Mar 2013 00:41:22 +0100 Subject: [PATCH 320/529] Fix indentation. --- ruby.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 7adaecd..117a41c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -406,9 +406,9 @@ autoconf --with-vendordir='%{ruby_vendorlibdir}' \ --with-vendorarchdir='%{ruby_vendorarchdir}' \ --with-rubyhdrdir='%{_includedir}' \ - --with-rubyarchhdrdir='$(archincludedir)' \ - --with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \ - --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ + --with-rubyarchhdrdir='$(archincludedir)' \ + --with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \ + --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ --with-rubygemsdir='%{rubygems_dir}' \ --with-ruby-pc='%{name}.pc' \ --disable-rpath \ From cf21f0581ebe01fc1ca136ccd38cef32fc3582ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 17 Apr 2013 10:39:40 +0200 Subject: [PATCH 321/529] Move the macros definition into macros.ruby file. --- macros.ruby | 13 +++++++++++++ ruby.spec | 45 ++++++++++++++++----------------------------- 2 files changed, 29 insertions(+), 29 deletions(-) create mode 100644 macros.ruby diff --git a/macros.ruby b/macros.ruby new file mode 100644 index 0000000..24a2c05 --- /dev/null +++ b/macros.ruby @@ -0,0 +1,13 @@ +%ruby_libdir %{_datadir}/%{name} +%ruby_libarchdir %{_libdir}/%{name} + +# This is the local lib/arch and should not be used for packaging. +%ruby_sitedir site_ruby +%ruby_sitelibdir %{_prefix}/local/share/%{name}/%{ruby_sitedir} +%ruby_sitearchdir %{_prefix}/local/%{_lib}/%{name}/%{ruby_sitedir} + +# This is the general location for libs/archs compatible with all +# or most of the Ruby versions available in the Fedora repositories. +%ruby_vendordir vendor_ruby +%ruby_vendorlibdir %{ruby_libdir}/%{ruby_vendordir} +%ruby_vendorarchdir %{ruby_libarchdir}/%{ruby_vendordir} diff --git a/ruby.spec b/ruby.spec index 117a41c..f6aaaa3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -29,20 +29,6 @@ %global release 6 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global ruby_libdir %{_datadir}/%{name} -%global ruby_libarchdir %{_libdir}/%{name} - -# This is the local lib/arch and should not be used for packaging. -%global ruby_sitedir site_ruby -%global ruby_sitelibdir %{_prefix}/local/share/ruby/%{ruby_sitedir} -%global ruby_sitearchdir %{_prefix}/local/%{_lib}/ruby/%{ruby_sitedir} - -# This is the general location for libs/archs compatible with all -# or most of the Ruby versions available in the Fedora repositories. -%global ruby_vendordir vendor_ruby -%global ruby_vendorlibdir %{_datadir}/ruby/%{ruby_vendordir} -%global ruby_vendorarchdir %{_libdir}/ruby/%{ruby_vendordir} - %global rubygems_version 2.0.0 # The RubyGems library has to stay out of Ruby directory three, since the @@ -92,6 +78,20 @@ Source1: operating_system.rb # TODO: Try to push SystemTap support upstream. Source2: libruby.stp Source3: ruby-exercise.stp +Source4: macros.ruby + + +# Include the constants defined in macros files. +# http://http://rpm.org/ticket/866 +%{lua: + +for line in io.lines(rpm.expand("%{SOURCE4}")) do + if line:sub(1, 1) == "%" then + rpm.define(line:sub(2, -1)) + end +end + +} # http://bugs.ruby-lang.org/issues/7807 Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -435,21 +435,8 @@ sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_li # Dump the macros into macro.ruby to use them to build other Ruby libraries. mkdir -p %{buildroot}%{_sysconfdir}/rpm -cat >> %{buildroot}%{_sysconfdir}/rpm/macros.ruby << \EOF -%%ruby_libdir %%{_datadir}/%{name} -%%ruby_libarchdir %%{_libdir}/%{name} - -# This is the local lib/arch and should not be used for packaging. -%%ruby_sitedir site_ruby -%%ruby_sitelibdir %%{_prefix}/local/share/%{name}/%%{ruby_sitedir} -%%ruby_sitearchdir %%{_prefix}/local/%%{_lib}/%{name}/%%{ruby_sitedir} - -# This is the general location for libs/archs compatible with all -# or most of the Ruby versions available in the Fedora repositories. -%%ruby_vendordir vendor_ruby -%%ruby_vendorlibdir %%{ruby_libdir}/%%{ruby_vendordir} -%%ruby_vendorarchdir %%{ruby_libarchdir}/%%{ruby_vendordir} -EOF +install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/rpm/macros.ruby +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.ruby cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF # The RubyGems root folder. From 893a03a0cf7e148c2e1848bb6bfc103fc1597ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 19 Apr 2013 12:58:01 +0200 Subject: [PATCH 322/529] Move RubyGems macro definition into macros.rubygems file. --- macros.rubygems | 27 ++++++++++++++++++++ ruby.spec | 65 +++++++++++++++++++++---------------------------- 2 files changed, 55 insertions(+), 37 deletions(-) create mode 100644 macros.rubygems diff --git a/macros.rubygems b/macros.rubygems new file mode 100644 index 0000000..2856b21 --- /dev/null +++ b/macros.rubygems @@ -0,0 +1,27 @@ +# The RubyGems root folder. +%gem_dir %{_datadir}/gems + +# Common gem locations and files. +%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} +%gem_extdir_mri %{_libdir}/gems/%{name}/%{gem_name}-%{version} +%gem_libdir %{gem_instdir}/lib +%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem +%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec +%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} + +# Install gem into appropriate directory. +# -n Overrides gem file name for installation. +# -d Set installation directory. +%gem_install(d:n:) \ +mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \ +\ +CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\ +gem install \\\ + -V \\\ + --local \\\ + --install-dir %{-d*}%{!?-d:.%{gem_dir}} \\\ + --bindir .%{_bindir} \\\ + --force \\\ + --document=ri,rdoc \\\ + %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \ +%{nil} diff --git a/ruby.spec b/ruby.spec index f6aaaa3..6600f84 100644 --- a/ruby.spec +++ b/ruby.spec @@ -35,8 +35,6 @@ # RubyGems should be share by all Ruby implementations. %global rubygems_dir %{_datadir}/rubygems -# Specify custom RubyGems root. -%global gem_dir %{_datadir}/gems # TODO: These folders should go into rubygem-filesystem but how to achieve it, # since noarch package cannot provide arch dependent subpackages? # http://rpm.org/ticket/78 @@ -79,18 +77,38 @@ Source1: operating_system.rb Source2: libruby.stp Source3: ruby-exercise.stp Source4: macros.ruby +Source5: macros.rubygems # Include the constants defined in macros files. -# http://http://rpm.org/ticket/866 +# http://rpm.org/ticket/866 %{lua: -for line in io.lines(rpm.expand("%{SOURCE4}")) do - if line:sub(1, 1) == "%" then - rpm.define(line:sub(2, -1)) +function source_macros(file) + local macro = nil + + for line in io.lines(file) do + if not macro and line:match("^%%") then + macro = line:match("^%%(.*)$") + line = nil + end + + if macro then + if line and macro:match("^.-%s*\\%s*$") then + macro = macro .. '\n' .. line + end + + if not macro:match("^.-%s*\\%s*$") then + rpm.define(macro) + macro = nil + end + end end end +source_macros(rpm.expand("%{SOURCE4}")) +source_macros(rpm.expand("%{SOURCE5}")) + } # http://bugs.ruby-lang.org/issues/7807 @@ -433,40 +451,13 @@ make install DESTDIR=%{buildroot} # http://bugs.ruby-lang.org/issues/7807 sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc -# Dump the macros into macro.ruby to use them to build other Ruby libraries. +# Move macros file insto proper place and replace the %%{name} macro, since it +# would be wrongly evaluated during build of other packages. mkdir -p %{buildroot}%{_sysconfdir}/rpm install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/rpm/macros.ruby sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.ruby - -cat >> %{buildroot}%{_sysconfdir}/rpm/macros.rubygems << \EOF -# The RubyGems root folder. -%%gem_dir %{gem_dir} - -# Common gem locations and files. -%%gem_instdir %%{gem_dir}/gems/%%{gem_name}-%%{version} -%%gem_extdir_mri %%{_libdir}/gems/%{name}/%%{gem_name}-%%{version} -%%gem_libdir %%{gem_instdir}/lib -%%gem_cache %%{gem_dir}/cache/%%{gem_name}-%%{version}.gem -%%gem_spec %%{gem_dir}/specifications/%%{gem_name}-%%{version}.gemspec -%%gem_docdir %%{gem_dir}/doc/%%{gem_name}-%%{version} - -# Install gem into appropriate directory. -# -n Overrides gem file name for installation. -# -d Set installation directory. -%%gem_install(d:n:) \ -mkdir -p %%{-d*}%%{!?-d:.%%{gem_dir}} \ -\ -CONFIGURE_ARGS="--with-cflags='%%{optflags}' $CONFIGURE_ARGS" \\\ -gem install \\\ - -V \\\ - --local \\\ - --install-dir %%{-d*}%%{!?-d:.%%{gem_dir}} \\\ - --bindir .%%{_bindir} \\\ - --force \\\ - --document=ri,rdoc \\\ - %%{-n*}%%{!?-n:%%{gem_name}-%%{version}.gem} \ -%%{nil} -EOF +install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rpm/macros.rubygems +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.rubygems # Install custom operating_system.rb. mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults From cdb74fa5c85bab6089a28728a17c06d2b73a85a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 23 Apr 2013 12:26:48 +0200 Subject: [PATCH 323/529] Fix %{gem_extdir_mri} preparation. --- ruby.spec | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index 6600f84..9a0c93e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -35,11 +35,6 @@ # RubyGems should be share by all Ruby implementations. %global rubygems_dir %{_datadir}/rubygems -# TODO: These folders should go into rubygem-filesystem but how to achieve it, -# since noarch package cannot provide arch dependent subpackages? -# http://rpm.org/ticket/78 -%global gem_extdir_mri %{_exec_prefix}/lib{,64}/gems - %global rake_version 0.9.6 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 @@ -467,7 +462,10 @@ cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir} # Create folders for gem binary extensions. -mkdir -p %{buildroot}%{gem_extdir_mri}/%{name} +# TODO: These folders should go into rubygem-filesystem but how to achieve it, +# since noarch package cannot provide arch dependent subpackages? +# http://rpm.org/ticket/78 +mkdir -p %{buildroot}%{_exec_prefix}/lib{,64}/gems/%{name} # Move bundled rubygems to %%gem_dir and %%gem_extdir_mri # make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems From 56d430e19a5c5e9c427ba76550ca031bf85d12b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 30 Apr 2013 14:39:52 +0200 Subject: [PATCH 324/529] Introduce %{gem_archdir} macro. --- macros.rubygems | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/macros.rubygems b/macros.rubygems index 2856b21..b82a9fb 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -1,9 +1,10 @@ # The RubyGems root folder. %gem_dir %{_datadir}/gems +%gem_archdir %{_libdir}/gems # Common gem locations and files. %gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} -%gem_extdir_mri %{_libdir}/gems/%{name}/%{gem_name}-%{version} +%gem_extdir_mri %{gem_archdir}/%{name}/%{gem_name}-%{version} %gem_libdir %{gem_instdir}/lib %gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem %gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec From 4f6b4d4bb45f5c265dcdd927280b01ff1506f972 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 30 Apr 2013 14:41:22 +0200 Subject: [PATCH 325/529] Filter automatically generated provides of private libraries (rhbz#947408). --- ruby.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruby.spec b/ruby.spec index 9a0c93e..5d8bd7c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -167,6 +167,8 @@ BuildRequires: %{_bindir}/dtrace # virtual provide. It can be installed as dependency of rubypick. Provides: ruby(runtime_executable) = %{ruby_release} +%global __provides_exclude_from ^(%{ruby_libarchdir}|%{gem_archdir})/.*\\.so$ + %description Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text From c0b18590df8b15f0b48c37cb1f21dfba5cec261b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 30 Apr 2013 14:42:13 +0200 Subject: [PATCH 326/529] Add %{ruby_default_filter} macro. --- macros.ruby | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/macros.ruby b/macros.ruby index 24a2c05..36f4077 100644 --- a/macros.ruby +++ b/macros.ruby @@ -11,3 +11,12 @@ %ruby_vendordir vendor_ruby %ruby_vendorlibdir %{ruby_libdir}/%{ruby_vendordir} %ruby_vendorarchdir %{ruby_libarchdir}/%{ruby_vendordir} + +# For ruby packages we want to filter out any provides caused by private +# libs in %%{ruby_vendorarchdir}/%%{ruby_sitearchdir}. +# +# Note that this must be invoked in the spec file, preferably as +# "%{?ruby_default_filter}", before any %description block. +%ruby_default_filter %{expand: \ +%global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^(%{ruby_vendorarchdir}|%{ruby_sitearchdir})/.*\\\\.so$ \ +} From ec047534c71f3e5b8f7f12def78ff169d6a8c394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 30 Apr 2013 14:43:26 +0200 Subject: [PATCH 327/529] Bump release and add changelog entries. --- macros.rubygems | 9 +++++++++ ruby.spec | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/macros.rubygems b/macros.rubygems index b82a9fb..1043c02 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -26,3 +26,12 @@ gem install \\\ --document=ri,rdoc \\\ %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \ %{nil} + +# For rubygems packages we want to filter out any provides caused by private +# libs in %%{gem_archdir}. +# +# Note that this must be invoked in the spec file, preferably as +# "%{?rubygems_default_filter}", before any %description block. +%rubygems_default_filter %{expand: \ +%global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \ +} diff --git a/ruby.spec b/ruby.spec index 5d8bd7c..d3b0917 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 6 +%global release 7 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.0.0 @@ -849,6 +849,11 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Apr 19 2013 V鱈t Ondruch - 2.0.0.0-7 +- Macro definition moved into macros.ruby and macros.rubygems files. +- Added filtering macros. +- Filter automatically generated provides of private libraries (rhbz#947408). + * Fri Mar 22 2013 V鱈t Ondruch - 2.0.0.0-6 - Fix RbConfig::CONFIG['exec_prefix'] returns empty string (rhbz#924851). From e1890f92f27737b577012d57e88fdf8ccc2400c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 17 May 2013 14:16:09 +0200 Subject: [PATCH 328/529] Update to Ruby 2.0.0-p195 (rhbz#917374). Fix object taint bypassing in DL and Fiddle (CVE-2013-2065). --- .gitignore | 1 + ruby-1.9.3-always-use-i386.patch | 2 +- ruby-1.9.3-custom-rubygems-location.patch | 4 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.0.0-p57-test_thr_kill.patch | 49 ----------------- ruby-2.0.0-revert-unexpand-exec-prefix.patch | 36 ++++++------- ruby.spec | 17 +++--- ...obal-Specification.dirs-during-insta.patch | 14 ++--- ...s-2.0.0-Fixes-for-empty-ruby-version.patch | 2 +- rubygems-2.0.0-binary-extensions.patch | 52 ++++--------------- sources | 2 +- 11 files changed, 52 insertions(+), 129 deletions(-) delete mode 100644 ruby-2.0.0-p57-test_thr_kill.patch diff --git a/.gitignore b/.gitignore index 9bdb3fc..f2ff6b0 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-1.9.3-p385.tar.gz /ruby-2.0.0-r39387.tar.gz /ruby-2.0.0-p0.tar.gz +/ruby-2.0.0-p195.tar.bz2 diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index dec6994..8b724a8 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 418b0cb..d26fe5b 100644 --- a/configure.in +++ b/configure.in -@@ -3362,6 +3362,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3419,6 +3419,8 @@ AC_SUBST(vendorarchdir)dnl configure_args=$ac_configure_args AC_SUBST(configure_args)dnl diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 4a3e7cb..90ad58d 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index 1627d12..e064b2b 100644 --- a/configure.in +++ b/configure.in -@@ -3292,6 +3292,13 @@ AC_ARG_WITH(vendorarchdir, +@@ -3349,6 +3349,13 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -28,7 +28,7 @@ index 1627d12..e064b2b 100644 unexpand_shvar rubylibprefix exec_prefix libdir RUBY_BASE_NAME unexpand_shvar rubyarchprefix exec_prefix libdir arch RUBY_BASE_NAME archlibdir rubylibprefix unexpand_shvar rubysitearchprefix exec_prefix libdir sitearch arch RUBY_BASE_NAME archlibdir sitearchlibdir rubylibprefix -@@ -3358,6 +3365,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3415,6 +3422,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index a6a8106..58d602d 100644 --- a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index 5850bbf..7604bb8 100644 --- a/configure.in +++ b/configure.in -@@ -3306,6 +3306,9 @@ unexpand_shvar exec_prefix prefix +@@ -3367,6 +3367,9 @@ unexpand_shvar exec_prefix prefix if test ${RUBY_LIB_VERSION_STYLE+set}; then AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !!) else diff --git a/ruby-2.0.0-p57-test_thr_kill.patch b/ruby-2.0.0-p57-test_thr_kill.patch deleted file mode 100644 index c65ab23..0000000 --- a/ruby-2.0.0-p57-test_thr_kill.patch +++ /dev/null @@ -1,49 +0,0 @@ -Index: ChangeLog -=================================================================== ---- ChangeLog (revision 39727) -+++ ChangeLog (revision 39728) -@@ -1,3 +1,15 @@ -+Tue Mar 12 00:56:19 2013 KOSAKI Motohiro -+ -+ * test/thread/test_queue.rb (TestQueue#test_thr_kill): reduce -+ iterations from 2000 to 250. When running on uniprocessor -+ systems, every th.kill needs TIME_QUANTUM_USEC time (i.e. -+ 100msec on posix systems). Because, "r.read 1" is 3 steps -+ operations that 1) release GVL 2) read 3) acquire gvl and -+ (1) invoke context switch to main thread. and then, main -+ thread's th.kill resume (1), but not (2). Thus read interrupt -+ need TIME_QUANTUM_USEC. Then maximum iteration is 30sec/100msec -+ = 300. -+ - Sun Feb 24 15:16:00 2013 Eric Hodel - - * lib/net/http.rb: Removed duplicate Accept-Encoding in Net::HTTP#get. -Index: test/thread/test_queue.rb -=================================================================== ---- test/thread/test_queue.rb (revision 39727) -+++ test/thread/test_queue.rb (revision 39728) -@@ -85,7 +85,7 @@ - bug5343 = '[ruby-core:39634]' - Dir.mktmpdir {|d| - timeout = 30 -- total_count = 2000 -+ total_count = 250 - begin - assert_normal_exit(<<-"_eom", bug5343, {:timeout => timeout, :chdir=>d}) - require "thread" -@@ -98,7 +98,8 @@ - r.read 1 - } - queue.pop -- th.kill.join -+ th.kill -+ th.join - end - _eom - rescue Timeout::Error - -Property changes on: . -___________________________________________________________________ -Modified: svn:mergeinfo - Merged /trunk:r39688 - diff --git a/ruby-2.0.0-revert-unexpand-exec-prefix.patch b/ruby-2.0.0-revert-unexpand-exec-prefix.patch index 2a38296..35067aa 100644 --- a/ruby-2.0.0-revert-unexpand-exec-prefix.patch +++ b/ruby-2.0.0-revert-unexpand-exec-prefix.patch @@ -3,7 +3,7 @@ diff --git a/configure.in b/configure.in index be7d4fe..2d511e5 100644 --- a/configure.in +++ b/configure.in -@@ -2597,14 +2597,9 @@ AS_CASE(["$target_os"], +@@ -2574,14 +2574,9 @@ AS_CASE(["$target_os"], AC_SUBST(setup) @@ -21,23 +21,23 @@ index be7d4fe..2d511e5 100644 BTESTRUBY='$(MINIRUBY)' if test x"$cross_compiling" = xyes; then -@@ -3244,9 +3239,6 @@ AS_CASE(["$target_os"], +@@ -3211,9 +3216,6 @@ AS_CASE(["$target_os"], shvar_to_cpp() { - local var="$1" val="$2" -- local exec_prefix_pat="`echo \"${exec_prefix}\" | sed 's/\\./\\\\./g'`" -- local arch_pat="`echo \"${arch}\" | sed 's/\\./\\\\./g'`" -- local sitearch_pat="`echo \"${sitearch}\" | sed 's/\\./\\\\./g'`" - val="`echo '"'"${val}"'"' | + var="$1" val="$2" +- exec_prefix_pat="`echo \"${exec_prefix}\" | sed 's/\\./\\\\./g'`" +- arch_pat="`echo \"${arch}\" | sed 's/\\./\\\\./g'`" +- sitearch_pat="`echo \"${sitearch}\" | sed 's/\\./\\\\./g'`" + val="`echo '\"'\"${val}\"'\"' | sed \ - -e 's/\${\([[A-Z][A-Z_]]*\)}/"\1"/g' \ -@@ -3269,9 +3261,6 @@ shvar_to_cpp() { - -e 's/\${rubyarchprefix}/"RUBY_ARCH_PREFIX_FOR(arch)"/g' \ - -e 's/\${rubysitearchprefix}/"RUBY_SITEARCH_PREFIX_FOR(arch)"/g' \ - -e 's/\${exec_prefix}/"RUBY_EXEC_PREFIX"/g' \ -- -e "s|${exec_prefix_pat}/|"'"RUBY_EXEC_PREFIX"/|g' \ -- -e "s|${arch_pat}|"'"arch"|g' \ -- -e "s|${sitearch_pat}|"'"sitearch"|g' \ - -e 's|^\"NONE/|RUBY_EXEC_PREFIX\"/|' \ - -e 's|^\"NONE\"|\"'"${prefix}"'\"|' \ - -e 's/^\"\"\(.\)/\1/;s/\(.\)\"\"$/\1/' + -e 's/\${\([[A-Z][A-Z_]]*\)}/\"\1\"/g' \ +@@ -3236,9 +3238,6 @@ shvar_to_cpp() { + -e 's/\${rubyarchprefix}/\"RUBY_ARCH_PREFIX_FOR(arch)\"/g' \ + -e 's/\${rubysitearchprefix}/\"RUBY_SITEARCH_PREFIX_FOR(arch)\"/g' \ + -e 's/\${exec_prefix}/\"RUBY_EXEC_PREFIX\"/g' \ +- -e \"s|${exec_prefix_pat}/|\"'\"RUBY_EXEC_PREFIX\"/|g' \ +- -e \"s|${arch_pat}|\"'\"arch\"|g' \ +- -e \"s|${sitearch_pat}|\"'\"sitearch\"|g' \ + -e 's|^\\\"NONE/|RUBY_EXEC_PREFIX\\\"/|' \ + -e 's|^\\\"NONE\\\"|\\\"'\"${prefix}\"'\\\"|' \ + -e 's/^\\\"\\\"\(.\)/\1/;s/\(.\)\\\"\\\"$/\1/' diff --git a/ruby.spec b/ruby.spec index d3b0917..32790f8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 2 %global minor_version 0 %global teeny_version 0 -%global patch_level 0 +%global patch_level 195 %global major_minor_version %{major_version}.%{minor_version} @@ -26,10 +26,10 @@ %endif -%global release 7 +%global release 8 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.0.0 +%global rubygems_version 2.0.2 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -66,7 +66,7 @@ Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain URL: http://ruby-lang.org/ -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.gz +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.bz2 Source1: operating_system.rb # TODO: Try to push SystemTap support upstream. Source2: libruby.stp @@ -137,10 +137,8 @@ Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.pat Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch # Fixes issues with wrong value of Rubygem's shebang introduced in r39267. # https://bugs.ruby-lang.org/issues/7915 +# TODO: Patch15: ruby-2.0.0-revert-unexpand-exec-prefix.patch -# Fixes test_thr_kill(TestQueue) random test failure. -# https://bugs.ruby-lang.org/issues/7521 -Patch16: ruby-2.0.0-p57-test_thr_kill.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -405,7 +403,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch13 -p1 %patch14 -p1 %patch15 -p1 -%patch16 -p0 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -849,6 +846,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri May 17 2013 V鱈t Ondruch - 2.0.0.195-8 +- Update to Ruby 2.0.0-p195 (rhbz#917374). +- Fix object taint bypassing in DL and Fiddle (CVE-2013-2065). + * Fri Apr 19 2013 V鱈t Ondruch - 2.0.0.0-7 - Macro definition moved into macros.ruby and macros.rubygems files. - Added filtering macros. diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch index a6d2334..607e028 100644 --- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -13,7 +13,7 @@ diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_inst index d811f62..dffa8df 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb -@@ -319,9 +319,6 @@ class Gem::DependencyInstaller +@@ -330,9 +330,6 @@ class Gem::DependencyInstaller last = @gems_to_install.size - 1 @gems_to_install.each_with_index do |spec, index| @@ -64,7 +64,7 @@ index dffa8df..841f26a 100644 @bin_dir = options[:bin_dir] @dev_shallow = options[:dev_shallow] @development = options[:development] -@@ -91,7 +88,7 @@ class Gem::DependencyInstaller +@@ -92,7 +89,7 @@ class Gem::DependencyInstaller @installed_gems = [] @toplevel_specs = nil @@ -73,7 +73,7 @@ index dffa8df..841f26a 100644 # Set with any errors that SpecFetcher finds while search through # gemspecs for a dep -@@ -185,7 +182,7 @@ class Gem::DependencyInstaller +@@ -202,7 +199,7 @@ class Gem::DependencyInstaller # that this isn't dependent only on the currently installed gems dependency_list.specs.reject! { |spec| not keep_names.include?(spec.full_name) and @@ -82,7 +82,7 @@ index dffa8df..841f26a 100644 } unless dependency_list.ok? or @ignore_dependencies or @force then -@@ -237,7 +234,7 @@ class Gem::DependencyInstaller +@@ -254,7 +251,7 @@ class Gem::DependencyInstaller to_do.push t.spec end @@ -91,7 +91,7 @@ index dffa8df..841f26a 100644 @available << results results.inject_into_list dependency_list -@@ -349,7 +346,7 @@ class Gem::DependencyInstaller +@@ -360,7 +357,7 @@ class Gem::DependencyInstaller :force => @force, :format_executable => @format_executable, :ignore_dependencies => @ignore_dependencies, @@ -118,7 +118,7 @@ diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_inst index 841f26a..abcfa0f 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb -@@ -346,7 +346,7 @@ class Gem::DependencyInstaller +@@ -357,7 +357,7 @@ class Gem::DependencyInstaller :force => @force, :format_executable => @format_executable, :ignore_dependencies => @ignore_dependencies, @@ -131,7 +131,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 780a88b..6543130 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -536,13 +536,13 @@ class Gem::Installer +@@ -537,13 +537,13 @@ class Gem::Installer :bin_dir => nil, :env_shebang => false, :force => false, diff --git a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch b/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch index 9b275a9..e443a46 100644 --- a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch +++ b/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch @@ -63,7 +63,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index bf77009..9ee78f7 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1186,8 +1186,10 @@ class TestGem < Gem::TestCase +@@ -1198,8 +1198,10 @@ class TestGem < Gem::TestCase end def test_self_user_dir diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch index fa30892..4876d35 100644 --- a/rubygems-2.0.0-binary-extensions.patch +++ b/rubygems-2.0.0-binary-extensions.patch @@ -1,7 +1,7 @@ From ec90622235ae19b28a327cb50a10e0311e8f3d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 3 Nov 2011 16:43:05 +0100 -Subject: [PATCH 1/9] Add dedicate extensions folder into $LOAD_PATH. +Subject: [PATCH 1/8] Add dedicate extensions folder into $LOAD_PATH. --- lib/rubygems/specification.rb | 32 ++++++++++++++++++++++++++++++-- @@ -74,7 +74,7 @@ index cabdf8d..87b14d2 100644 From e42819f32fc5d935f7e7189ec4be8bdab0a2cf3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 16 Nov 2011 13:26:48 +0100 -Subject: [PATCH 2/9] Use spec's ext dir for extension installation. +Subject: [PATCH 2/8] Use spec's ext dir for extension installation. --- lib/rubygems/installer.rb | 2 +- @@ -85,7 +85,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 780a88b..854c177 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -645,7 +645,7 @@ TEXT +@@ -646,7 +646,7 @@ TEXT say "This could take a while..." end @@ -167,7 +167,7 @@ index 492ddbe..c703827 100644 From 9a8556c609e800d0dbd24af416d613f2e82f323c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 9 Dec 2011 16:31:04 +0100 -Subject: [PATCH 4/9] Fix the binary extension search path construction. +Subject: [PATCH 4/8] Fix the binary extension search path construction. --- lib/rubygems/installer.rb | 2 +- @@ -178,7 +178,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index 854c177..f1f2ad7 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -645,7 +645,7 @@ TEXT +@@ -646,7 +646,7 @@ TEXT say "This could take a while..." end @@ -216,7 +216,7 @@ index c703827..fa9ea6e 100644 From 476c2f90cc6f5f490858f253a9b23eb19d53d2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 13 Dec 2011 12:14:54 +0100 -Subject: [PATCH 5/9] Remove binary extensions during uninstall. +Subject: [PATCH 5/8] Remove binary extensions during uninstall. --- lib/rubygems/uninstaller.rb | 1 + @@ -241,7 +241,7 @@ index d672b9d..5c31a0c 100644 From 35dc17e86f701fe1be80d98ace79735c535fd570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 13 Dec 2011 14:27:14 +0100 -Subject: [PATCH 6/9] Avoid dependency on customized operating_system.rb. +Subject: [PATCH 6/8] Avoid dependency on customized operating_system.rb. --- lib/rubygems/defaults.rb | 11 +++++++++++ @@ -293,7 +293,7 @@ index fa9ea6e..2b10499 100644 From 0937c0b0a3c2ed08ab5b0875f7f95e24157525c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 7 Feb 2013 13:07:34 +0100 -Subject: [PATCH 7/9] Fix binary extensions installation when --install-dir is +Subject: [PATCH 7/8] Fix binary extensions installation when --install-dir is specified. --- @@ -304,7 +304,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index f1f2ad7..e1577fc 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -645,7 +645,7 @@ TEXT +@@ -646,7 +646,7 @@ TEXT say "This could take a while..." end @@ -317,40 +317,10 @@ index f1f2ad7..e1577fc 100644 1.8.1.2 -From 4d9675cab5decaef3c9f7f91b2f9c9abd2a19cea Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 15 Feb 2013 16:24:29 +0100 -Subject: [PATCH 8/9] mkmf does not create folder for binary extensions - anymore. - -This was dropped in Ruby r37016 for some reasons :/ ---- - lib/rubygems/ext/builder.rb | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb -index d7d953f..812c20c 100644 ---- a/lib/rubygems/ext/builder.rb -+++ b/lib/rubygems/ext/builder.rb -@@ -21,6 +21,10 @@ class Gem::Ext::Builder - mf = mf.gsub(/^RUBYLIBDIR\s*=\s*\$[^$]*/, "RUBYLIBDIR = #{dest_path}") - mf = mf.gsub(/\s*\S+\.time$/, "") - -+ # Folder creation was dropped in r37016 for some reasons :/ -+ target_prefix = mf[/^target_prefix\s*=[^\S\n]*(.*)$/, 1] -+ FileUtils.mkdir_p File.join(dest_path, target_prefix) rescue nil # in case of perms issues -- lame -+ - File.open('Makefile', 'wb') {|f| f.print mf} - - # try to find make program from Ruby configure arguments first --- -1.8.1.2 - - From 062a11c59731f5875d5a8821a212c8a41cb84577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 15 Feb 2013 17:07:07 +0100 -Subject: [PATCH 9/9] Use correct option. +Subject: [PATCH 8/8] Use correct option. --- lib/rubygems/installer.rb | 2 +- @@ -360,7 +330,7 @@ diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb index e1577fc..1492c68 100644 --- a/lib/rubygems/installer.rb +++ b/lib/rubygems/installer.rb -@@ -645,7 +645,7 @@ TEXT +@@ -646,7 +646,7 @@ TEXT say "This could take a while..." end diff --git a/sources b/sources index 3115fba..c66f5b1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -50d307c4dc9297ae59952527be4e755d ruby-2.0.0-p0.tar.gz +2f54faea6ee1ca500632ec3c0cb59cb6 ruby-2.0.0-p195.tar.bz2 From 486dd7a45b2a2792dd0e2bb32345db8ed5a605fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 20 May 2013 15:58:21 +0200 Subject: [PATCH 329/529] The exec_prefix seems to be correct now. --- ruby-2.0.0-revert-unexpand-exec-prefix.patch | 43 -------------------- ruby.spec | 5 --- 2 files changed, 48 deletions(-) delete mode 100644 ruby-2.0.0-revert-unexpand-exec-prefix.patch diff --git a/ruby-2.0.0-revert-unexpand-exec-prefix.patch b/ruby-2.0.0-revert-unexpand-exec-prefix.patch deleted file mode 100644 index 35067aa..0000000 --- a/ruby-2.0.0-revert-unexpand-exec-prefix.patch +++ /dev/null @@ -1,43 +0,0 @@ -* Unmerged path ChangeLog -diff --git a/configure.in b/configure.in -index be7d4fe..2d511e5 100644 ---- a/configure.in -+++ b/configure.in -@@ -2574,14 +2574,9 @@ AS_CASE(["$target_os"], - - AC_SUBST(setup) - --test x"$prefix" = xNONE && prefix=$ac_default_prefix --test x"${exec_prefix}" = xNONE && exec_prefix="$prefix" --pat=`echo "${exec_prefix}" | tr -c '\012' .`'\(.*\)' --for var in bindir libdir; do -- eval val='"$'$var'"' -- AS_CASE(["$val"], ["${exec_prefix}"*], [val='${exec_prefix}'"`expr \"$val\" : \"$pat\"`"]) -- eval $var='"$val"' --done -+if test "$prefix" = NONE; then -+ prefix=$ac_default_prefix -+fi - - BTESTRUBY='$(MINIRUBY)' - if test x"$cross_compiling" = xyes; then -@@ -3211,9 +3216,6 @@ AS_CASE(["$target_os"], - - shvar_to_cpp() { - var="$1" val="$2" -- exec_prefix_pat="`echo \"${exec_prefix}\" | sed 's/\\./\\\\./g'`" -- arch_pat="`echo \"${arch}\" | sed 's/\\./\\\\./g'`" -- sitearch_pat="`echo \"${sitearch}\" | sed 's/\\./\\\\./g'`" - val="`echo '\"'\"${val}\"'\"' | - sed \ - -e 's/\${\([[A-Z][A-Z_]]*\)}/\"\1\"/g' \ -@@ -3236,9 +3238,6 @@ shvar_to_cpp() { - -e 's/\${rubyarchprefix}/\"RUBY_ARCH_PREFIX_FOR(arch)\"/g' \ - -e 's/\${rubysitearchprefix}/\"RUBY_SITEARCH_PREFIX_FOR(arch)\"/g' \ - -e 's/\${exec_prefix}/\"RUBY_EXEC_PREFIX\"/g' \ -- -e \"s|${exec_prefix_pat}/|\"'\"RUBY_EXEC_PREFIX\"/|g' \ -- -e \"s|${arch_pat}|\"'\"arch\"|g' \ -- -e \"s|${sitearch_pat}|\"'\"sitearch\"|g' \ - -e 's|^\\\"NONE/|RUBY_EXEC_PREFIX\\\"/|' \ - -e 's|^\\\"NONE\\\"|\\\"'\"${prefix}\"'\\\"|' \ - -e 's/^\\\"\\\"\(.\)/\1/;s/\(.\)\\\"\\\"$/\1/' diff --git a/ruby.spec b/ruby.spec index 32790f8..2a72381 100644 --- a/ruby.spec +++ b/ruby.spec @@ -135,10 +135,6 @@ Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.pat # This prevents issues, when ruby configuration specifies --with-ruby-version=''. # https://github.com/rubygems/rubygems/pull/455 Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch -# Fixes issues with wrong value of Rubygem's shebang introduced in r39267. -# https://bugs.ruby-lang.org/issues/7915 -# TODO: -Patch15: ruby-2.0.0-revert-unexpand-exec-prefix.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -402,7 +398,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch12 -p1 %patch13 -p1 %patch14 -p1 -%patch15 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . From 1ae6ae5b623869a42127e48f845a6721292bbddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 21 May 2013 11:30:34 +0200 Subject: [PATCH 330/529] Fix build against OpenSSL with enabled ECC curves. --- ...inst-OpenSSL-with-enabled-ECC-curves.patch | 85 +++++++++++++++++++ ruby.spec | 7 ++ 2 files changed, 92 insertions(+) create mode 100644 ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch diff --git a/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch b/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch new file mode 100644 index 0000000..461b787 --- /dev/null +++ b/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch @@ -0,0 +1,85 @@ +From 5617aafa2d44d0a4bc811830e225463abd01b2b2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 21 May 2013 10:01:33 +0200 +Subject: [PATCH] Fix build against OpenSSL with enabled ECC curves. + +--- + ext/openssl/ossl_pkey_ec.c | 4 ++++ + test/openssl/test_pkey_ec.rb | 26 +++++++++++++------------- + 2 files changed, 17 insertions(+), 13 deletions(-) + +diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c +index 8e6d88f..29e28ca 100644 +--- a/ext/openssl/ossl_pkey_ec.c ++++ b/ext/openssl/ossl_pkey_ec.c +@@ -762,8 +762,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) + method = EC_GFp_mont_method(); + } else if (id == s_GFp_nist) { + method = EC_GFp_nist_method(); ++#if !defined(OPENSSL_NO_EC2M) + } else if (id == s_GF2m_simple) { + method = EC_GF2m_simple_method(); ++#endif + } + + if (method) { +@@ -817,8 +819,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) + + if (id == s_GFp) { + new_curve = EC_GROUP_new_curve_GFp; ++#if !defined(OPENSSL_NO_EC2M) + } else if (id == s_GF2m) { + new_curve = EC_GROUP_new_curve_GF2m; ++#endif + } else { + ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m"); + } +diff --git a/test/openssl/test_pkey_ec.rb b/test/openssl/test_pkey_ec.rb +index f151335..56f3ff7 100644 +--- a/test/openssl/test_pkey_ec.rb ++++ b/test/openssl/test_pkey_ec.rb +@@ -7,28 +7,28 @@ class OpenSSL::TestEC < Test::Unit::TestCase + @data1 = 'foo' + @data2 = 'bar' * 1000 # data too long for DSA sig + +- @group1 = OpenSSL::PKey::EC::Group.new('secp112r1') +- @group2 = OpenSSL::PKey::EC::Group.new('sect163k1') +- @group3 = OpenSSL::PKey::EC::Group.new('prime256v1') ++ @groups = [] ++ @keys = [] + +- @key1 = OpenSSL::PKey::EC.new +- @key1.group = @group1 +- @key1.generate_key ++ OpenSSL::PKey::EC.builtin_curves.each do |curve, comment| ++ group = OpenSSL::PKey::EC::Group.new(curve) + +- @key2 = OpenSSL::PKey::EC.new(@group2.curve_name) +- @key2.generate_key ++ key = OpenSSL::PKey::EC.new(group) ++ key.generate_key + +- @key3 = OpenSSL::PKey::EC.new(@group3) +- @key3.generate_key +- +- @groups = [@group1, @group2, @group3] +- @keys = [@key1, @key2, @key3] ++ @groups << group ++ @keys << key ++ end + end + + def compare_keys(k1, k2) + assert_equal(k1.to_pem, k2.to_pem) + end + ++ def test_builtin_curves ++ assert(!OpenSSL::PKey::EC.builtin_curves.empty?) ++ end ++ + def test_curve_names + @groups.each_with_index do |group, idx| + key = @keys[idx] +-- +1.8.2.1 + diff --git a/ruby.spec b/ruby.spec index 2a72381..a0dd183 100644 --- a/ruby.spec +++ b/ruby.spec @@ -135,6 +135,11 @@ Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.pat # This prevents issues, when ruby configuration specifies --with-ruby-version=''. # https://github.com/rubygems/rubygems/pull/455 Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch +# Although this does not directly affects Fedora ATM, it might be issue when +# rebuilding package on different platform (RHEL7). Please keep the patch until +# it is resolved in upstream. +# https://bugs.ruby-lang.org/issues/8384 +Patch15: ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -398,6 +403,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch12 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -844,6 +850,7 @@ make check TESTS="-v $DISABLE_TESTS" * Fri May 17 2013 V鱈t Ondruch - 2.0.0.195-8 - Update to Ruby 2.0.0-p195 (rhbz#917374). - Fix object taint bypassing in DL and Fiddle (CVE-2013-2065). +- Fix build against OpenSSL with enabled ECC curves. * Fri Apr 19 2013 V鱈t Ondruch - 2.0.0.0-7 - Macro definition moved into macros.ruby and macros.rubygems files. From 63dd7b41ef9166cae3597eccfc24cdc6c19c8b80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 21 May 2013 12:49:40 +0200 Subject: [PATCH 331/529] Add aarch64 support (rhbz#926463). --- ruby-2.0.0-p195-aarch64.patch | 360 ++++++++++++++++++++++++++++++++++ ruby.spec | 8 + 2 files changed, 368 insertions(+) create mode 100644 ruby-2.0.0-p195-aarch64.patch diff --git a/ruby-2.0.0-p195-aarch64.patch b/ruby-2.0.0-p195-aarch64.patch new file mode 100644 index 0000000..8009d32 --- /dev/null +++ b/ruby-2.0.0-p195-aarch64.patch @@ -0,0 +1,360 @@ +diff -urN ruby-2.0.0-p0/tool/config.guess ruby-2.0.0-p0-aarch64/tool/config.guess +--- ruby-2.0.0-p0/tool/config.guess 2012-01-29 07:50:18.000000000 -0600 ++++ ruby-2.0.0-p0-aarch64/tool/config.guess 2013-03-08 07:15:49.233030866 -0600 +@@ -2,9 +2,9 @@ + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, + # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +-# 2011 Free Software Foundation, Inc. ++# 2011, 2012 Free Software Foundation, Inc. + +-timestamp='2011-11-11' ++timestamp='2012-09-25' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -17,9 +17,7 @@ + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +-# 02110-1301, USA. ++# along with this program; if not, see . + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a +@@ -57,8 +55,8 @@ + + Originally written by Per Bothner. + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +-Software Foundation, Inc. ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 ++Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -145,7 +143,7 @@ + case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or +- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, ++ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward +@@ -202,6 +200,10 @@ + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; ++ *:Bitrig:*:*) ++ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` ++ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} ++ exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} +@@ -304,7 +306,7 @@ + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; +- arm:riscos:*:*|arm:RISCOS:*:*) ++ arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) +@@ -803,6 +805,9 @@ + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; ++ *:MINGW64*:*) ++ echo ${UNAME_MACHINE}-pc-mingw64 ++ exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; +@@ -863,6 +868,13 @@ + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; ++ aarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; ++ aarch64_be:Linux:*:*) ++ UNAME_MACHINE=aarch64_be ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; +@@ -897,16 +909,16 @@ + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + cris:Linux:*:*) +- echo cris-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + crisv32:Linux:*:*) +- echo crisv32-axis-linux-gnu ++ echo ${UNAME_MACHINE}-axis-linux-gnu + exit ;; + frv:Linux:*:*) +- echo frv-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) +- echo hexagon-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu +@@ -948,7 +960,7 @@ + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) +- echo or32-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu +@@ -989,7 +1001,7 @@ + echo ${UNAME_MACHINE}-dec-linux-gnu + exit ;; + x86_64:Linux:*:*) +- echo x86_64-unknown-linux-gnu ++ echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu +@@ -1196,6 +1208,9 @@ + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; ++ x86_64:Haiku:*:*) ++ echo x86_64-unknown-haiku ++ exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; +@@ -1251,7 +1266,7 @@ + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; +- NSE-?:NONSTOP_KERNEL:*:*) ++ NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) +@@ -1320,11 +1335,11 @@ + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; ++ x86_64:VMkernel:*:*) ++ echo ${UNAME_MACHINE}-unknown-esx ++ exit ;; + esac + +-#echo '(No uname command or uname output not recognized.)' 1>&2 +-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 +- + eval $set_cc_for_build + cat >$dummy.c <. + # + # As a special exception to the GNU General Public License, if you + # distribute this file as part of a program that contains a +@@ -76,8 +74,8 @@ + GNU config.sub ($timestamp) + + Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +-Software Foundation, Inc. ++2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 ++Free Software Foundation, Inc. + + This is free software; see the source for copying conditions. There is NO + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." +@@ -125,13 +123,17 @@ + maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` + case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ +- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ ++ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; ++ android-linux) ++ os=-linux-android ++ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ++ ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] +@@ -154,7 +156,7 @@ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple | -axis | -knuth | -cray | -microblaze) ++ -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; +@@ -223,6 +225,12 @@ + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; ++ -lynx*178) ++ os=-lynxos178 ++ ;; ++ -lynx*5) ++ os=-lynxos5 ++ ;; + -lynx*) + os=-lynxos + ;; +@@ -247,6 +255,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ +@@ -264,7 +273,7 @@ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ +- | maxq | mb | microblaze | mcore | mep | metag \ ++ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ +@@ -319,8 +328,7 @@ + c6x) + basic_machine=tic6x-unknown + ;; +- m6811 | m68hc11 | m6812 | m68hc12 | picochip) +- # Motorola 68HC11/12. ++ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; +@@ -333,7 +341,10 @@ + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; +- ++ xgate) ++ basic_machine=$basic_machine-unknown ++ os=-none ++ ;; + xscaleeb) + basic_machine=armeb-unknown + ;; +@@ -356,6 +367,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ +@@ -377,7 +389,8 @@ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ ++ | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ +@@ -719,7 +732,6 @@ + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +-# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 +@@ -777,9 +789,13 @@ + basic_machine=ns32k-utek + os=-sysv + ;; +- microblaze) ++ microblaze*) + basic_machine=microblaze-xilinx + ;; ++ mingw64) ++ basic_machine=x86_64-pc ++ os=-mingw64 ++ ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 +@@ -1341,15 +1357,15 @@ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ +- | -openbsd* | -solidbsd* \ ++ | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ +- | -mingw32* | -linux-gnu* | -linux-android* \ +- | -linux-newlib* | -linux-uclibc* \ ++ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ ++ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ +@@ -1532,6 +1548,9 @@ + c4x-* | tic4x-*) + os=-coff + ;; ++ hexagon-*) ++ os=-elf ++ ;; + tic54x-*) + os=-coff + ;; +@@ -1559,9 +1578,6 @@ + ;; + m68000-sun) + os=-sunos3 +- # This also exists in the configure program, but was not the +- # default. +- # os=-sunos4 + ;; + m68*-cisco) + os=-aout diff --git a/ruby.spec b/ruby.spec index a0dd183..3cba66a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -140,6 +140,12 @@ Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch # it is resolved in upstream. # https://bugs.ruby-lang.org/issues/8384 Patch15: ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch +# Adds aarch64 support. +# http://bugs.ruby-lang.org/issues/8331 +# https://bugzilla.redhat.com/show_bug.cgi?id=926463 +# Please note that this is the BZ patch, it might be good idea to update it +# with its upstream version when available. +Patch16: ruby-2.0.0-p195-aarch64.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -404,6 +410,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -851,6 +858,7 @@ make check TESTS="-v $DISABLE_TESTS" - Update to Ruby 2.0.0-p195 (rhbz#917374). - Fix object taint bypassing in DL and Fiddle (CVE-2013-2065). - Fix build against OpenSSL with enabled ECC curves. +- Add aarch64 support (rhbz#926463). * Fri Apr 19 2013 V鱈t Ondruch - 2.0.0.0-7 - Macro definition moved into macros.ruby and macros.rubygems files. From 26512adf3710d261f4c7adcc3af40bdfdcd853d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 1 Jul 2013 12:03:01 +0200 Subject: [PATCH 332/529] Update to Ruby 2.0.0-p247 (rhbz#979605). Fix CVE-2013-4073. Fix for wrong makefiles created by mkmf (rhbz#921650). --- .gitignore | 1 + ruby-1.9.3-fix-s390x-build.patch | 25 ------------------------- ruby.spec | 12 +++++++----- sources | 2 +- 4 files changed, 9 insertions(+), 31 deletions(-) delete mode 100644 ruby-1.9.3-fix-s390x-build.patch diff --git a/.gitignore b/.gitignore index f2ff6b0..b883574 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-2.0.0-r39387.tar.gz /ruby-2.0.0-p0.tar.gz /ruby-2.0.0-p195.tar.bz2 +/ruby-2.0.0-p247.tar.bz2 diff --git a/ruby-1.9.3-fix-s390x-build.patch b/ruby-1.9.3-fix-s390x-build.patch deleted file mode 100644 index 3e7056f..0000000 --- a/ruby-1.9.3-fix-s390x-build.patch +++ /dev/null @@ -1,25 +0,0 @@ -From d006c4d04aecbe80469a26a6114b776e9de4e3c8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Mon, 19 Nov 2012 14:39:19 +0100 -Subject: [PATCH] Fix s390x build. - ---- - ext/tk/extconf.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ext/tk/extconf.rb b/ext/tk/extconf.rb -index 8f3bff8..69e90a1 100644 ---- a/ext/tk/extconf.rb -+++ b/ext/tk/extconf.rb -@@ -114,7 +114,7 @@ def is_macosx? - end - - def maybe_64bit? -- /64|universal/ =~ RUBY_PLATFORM -+ /64|universal|s390x/ =~ RUBY_PLATFORM - end - - def check_tcltk_version(version) --- -1.8.1 - diff --git a/ruby.spec b/ruby.spec index 3cba66a..76e0f77 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 2 %global minor_version 0 %global teeny_version 0 -%global patch_level 195 +%global patch_level 247 %global major_minor_version %{major_version}.%{minor_version} @@ -26,7 +26,7 @@ %endif -%global release 8 +%global release 9 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.0.2 @@ -111,8 +111,6 @@ Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. Patch3: ruby-1.9.3-always-use-i386.patch -# http://redmine.ruby-lang.org/issues/5465 -Patch4: ruby-1.9.3-fix-s390x-build.patch # Fixes random WEBRick test failures. # https://bugs.ruby-lang.org/issues/6573. Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch @@ -402,7 +400,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch0 -p1 %patch3 -p1 -%patch4 -p1 %patch5 -p1 %patch8 -p1 %patch9 -p1 @@ -854,6 +851,11 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Jul 01 2013 V鱈t Ondruch - 2.0.0.247-9 +- Update to Ruby 2.0.0-p247 (rhbz#979605). +- Fix CVE-2013-4073. +- Fix for wrong makefiles created by mkmf (rhbz#921650). + * Fri May 17 2013 V鱈t Ondruch - 2.0.0.195-8 - Update to Ruby 2.0.0-p195 (rhbz#917374). - Fix object taint bypassing in DL and Fiddle (CVE-2013-2065). diff --git a/sources b/sources index c66f5b1..44c414b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2f54faea6ee1ca500632ec3c0cb59cb6 ruby-2.0.0-p195.tar.bz2 +60913f3eec0c4071f44df42600be2604 ruby-2.0.0-p247.tar.bz2 From ca9cb26aacb207ee39c287445a486ce87dae7c13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 24 Jun 2013 14:14:13 +0200 Subject: [PATCH 333/529] Add support for ABRT autoloading. --- ...-additional-preludes-by-configuratio.patch | 43 +++++++++++++++++++ ruby.spec | 18 ++++++++ 2 files changed, 61 insertions(+) create mode 100644 ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch new file mode 100644 index 0000000..3a36f91 --- /dev/null +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -0,0 +1,43 @@ +diff --git a/Makefile.in b/Makefile.in +index a93a1e6..fb30c19 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -108,6 +108,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ + XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ + + DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE) ++OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ + + #### End of system configuration section. #### + +diff --git a/common.mk b/common.mk +index e5069e5..ca5e3f9 100644 +--- a/common.mk ++++ b/common.mk +@@ -107,7 +107,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) + + GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) + +-PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) ++PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) + GEM_PRELUDE = $(srcdir)/gem_prelude.rb + YES_GEM_PRELUDE = $(GEM_PRELUDE) + NO_GEM_PRELUDE = +diff --git a/configure.in b/configure.in +index 7977aaf..1ef42cd 100644 +--- a/configure.in ++++ b/configure.in +@@ -3494,6 +3494,13 @@ AC_SUBST(rubyarchhdrdir)dnl + AC_SUBST(sitearchhdrdir)dnl + AC_SUBST(vendorarchhdrdir)dnl + ++AC_ARG_WITH(prelude, ++ AS_HELP_STRING([--with-prelude=FILE-LIST], [specify additional preludes separated by space]), ++ [prelude=$withval]) ++if test "$prelude" != ""; then ++ AC_SUBST(OPTIONAL_PRELUDES, $prelude) ++fi ++ + AC_ARG_WITH(mantype, + AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), + [ diff --git a/ruby.spec b/ruby.spec index 76e0f77..1387a98 100644 --- a/ruby.spec +++ b/ruby.spec @@ -73,6 +73,7 @@ Source2: libruby.stp Source3: ruby-exercise.stp Source4: macros.ruby Source5: macros.rubygems +Source6: abrt_prelude.rb # Include the constants defined in macros files. @@ -144,6 +145,10 @@ Patch15: ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch # Please note that this is the BZ patch, it might be good idea to update it # with its upstream version when available. Patch16: ruby-2.0.0-p195-aarch64.patch +# Adds support for '--with-prelude' configuration option. This allows to built +# in support for ABRT. +# http://bugs.ruby-lang.org/issues/8566 +Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -408,10 +413,16 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . +# Make abrt_prelude.rb available for compilation process. The prelude must be +# available together with Ruby's source due to +# https://github.com/ruby/ruby/blob/trunk/tool/compile_prelude.rb#L26 +cp -a %{SOURCE6} . + %build autoconf @@ -432,6 +443,7 @@ autoconf --enable-shared \ --with-ruby-version='' \ --enable-multiarch \ + --with-prelude=./abrt_prelude.rb \ @@ -561,6 +573,11 @@ DISABLE_TESTS="-x test_process.rb $DISABLE_TESTS" # http://bugs.ruby-lang.org/issues/7912 DISABLE_TESTS="-x test_rbconfig.rb $DISABLE_TESTS" +# test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, +# when abrt.rb cannot be required (seems to be easier way then customizing +# the test suite). +touch abrt.rb + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -855,6 +872,7 @@ make check TESTS="-v $DISABLE_TESTS" - Update to Ruby 2.0.0-p247 (rhbz#979605). - Fix CVE-2013-4073. - Fix for wrong makefiles created by mkmf (rhbz#921650). +- Add support for ABRT autoloading. * Fri May 17 2013 V鱈t Ondruch - 2.0.0.195-8 - Update to Ruby 2.0.0-p195 (rhbz#917374). From 315c4674d5633f75489fbc5e91ba60e049378dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 1 Jul 2013 14:32:54 +0200 Subject: [PATCH 334/529] Add abrt_prelude.rb. --- abrt_prelude.rb | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 abrt_prelude.rb diff --git a/abrt_prelude.rb b/abrt_prelude.rb new file mode 100644 index 0000000..5ffc51d --- /dev/null +++ b/abrt_prelude.rb @@ -0,0 +1,4 @@ +begin + require 'abrt' +rescue LoadError +end From 1e68c10ca8fdeef75236b24640285f3e68f723a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 2 Jul 2013 12:17:15 +0200 Subject: [PATCH 335/529] Better support for build without configuration (rhbz#977941). --- config.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ ruby.spec | 17 +++++++++++++++-- 2 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 config.h diff --git a/config.h b/config.h new file mode 100644 index 0000000..ce501db --- /dev/null +++ b/config.h @@ -0,0 +1,46 @@ +/* + * This config.h is a wrapper include file for the original ruby/config.h, + * which has been renamed to ruby/config-.h. There are conflicts for the + * original ruby/config.h on multilib systems, which result from arch-specific + * configuration options. Please do not use the arch-specific file directly. + */ + +/* + * This wrapped is addpated from SDL's one: + * http://pkgs.fedoraproject.org/cgit/SDL.git/tree/SDL_config.h + */ + +#ifdef ruby_config_wrapper_h +#error "ruby_config_wrapper_h should not be defined!" +#endif +#define ruby_config_wrapper_h + +#if defined(__i386__) +#include "ruby/config-i386.h" +#elif defined(__ia64__) +#include "ruby/config-ia64.h" +#elif defined(__powerpc64__) +#include "ruby/config-ppc64.h" +#elif defined(__powerpc__) +#include "ruby/config-ppc.h" +#elif defined(__s390x__) +#include "ruby/config-s390x.h" +#elif defined(__s390__) +#include "ruby/config-s390.h" +#elif defined(__x86_64__) +#include "ruby/config-x86_64.h" +#elif defined(__arm__) +#include "ruby/config-arm.h" +#elif defined(__alpha__) +#include "ruby/config-alpha.h" +#elif defined(__sparc__) && defined (__arch64__) +#include "ruby/config-sparc64.h" +#elif defined(__sparc__) +#include "ruby/config-sparc.h" +#elif defined(__aarch64__) +#include "ruby/config-aarch64.h" +#else +#error "The ruby-devel package is not usable with the architecture." +#endif + +#undef ruby_config_wrapper_h diff --git a/ruby.spec b/ruby.spec index 1387a98..b7303a0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 9 +%global release 10 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.0.2 @@ -74,6 +74,11 @@ Source3: ruby-exercise.stp Source4: macros.ruby Source5: macros.rubygems Source6: abrt_prelude.rb +# This wrapper fixes https://bugzilla.redhat.com/show_bug.cgi?id=977941 +# Hopefully, it will get removed soon: +# https://fedorahosted.org/fpc/ticket/312 +# https://bugzilla.redhat.com/show_bug.cgi?id=977941 +Source7: config.h # Include the constants defined in macros files. @@ -434,7 +439,7 @@ autoconf --with-vendordir='%{ruby_vendorlibdir}' \ --with-vendorarchdir='%{ruby_vendorarchdir}' \ --with-rubyhdrdir='%{_includedir}' \ - --with-rubyarchhdrdir='$(archincludedir)' \ + --with-rubyarchhdrdir='%{_includedir}' \ --with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \ --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ --with-rubygemsdir='%{rubygems_dir}' \ @@ -455,6 +460,11 @@ make %{?_smp_mflags} COPY="cp -p" Q= rm -rf %{buildroot} make install DESTDIR=%{buildroot} +# Rename ruby/config.h to ruby/config-.h to avoid file conflicts on +# multilib systems and install config.h wrapper +mv %{buildroot}%{_includedir}/%{name}/config.h %{buildroot}%{_includedir}/%{name}/config-%{_arch}.h +install -m644 %{SOURCE7} %{buildroot}%{_includedir}/%{name}/config.h + # Rename the ruby executable. It is replaced by RubyPick. %{?with_rubypick:mv %{buildroot}%{_bindir}/%{name}{,-mri}} @@ -868,6 +878,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Jul 02 2013 V鱈t Ondruch - 2.0.0.247-10 +- Better support for build without configuration (rhbz#977941). + * Mon Jul 01 2013 V鱈t Ondruch - 2.0.0.247-9 - Update to Ruby 2.0.0-p247 (rhbz#979605). - Fix CVE-2013-4073. From e91db1d96bf36ce43080039f5e1fcde41c649041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 2 Jul 2013 12:18:50 +0200 Subject: [PATCH 336/529] Fix DESTDIR issue once more (rhbz#921650). --- ...refix-install_dirs-only-with-DESTDIR.patch | 70 +++++++++++++++++++ ruby.spec | 4 ++ 2 files changed, 74 insertions(+) create mode 100644 ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch diff --git a/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch b/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch new file mode 100644 index 0000000..fa7d946 --- /dev/null +++ b/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch @@ -0,0 +1,70 @@ +From 28e8a4ad0146fef37b514bde9a27ba5b6f7c34c5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 2 Jul 2013 11:51:50 +0200 +Subject: [PATCH] Revert "mkmf.rb: prefix install_dirs only with DESTDIR" + +This reverts commit 7e1d5045943835ff906850e7b3bc71f985ae5f36. +--- + lib/mkmf.rb | 29 ++++++++++++++--------------- + 1 file changed, 14 insertions(+), 15 deletions(-) + +diff --git a/lib/mkmf.rb b/lib/mkmf.rb +index ee89198..cca487e 100644 +--- a/lib/mkmf.rb ++++ b/lib/mkmf.rb +@@ -189,21 +189,21 @@ module MakeMakefile + ] + elsif $configure_args.has_key?('--vendor') + dirs = [ +- ['BINDIR', '$(DESTDIR)$(bindir)'], +- ['RUBYCOMMONDIR', '$(DESTDIR)$(vendordir)$(target_prefix)'], +- ['RUBYLIBDIR', '$(DESTDIR)$(vendorlibdir)$(target_prefix)'], +- ['RUBYARCHDIR', '$(DESTDIR)$(vendorarchdir)$(target_prefix)'], +- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], +- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], ++ ['BINDIR', '$(bindir)'], ++ ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'], ++ ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'], ++ ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'], ++ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], ++ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], + ] + else + dirs = [ +- ['BINDIR', '$(DESTDIR)$(bindir)'], +- ['RUBYCOMMONDIR', '$(DESTDIR)$(sitedir)$(target_prefix)'], +- ['RUBYLIBDIR', '$(DESTDIR)$(sitelibdir)$(target_prefix)'], +- ['RUBYARCHDIR', '$(DESTDIR)$(sitearchdir)$(target_prefix)'], +- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], +- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], ++ ['BINDIR', '$(bindir)'], ++ ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'], ++ ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'], ++ ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'], ++ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], ++ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], + ] + end + dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")] +@@ -1728,7 +1728,6 @@ SRC + end + + def with_destdir(dir) +- return dir unless $extmk + dir = dir.sub($dest_prefix_pattern, '') + /\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir + end +@@ -1787,8 +1786,8 @@ ECHO = $(ECHO1:0=@echo) + #### Start of system configuration section. #### + #{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk} + srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}} +-topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace} +-hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace} ++topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).unspace} ++hdrdir = #{mkintpath(CONFIG["hdrdir"]).unspace} + arch_hdrdir = #{$arch_hdrdir.quote} + PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']} + VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} +-- +1.8.2.1 + diff --git a/ruby.spec b/ruby.spec index b7303a0..6889f1c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -154,6 +154,9 @@ Patch16: ruby-2.0.0-p195-aarch64.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# Fixes issues with DESTDIR. +# https://bugs.ruby-lang.org/issues/8115 +Patch18: ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -419,6 +422,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . From 06a69a4fd92bc7d9c4cc3ccabf1ebff5f5a2b216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 2 Jul 2013 12:46:48 +0200 Subject: [PATCH 337/529] Fix RubyGems version. --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 6889f1c..951038f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,10 +26,10 @@ %endif -%global release 10 +%global release 11 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.0.2 +%global rubygems_version 2.0.3 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -882,6 +882,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Jul 02 2013 V鱈t Ondruch - 2.0.0.247-11 +- Fix RubyGems version. + * Tue Jul 02 2013 V鱈t Ondruch - 2.0.0.247-10 - Better support for build without configuration (rhbz#977941). From 7a3d8e78c6b0721c10cdc04559a972588aa02c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 4 Jul 2013 14:47:51 +0200 Subject: [PATCH 338/529] Fix RubyGems search paths when building gems with native extension (rhbz#979133). --- operating_system.rb | 8 +++++++- ruby.spec | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/operating_system.rb b/operating_system.rb index 4055ed5..c3b19d6 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -28,7 +28,13 @@ module Gem # platform independent (:gem_dir) and dependent (:ext_dir) files. def default_dirs - @libdir ||= ConfigMap[:sitelibdir] == ConfigMap[:sitearchdir] ? ConfigMap[:datadir] : ConfigMap[:libdir] + @libdir ||= case RUBY_PLATFORM + when 'java' + ConfigMap[:datadir] + else + ConfigMap[:libdir] + end + @default_dirs ||= Hash[default_locations.collect do |destination, path| [destination, { :bin_dir => File.join(path, ConfigMap[:bindir].split(File::SEPARATOR).last), diff --git a/ruby.spec b/ruby.spec index 951038f..cd3c735 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 11 +%global release 12 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.0.3 @@ -882,6 +882,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Jul 04 2013 V鱈t Ondruch - 2.0.0.247-12 +- Fix RubyGems search paths when building gems with native extension + (rhbz#979133). + * Tue Jul 02 2013 V鱈t Ondruch - 2.0.0.247-11 - Fix RubyGems version. From 8ed2f329eca1606f1bb3ddbb7a0e58466ef2c0c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 11 Jul 2013 11:02:00 +0200 Subject: [PATCH 339/529] Fixes multilib conlicts of .gemspec files. --- ...Specification.files-in-default-.gems.patch | 28 +++++++++++++++++++ ruby.spec | 9 +++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch diff --git a/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch b/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch new file mode 100644 index 0000000..2989954 --- /dev/null +++ b/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch @@ -0,0 +1,28 @@ +From fb9fcc8b01d968c62577756cbfd00f20a10b5cbf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 9 Jul 2013 12:32:49 +0200 +Subject: [PATCH] Make stable Gem::Specification.files in default .gemspecs + +Although the .gemspec files for default gems are same in function, the +different order of their "s.files" makes them different therefore +possibly conflicting in multilib scenario. +--- + tool/rbinstall.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb +index 1063fac..fb2fcee 100755 +--- a/tool/rbinstall.rb ++++ b/tool/rbinstall.rb +@@ -592,7 +592,7 @@ module RbInstall + end + + def collect +- ruby_libraries + built_libraries ++ (ruby_libraries + built_libraries).sort + end + + private +-- +1.8.3.1 + diff --git a/ruby.spec b/ruby.spec index cd3c735..8425afa 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 12 +%global release 13 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.0.3 @@ -157,6 +157,9 @@ Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Fixes issues with DESTDIR. # https://bugs.ruby-lang.org/issues/8115 Patch18: ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch +# Fixes multilib conlicts of .gemspec files. +# https://bugs.ruby-lang.org/issues/8623 +Patch19: ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -423,6 +426,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -882,6 +886,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Jul 11 2013 V鱈t Ondruch - 2.0.0.247-13 +- Fixes multilib conlicts of .gemspec files. + * Thu Jul 04 2013 V鱈t Ondruch - 2.0.0.247-12 - Fix RubyGems search paths when building gems with native extension (rhbz#979133). From 127768a63e392e95bd1364f1ee4f1cf18a362bd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 11 Jul 2013 11:03:29 +0200 Subject: [PATCH 340/529] Enable TestRbConfig, since it was fixed upstream. --- ruby.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 8425afa..84eeeb7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -587,10 +587,6 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" DISABLE_TESTS="-x test_process.rb $DISABLE_TESTS" %endif -# The TestRbConfig errors, which does not respect configuration options. -# http://bugs.ruby-lang.org/issues/7912 -DISABLE_TESTS="-x test_rbconfig.rb $DISABLE_TESTS" - # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). From b2e10a3b7cd5a0e2f7223ce391e1f76aef5c600d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 11 Jul 2013 11:04:16 +0200 Subject: [PATCH 341/529] Enable test_spawn_too_long_path, since it was fixed by upstream. --- ruby.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index 84eeeb7..e66b85a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -581,12 +581,6 @@ DISABLE_TESTS="" DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" %endif -%ifarch ppc ppc64 -# test_spawn_too_long_path(TestProcess) fails with [Errno::ENOENT, Errno::E2BIG, nil] expected but nothing was raised. -# https://bugs.ruby-lang.org/issues/7904 -DISABLE_TESTS="-x test_process.rb $DISABLE_TESTS" -%endif - # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). From 1fdf929486ffb73fbddc46dd3738250261b1344f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 12 Jul 2013 14:55:07 +0200 Subject: [PATCH 342/529] Make symlinks for psych gem to ruby stdlib dirs (rhbz#979133). --- ruby.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ruby.spec b/ruby.spec index e66b85a..7fe35ce 100644 --- a/ruby.spec +++ b/ruby.spec @@ -542,6 +542,9 @@ mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib/ mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications +ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir}/psych +ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb +ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/lib/psych.so %{buildroot}%{ruby_libarchdir}/psych.so # Adjust the gemspec files so that the gems will load properly sed -i '/^end$/ i\ @@ -643,6 +646,7 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{ruby_libdir}/irb.rb %exclude %{ruby_libdir}/tcltk.rb %exclude %{ruby_libdir}/tk*.rb +%exclude %{ruby_libdir}/psych.rb %{ruby_libdir}/cgi %{ruby_libdir}/date %{ruby_libdir}/digest @@ -862,6 +866,8 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %files -n rubygem-psych +%{ruby_libdir}/psych +%{ruby_libarchdir}/psych.so %{_libdir}/gems/%{name}/psych-%{psych_version} %{gem_dir}/gems/psych-%{psych_version} %{gem_dir}/specifications/psych-%{psych_version}.gemspec @@ -878,6 +884,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Thu Jul 11 2013 V鱈t Ondruch - 2.0.0.247-13 - Fixes multilib conlicts of .gemspec files. +- Make symlinks for psych gem to ruby stdlib dirs (rhbz#979133). * Thu Jul 04 2013 V鱈t Ondruch - 2.0.0.247-12 - Fix RubyGems search paths when building gems with native extension From ed87733a22ff773cff9439360c576e0179f0bcd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 12 Jul 2013 14:55:45 +0200 Subject: [PATCH 343/529] Fix macros in comments. --- ruby.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 7fe35ce..eeb3c38 100644 --- a/ruby.spec +++ b/ruby.spec @@ -198,7 +198,6 @@ straight-forward, and extensible. %package devel Summary: A Ruby development environment Group: Development/Languages -# Requires: %{name}-libs = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel @@ -932,7 +931,7 @@ make check TESTS="-v $DISABLE_TESTS" * Mon Feb 25 2013 V鱈t Ondruch - 2.0.0.0-1 - Update to Ruby 2.0.0-p0. -- Change %{ruby_extdir} to %{ruby_extdir_mri} in preparation for better +- Change %%{ruby_extdir} to %%{ruby_extdir_mri} in preparation for better JRuby support. * Mon Feb 25 2013 Mamoru TASAKA - 2.0.0.0-0.3.r39387 From 49825df9b494abee510978fca7c7ba82885b05a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 12 Jul 2013 16:24:11 +0200 Subject: [PATCH 344/529] Use system-wide cert.pem. --- ruby.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ruby.spec b/ruby.spec index eeb3c38..e2037ef 100644 --- a/ruby.spec +++ b/ruby.spec @@ -181,6 +181,8 @@ BuildRequires: tk-devel # Needed to pass test_set_program_name(TestRubyOptions) BuildRequires: procps BuildRequires: %{_bindir}/dtrace +# Unbundle cert.pem +BuildRequires: ca-certificates # This package provides %%{_bindir}/ruby-mri therefore it is marked by this # virtual provide. It can be installed as dependency of rubypick. @@ -223,6 +225,7 @@ Requires: ruby(release) Requires: rubygem(rdoc) >= %{rdoc_version} Requires: rubygem(io-console) >= %{io_console_version} Requires: rubygem(psych) >= %{psych_version} +Requires: ca-certificates Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} BuildArch: noarch @@ -487,6 +490,11 @@ sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.ruby install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rpm/macros.rubygems sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.rubygems +# Kill bundled cert.pem +mkdir -p %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ +ln -sf %{_sysconfdir}/pki/tls/cert.pem \ + %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ca-bundle.pem + # Install custom operating_system.rb. mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults @@ -884,6 +892,7 @@ make check TESTS="-v $DISABLE_TESTS" * Thu Jul 11 2013 V鱈t Ondruch - 2.0.0.247-13 - Fixes multilib conlicts of .gemspec files. - Make symlinks for psych gem to ruby stdlib dirs (rhbz#979133). +- Use system-wide cert.pem. * Thu Jul 04 2013 V鱈t Ondruch - 2.0.0.247-12 - Fix RubyGems search paths when building gems with native extension From 142da175a227b4462b29503991f24d13934fb59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 15 Jul 2013 09:58:30 +0200 Subject: [PATCH 345/529] Add forgotten psych.rb link into rubygem-psych to fix "private method `load' called for Psych:Moduler" error (rhbz#979133). --- ruby.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e2037ef..203a46e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 13 +%global release 14 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.0.3 @@ -874,6 +874,7 @@ make check TESTS="-v $DISABLE_TESTS" %files -n rubygem-psych %{ruby_libdir}/psych +%{ruby_libdir}/psych.rb %{ruby_libarchdir}/psych.so %{_libdir}/gems/%{name}/psych-%{psych_version} %{gem_dir}/gems/psych-%{psych_version} @@ -889,6 +890,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Jul 15 2013 V鱈t Ondruch - 2.0.0.247-14 +- Add forgotten psych.rb link into rubygem-psych to fix "private method `load' + called for Psych:Moduler" error (rhbz#979133). + * Thu Jul 11 2013 V鱈t Ondruch - 2.0.0.247-13 - Fixes multilib conlicts of .gemspec files. - Make symlinks for psych gem to ruby stdlib dirs (rhbz#979133). From 3a0654b687d5d9357c3e9bb80b90f82eff1c7d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 30 Jul 2013 16:38:59 +0200 Subject: [PATCH 346/529] Move Psych symlinks to vendor dir, to prevent F18 -> F19 upgrade issues (rhbz#988490). --- ruby.spec | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/ruby.spec b/ruby.spec index 203a46e..9aea8a4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 14 +%global release 15 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.0.3 @@ -549,9 +549,13 @@ mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib/ mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications -ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir}/psych -ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb -ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/lib/psych.so %{buildroot}%{ruby_libarchdir}/psych.so +# The links should replace directory, which RPM cannot handle and it is causing +# issues during upgrade from F18 to F19. As a workaround the links are placed +# into vendor direcories. This could be changed back as soon as F18 is EOLed. +# https://bugzilla.redhat.com/show_bug.cgi?id=988490 +ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_vendorlibdir}/psych +ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_vendorlibdir}/psych.rb +ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/lib/psych.so %{buildroot}%{ruby_vendorarchdir}/psych.so # Adjust the gemspec files so that the gems will load properly sed -i '/^end$/ i\ @@ -653,7 +657,6 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{ruby_libdir}/irb.rb %exclude %{ruby_libdir}/tcltk.rb %exclude %{ruby_libdir}/tk*.rb -%exclude %{ruby_libdir}/psych.rb %{ruby_libdir}/cgi %{ruby_libdir}/date %{ruby_libdir}/digest @@ -873,9 +876,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec %files -n rubygem-psych -%{ruby_libdir}/psych -%{ruby_libdir}/psych.rb -%{ruby_libarchdir}/psych.so +%{ruby_vendorlibdir}/psych +%{ruby_vendorlibdir}/psych.rb +%{ruby_vendorarchdir}/psych.so %{_libdir}/gems/%{name}/psych-%{psych_version} %{gem_dir}/gems/psych-%{psych_version} %{gem_dir}/specifications/psych-%{psych_version}.gemspec @@ -890,6 +893,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Jul 30 2013 V鱈t Ondruch - 2.0.0.247-15 +- Move Psych symlinks to vendor dir, to prevent F18 -> F19 upgrade issues + (rhbz#988490). + * Mon Jul 15 2013 V鱈t Ondruch - 2.0.0.247-14 - Add forgotten psych.rb link into rubygem-psych to fix "private method `load' called for Psych:Moduler" error (rhbz#979133). From a03b2d278bf4ddd8c06731f202f2f6cc23dac1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 7 Oct 2013 12:30:18 +0200 Subject: [PATCH 347/529] Update to Ruby 2.1.0.preview1. --- .gitignore | 1 + ruby-1.9.3-always-use-i386.patch | 12 +- ruby-1.9.3-custom-rubygems-location.patch | 82 ++-- ruby-1.9.3-mkmf-verbose.patch | 8 +- ruby-1.9.3.p195-fix-webrick-tests.patch | 14 +- ...ed-paths-when-empty-version-string-i.patch | 124 +++-- ...inst-OpenSSL-with-enabled-ECC-curves.patch | 85 ---- ruby-2.0.0-p195-aarch64.patch | 360 --------------- ...Specification.files-in-default-.gems.patch | 6 +- ...refix-install_dirs-only-with-DESTDIR.patch | 70 --- ...-additional-preludes-by-configuratio.patch | 26 +- ...0-Enable-configuration-of-archlibdir.patch | 28 ++ ....1.0-test_config.rb-fix-library-path.patch | 31 ++ ruby.spec | 72 +-- ...obal-Specification.dirs-during-insta.patch | 149 +----- ...s-2.0.0-Fixes-for-empty-ruby-version.patch | 81 ---- rubygems-2.0.0-binary-extensions.patch | 423 ++++++------------ ...l_require_paths-on-yet-another-place.patch | 71 +++ sources | 2 +- 19 files changed, 480 insertions(+), 1165 deletions(-) delete mode 100644 ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch delete mode 100644 ruby-2.0.0-p195-aarch64.patch delete mode 100644 ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch create mode 100644 ruby-2.1.0-Enable-configuration-of-archlibdir.patch create mode 100644 ruby-2.1.0-test_config.rb-fix-library-path.patch delete mode 100644 rubygems-2.0.0-Fixes-for-empty-ruby-version.patch create mode 100644 rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch diff --git a/.gitignore b/.gitignore index b883574..b4edb4a 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-2.0.0-p0.tar.gz /ruby-2.0.0-p195.tar.bz2 /ruby-2.0.0-p247.tar.bz2 +/ruby-2.1.0-preview1.tar.bz2 diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-1.9.3-always-use-i386.patch index 8b724a8..10e3d99 100644 --- a/ruby-1.9.3-always-use-i386.patch +++ b/ruby-1.9.3-always-use-i386.patch @@ -1,4 +1,4 @@ -From 796aa193a0e01f3035361f045ac66486d71f608a Mon Sep 17 00:00:00 2001 +From 2089cab72b38d6d5e7ba2b596e41014209acad30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 19 Nov 2012 14:37:28 +0100 Subject: [PATCH] Always use i386. @@ -8,12 +8,12 @@ Subject: [PATCH] Always use i386. 1 file changed, 2 insertions(+) diff --git a/configure.in b/configure.in -index 418b0cb..d26fe5b 100644 +index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -3419,6 +3419,8 @@ AC_SUBST(vendorarchdir)dnl - configure_args=$ac_configure_args - AC_SUBST(configure_args)dnl +@@ -3647,6 +3647,8 @@ AC_SUBST(vendorarchdir)dnl + + AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl +target_cpu=`echo $target_cpu | sed s/i.86/i386/` + @@ -21,5 +21,5 @@ index 418b0cb..d26fe5b 100644 arch="universal-${target_os}" AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available, -- -1.8.1 +1.8.3.1 diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-1.9.3-custom-rubygems-location.patch index 90ad58d..05a0d01 100644 --- a/ruby-1.9.3-custom-rubygems-location.patch +++ b/ruby-1.9.3-custom-rubygems-location.patch @@ -1,46 +1,73 @@ -From b5e9dc3683cb085aa57e7b12c35a4f21b2cc1482 Mon Sep 17 00:00:00 2001 +From 94da59aafacc6a9efe829529eb51385588d6f149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 11 Nov 2011 13:14:45 +0100 Subject: [PATCH] Allow to install RubyGems into custom location, outside of Ruby tree. --- - configure.in | 8 ++++++++ - tool/rbinstall.rb | 9 +++++++++ - version.c | 4 ++++ - 3 files changed, 21 insertions(+) + configure.in | 5 +++++ + loadpath.c | 4 ++++ + template/verconf.h.in | 3 +++ + tool/rbinstall.rb | 9 +++++++++ + 4 files changed, 21 insertions(+) diff --git a/configure.in b/configure.in -index 1627d12..e064b2b 100644 +index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -3349,6 +3349,13 @@ AC_ARG_WITH(vendorarchdir, +@@ -3621,6 +3621,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) +AC_ARG_WITH(rubygemsdir, + AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]), + [rubygemsdir=$withval]) -+if test "$rubygemsdir" != ""; then -+ AC_DEFINE_UNQUOTED(RUBYGEMS_DIR,"$rubygemsdir" !!) -+fi + - unexpand_shvar rubylibprefix exec_prefix libdir RUBY_BASE_NAME - unexpand_shvar rubyarchprefix exec_prefix libdir arch RUBY_BASE_NAME archlibdir rubylibprefix - unexpand_shvar rubysitearchprefix exec_prefix libdir sitearch arch RUBY_BASE_NAME archlibdir sitearchlibdir rubylibprefix -@@ -3415,6 +3422,7 @@ AC_SUBST(sitearchdir)dnl + if test "${LOAD_RELATIVE+set}"; then + AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) + RUBY_EXEC_PREFIX='' +@@ -3644,6 +3648,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl +AC_SUBST(rubygemsdir)dnl - configure_args=$ac_configure_args - AC_SUBST(configure_args)dnl + AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl + +diff --git a/loadpath.c b/loadpath.c +index 623dc9d..74c5d9e 100644 +--- a/loadpath.c ++++ b/loadpath.c +@@ -86,6 +86,10 @@ const char ruby_initial_load_paths[] = + RUBY_VENDOR_LIB "\0" + #endif + ++#ifdef RUBYGEMS_DIR ++ RUBYGEMS_DIR "\0" ++#endif ++ + RUBY_LIB "\0" + #ifdef RUBY_THINARCH + RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0" +diff --git a/template/verconf.h.in b/template/verconf.h.in +index 79c003e..34f2382 100644 +--- a/template/verconf.h.in ++++ b/template/verconf.h.in +@@ -34,6 +34,9 @@ + % if C["RUBY_SEARCH_PATH"] + #define RUBY_SEARCH_PATH "${RUBY_SEARCH_PATH}" + % end ++% if C["rubygemsdir"] ++#define RUBYGEMS_DIR "${rubygemsdir}" ++% end + % + % R = {} + % R["ruby_version"] = '"RUBY_LIB_VERSION"' diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index 92e54c6..c72dfb6 100755 +index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -313,6 +313,7 @@ sitelibdir = CONFIG["sitelibdir"] +@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"] sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -48,7 +75,7 @@ index 92e54c6..c72dfb6 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -500,7 +501,15 @@ end +@@ -505,7 +506,15 @@ end install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[README* *.txt *.rdoc *.gemspec] @@ -64,21 +91,6 @@ index 92e54c6..c72dfb6 100755 end install?(:local, :arch, :lib) do -diff --git a/version.c b/version.c -index 54c4513..d76100b 100644 ---- a/version.c -+++ b/version.c -@@ -99,6 +99,10 @@ const char ruby_initial_load_paths[] = - #endif - #endif - -+#ifdef RUBYGEMS_DIR -+ RUBYGEMS_DIR "\0" -+#endif -+ - RUBY_LIB "\0" - #ifdef RUBY_THINARCH - RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0" -- -1.8.1.2 +1.8.3.1 diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index de78ad8..66107c4 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -1,4 +1,4 @@ -From ec16398159a161fc77436b4855d489f193b2515b Mon Sep 17 00:00:00 2001 +From 28cc0749d6729aa2444661ee7b411e183fe220b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 19 Nov 2012 15:14:51 +0100 Subject: [PATCH] Verbose mkmf. @@ -8,10 +8,10 @@ Subject: [PATCH] Verbose mkmf. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mkmf.rb b/lib/mkmf.rb -index 4b6c52e..67a15ee 100644 +index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1777,7 +1777,7 @@ SRC +@@ -1828,7 +1828,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. @@ -21,5 +21,5 @@ index 4b6c52e..67a15ee 100644 Q = $(Q1:0=@) ECHO1 = $(V:1=@#{CONFIG['NULLCMD']}) -- -1.8.1.2 +1.8.3.1 diff --git a/ruby-1.9.3.p195-fix-webrick-tests.patch b/ruby-1.9.3.p195-fix-webrick-tests.patch index b340bff..3b2d6e7 100644 --- a/ruby-1.9.3.p195-fix-webrick-tests.patch +++ b/ruby-1.9.3.p195-fix-webrick-tests.patch @@ -1,5 +1,14 @@ +From 2db9ad4a090d0c82e30afa44c623e3c5c99f7a37 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 19 Nov 2012 14:37:28 +0100 +Subject: [PATCH] Fix WEBrick tests. + +--- + test/runner.rb | 2 ++ + 1 file changed, 2 insertions(+) + diff --git a/test/runner.rb b/test/runner.rb -index 49844c7..8e59a85 100644 +index 94beb44..db4dfe9 100644 --- a/test/runner.rb +++ b/test/runner.rb @@ -2,6 +2,8 @@ require 'rbconfig' @@ -11,3 +20,6 @@ index 49844c7..8e59a85 100644 src_testdir = File.dirname(File.realpath(__FILE__)) $LOAD_PATH << src_testdir module Gem +-- +1.8.3.1 + diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 58d602d..498a792 100644 --- a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -1,70 +1,98 @@ -From e943a89efd63dcfb80a0ab8d9a4db37f523f508e Mon Sep 17 00:00:00 2001 +From 35b8c14ddc7f9b38c21c15dfecefa3dff7567981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 8 Feb 2013 22:48:41 +0100 Subject: [PATCH] Prevent duplicated paths when empty version string is configured. --- - configure.in | 3 +++ - version.c | 10 ++++++++++ - 2 files changed, 13 insertions(+) + configure.in | 15 +++++++++------ + loadpath.c | 4 ++++ + 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in -index 5850bbf..7604bb8 100644 +index 881449e..37d9a62 100644 --- a/configure.in +++ b/configure.in -@@ -3367,6 +3367,9 @@ unexpand_shvar exec_prefix prefix - if test ${RUBY_LIB_VERSION_STYLE+set}; then - AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION_STYLE, $RUBY_LIB_VERSION_STYLE !!) - else -+ if test "x${ruby_version}" = 'x'; then -+ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1) -+ fi - AC_DEFINE_UNQUOTED(RUBY_LIB_VERSION, [$RUBY_LIB_VERSION] !!) - fi - AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX}) -diff --git a/version.c b/version.c -index 282960d..54c4513 100644 ---- a/version.c -+++ b/version.c -@@ -39,9 +39,15 @@ - #define RUBY_VENDOR_LIB RUBY_LIB_PREFIX"/vendor_ruby" - #endif +@@ -3535,8 +3535,6 @@ AC_ARG_WITH(rubylibprefix, + fi + rubylibprefix="$withval"]) + AC_SUBST(rubylibprefix) +-rubylibdir='${rubylibprefix}/${ruby_version}' +-rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} -+#ifdef RUBY_LIB_VERSION_BLANK -+#define RUBY_LIB RUBY_LIB_PREFIX -+#define RUBY_SITE_LIB2 RUBY_SITE_LIB -+#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB -+#else - #define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION - #define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION - #define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION -+#endif - #ifndef RUBY_ARCH_LIB_FOR - #define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch + rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} + AC_ARG_WITH(rubyarchprefix, +@@ -3566,6 +3564,7 @@ AC_ARG_WITH(ruby-version, + [ruby_version=full]) + unset RUBY_LIB_VERSION + unset RUBY_LIB_VERSION_STYLE ++ruby_version_suffix=/'${ruby_version}' + AS_CASE(["$ruby_version"], + [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], + [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) +@@ -3582,30 +3581,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then + ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" + eval $ruby_version + elif test -z "${ruby_version}"; then +- AC_MSG_ERROR([No ruby version, No place for bundled libraries]) ++ unset ruby_version_suffix ++ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1) + else + RUBY_LIB_VERSION="\"${ruby_version}\"" + fi + AC_SUBST(RUBY_LIB_VERSION_STYLE) + AC_SUBST(RUBY_LIB_VERSION) + ++rubylibdir='${rubylibprefix}'${ruby_version_suffix} ++rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_suffix}}${multiarch-'${rubylibdir}/${arch}'} ++ + AC_ARG_WITH(sitedir, + AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), + [sitedir=$withval], + [sitedir='${rubylibprefix}/site_ruby']) +-sitelibdir='${sitedir}/${ruby_version}' ++sitelibdir='${sitedir}'${ruby_version_suffix} + + AC_ARG_WITH(sitearchdir, + AS_HELP_STRING([--with-sitearchdir=DIR], + [architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]), + [sitearchdir=$withval], +- [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}]) ++ [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_suffix}}${multiarch-'${sitelibdir}/${sitearch}'}]) + + AC_ARG_WITH(vendordir, + AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), + [vendordir=$withval], + [vendordir='${rubylibprefix}/vendor_ruby']) +-vendorlibdir='${vendordir}/${ruby_version}' ++vendorlibdir='${vendordir}'${ruby_version_suffix} + + AC_ARG_WITH(vendorarchdir, + AS_HELP_STRING([--with-vendorarchdir=DIR], +diff --git a/loadpath.c b/loadpath.c +index 9160031..623dc9d 100644 +--- a/loadpath.c ++++ b/loadpath.c +@@ -65,7 +65,9 @@ const char ruby_initial_load_paths[] = + RUBY_SEARCH_PATH "\0" #endif -@@ -77,8 +83,10 @@ const char ruby_initial_load_paths[] = + #ifndef NO_RUBY_SITE_LIB ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_SITE_LIB2 "\0" ++#endif + #ifdef RUBY_THINARCH RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif - RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" -+#ifndef RUBY_LIB_VERSION_BLANK - RUBY_SITE_LIB "\0" +@@ -74,7 +76,9 @@ const char ruby_initial_load_paths[] = #endif -+#endif #ifndef NO_RUBY_VENDOR_LIB ++#ifndef RUBY_LIB_VERSION_BLANK RUBY_VENDOR_LIB2 "\0" -@@ -86,8 +94,10 @@ const char ruby_initial_load_paths[] = ++#endif + #ifdef RUBY_THINARCH RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif - RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" -+#ifndef RUBY_LIB_VERSION_BLANK - RUBY_VENDOR_LIB "\0" - #endif -+#endif - - RUBY_LIB "\0" - #ifdef RUBY_THINARCH -- -1.8.1.2 +1.8.3.1 diff --git a/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch b/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch deleted file mode 100644 index 461b787..0000000 --- a/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 5617aafa2d44d0a4bc811830e225463abd01b2b2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 21 May 2013 10:01:33 +0200 -Subject: [PATCH] Fix build against OpenSSL with enabled ECC curves. - ---- - ext/openssl/ossl_pkey_ec.c | 4 ++++ - test/openssl/test_pkey_ec.rb | 26 +++++++++++++------------- - 2 files changed, 17 insertions(+), 13 deletions(-) - -diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c -index 8e6d88f..29e28ca 100644 ---- a/ext/openssl/ossl_pkey_ec.c -+++ b/ext/openssl/ossl_pkey_ec.c -@@ -762,8 +762,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) - method = EC_GFp_mont_method(); - } else if (id == s_GFp_nist) { - method = EC_GFp_nist_method(); -+#if !defined(OPENSSL_NO_EC2M) - } else if (id == s_GF2m_simple) { - method = EC_GF2m_simple_method(); -+#endif - } - - if (method) { -@@ -817,8 +819,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) - - if (id == s_GFp) { - new_curve = EC_GROUP_new_curve_GFp; -+#if !defined(OPENSSL_NO_EC2M) - } else if (id == s_GF2m) { - new_curve = EC_GROUP_new_curve_GF2m; -+#endif - } else { - ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m"); - } -diff --git a/test/openssl/test_pkey_ec.rb b/test/openssl/test_pkey_ec.rb -index f151335..56f3ff7 100644 ---- a/test/openssl/test_pkey_ec.rb -+++ b/test/openssl/test_pkey_ec.rb -@@ -7,28 +7,28 @@ class OpenSSL::TestEC < Test::Unit::TestCase - @data1 = 'foo' - @data2 = 'bar' * 1000 # data too long for DSA sig - -- @group1 = OpenSSL::PKey::EC::Group.new('secp112r1') -- @group2 = OpenSSL::PKey::EC::Group.new('sect163k1') -- @group3 = OpenSSL::PKey::EC::Group.new('prime256v1') -+ @groups = [] -+ @keys = [] - -- @key1 = OpenSSL::PKey::EC.new -- @key1.group = @group1 -- @key1.generate_key -+ OpenSSL::PKey::EC.builtin_curves.each do |curve, comment| -+ group = OpenSSL::PKey::EC::Group.new(curve) - -- @key2 = OpenSSL::PKey::EC.new(@group2.curve_name) -- @key2.generate_key -+ key = OpenSSL::PKey::EC.new(group) -+ key.generate_key - -- @key3 = OpenSSL::PKey::EC.new(@group3) -- @key3.generate_key -- -- @groups = [@group1, @group2, @group3] -- @keys = [@key1, @key2, @key3] -+ @groups << group -+ @keys << key -+ end - end - - def compare_keys(k1, k2) - assert_equal(k1.to_pem, k2.to_pem) - end - -+ def test_builtin_curves -+ assert(!OpenSSL::PKey::EC.builtin_curves.empty?) -+ end -+ - def test_curve_names - @groups.each_with_index do |group, idx| - key = @keys[idx] --- -1.8.2.1 - diff --git a/ruby-2.0.0-p195-aarch64.patch b/ruby-2.0.0-p195-aarch64.patch deleted file mode 100644 index 8009d32..0000000 --- a/ruby-2.0.0-p195-aarch64.patch +++ /dev/null @@ -1,360 +0,0 @@ -diff -urN ruby-2.0.0-p0/tool/config.guess ruby-2.0.0-p0-aarch64/tool/config.guess ---- ruby-2.0.0-p0/tool/config.guess 2012-01-29 07:50:18.000000000 -0600 -+++ ruby-2.0.0-p0-aarch64/tool/config.guess 2013-03-08 07:15:49.233030866 -0600 -@@ -2,9 +2,9 @@ - # Attempt to guess a canonical system name. - # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, --# 2011 Free Software Foundation, Inc. -+# 2011, 2012 Free Software Foundation, Inc. - --timestamp='2011-11-11' -+timestamp='2012-09-25' - - # This file is free software; you can redistribute it and/or modify it - # under the terms of the GNU General Public License as published by -@@ -17,9 +17,7 @@ - # General Public License for more details. - # - # You should have received a copy of the GNU General Public License --# along with this program; if not, write to the Free Software --# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA --# 02110-1301, USA. -+# along with this program; if not, see . - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a -@@ -57,8 +55,8 @@ - - Originally written by Per Bothner. - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, --2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free --Software Foundation, Inc. -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -+Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -145,7 +143,7 @@ - case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or -- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, -+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward -@@ -202,6 +200,10 @@ - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; -+ *:Bitrig:*:*) -+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` -+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} -+ exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} -@@ -304,7 +306,7 @@ - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; -- arm:riscos:*:*|arm:RISCOS:*:*) -+ arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) -@@ -803,6 +805,9 @@ - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; -+ *:MINGW64*:*) -+ echo ${UNAME_MACHINE}-pc-mingw64 -+ exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; -@@ -863,6 +868,13 @@ - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; -+ aarch64:Linux:*:*) -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; -+ aarch64_be:Linux:*:*) -+ UNAME_MACHINE=aarch64_be -+ echo ${UNAME_MACHINE}-unknown-linux-gnu -+ exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; -@@ -897,16 +909,16 @@ - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) -- echo cris-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) -- echo crisv32-axis-linux-gnu -+ echo ${UNAME_MACHINE}-axis-linux-gnu - exit ;; - frv:Linux:*:*) -- echo frv-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - hexagon:Linux:*:*) -- echo hexagon-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - LIBC=gnu -@@ -948,7 +960,7 @@ - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) -- echo or32-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu -@@ -989,7 +1001,7 @@ - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) -- echo x86_64-unknown-linux-gnu -+ echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu -@@ -1196,6 +1208,9 @@ - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; -+ x86_64:Haiku:*:*) -+ echo x86_64-unknown-haiku -+ exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; -@@ -1251,7 +1266,7 @@ - NEO-?:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk${UNAME_RELEASE} - exit ;; -- NSE-?:NONSTOP_KERNEL:*:*) -+ NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) -@@ -1320,11 +1335,11 @@ - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -+ x86_64:VMkernel:*:*) -+ echo ${UNAME_MACHINE}-unknown-esx -+ exit ;; - esac - --#echo '(No uname command or uname output not recognized.)' 1>&2 --#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -- - eval $set_cc_for_build - cat >$dummy.c <. - # - # As a special exception to the GNU General Public License, if you - # distribute this file as part of a program that contains a -@@ -76,8 +74,8 @@ - GNU config.sub ($timestamp) - - Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, --2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free --Software Foundation, Inc. -+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -+Free Software Foundation, Inc. - - This is free software; see the source for copying conditions. There is NO - warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." -@@ -125,13 +123,17 @@ - maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` - case $maybe_os in - nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ -- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ -+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; -+ android-linux) -+ os=-linux-android -+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown -+ ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] -@@ -154,7 +156,7 @@ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -- -apple | -axis | -knuth | -cray | -microblaze) -+ -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; -@@ -223,6 +225,12 @@ - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; -+ -lynx*178) -+ os=-lynxos178 -+ ;; -+ -lynx*5) -+ os=-lynxos5 -+ ;; - -lynx*) - os=-lynxos - ;; -@@ -247,6 +255,7 @@ - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ -+ | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ -@@ -264,7 +273,7 @@ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ -- | maxq | mb | microblaze | mcore | mep | metag \ -+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ -@@ -319,8 +328,7 @@ - c6x) - basic_machine=tic6x-unknown - ;; -- m6811 | m68hc11 | m6812 | m68hc12 | picochip) -- # Motorola 68HC11/12. -+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) - basic_machine=$basic_machine-unknown - os=-none - ;; -@@ -333,7 +341,10 @@ - strongarm | thumb | xscale) - basic_machine=arm-unknown - ;; -- -+ xgate) -+ basic_machine=$basic_machine-unknown -+ os=-none -+ ;; - xscaleeb) - basic_machine=armeb-unknown - ;; -@@ -356,6 +367,7 @@ - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ -+ | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ -@@ -377,7 +389,8 @@ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ -- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ -+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ -+ | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ -@@ -719,7 +732,6 @@ - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; --# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 -@@ -777,9 +789,13 @@ - basic_machine=ns32k-utek - os=-sysv - ;; -- microblaze) -+ microblaze*) - basic_machine=microblaze-xilinx - ;; -+ mingw64) -+ basic_machine=x86_64-pc -+ os=-mingw64 -+ ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 -@@ -1341,15 +1357,15 @@ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ -- | -openbsd* | -solidbsd* \ -+ | -bitrig* | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ -- | -mingw32* | -linux-gnu* | -linux-android* \ -- | -linux-newlib* | -linux-uclibc* \ -+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ -+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ -@@ -1532,6 +1548,9 @@ - c4x-* | tic4x-*) - os=-coff - ;; -+ hexagon-*) -+ os=-elf -+ ;; - tic54x-*) - os=-coff - ;; -@@ -1559,9 +1578,6 @@ - ;; - m68000-sun) - os=-sunos3 -- # This also exists in the configure program, but was not the -- # default. -- # os=-sunos4 - ;; - m68*-cisco) - os=-aout diff --git a/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch b/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch index 2989954..0abe8bd 100644 --- a/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch +++ b/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch @@ -1,4 +1,4 @@ -From fb9fcc8b01d968c62577756cbfd00f20a10b5cbf Mon Sep 17 00:00:00 2001 +From 541f3b85cac00e5b836e018ef8afea4342e0cd39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 9 Jul 2013 12:32:49 +0200 Subject: [PATCH] Make stable Gem::Specification.files in default .gemspecs @@ -11,10 +11,10 @@ possibly conflicting in multilib scenario. 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index 1063fac..fb2fcee 100755 +index 0b99408..7b54966 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -592,7 +592,7 @@ module RbInstall +@@ -608,7 +608,7 @@ module RbInstall end def collect diff --git a/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch b/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch deleted file mode 100644 index fa7d946..0000000 --- a/ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 28e8a4ad0146fef37b514bde9a27ba5b6f7c34c5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 2 Jul 2013 11:51:50 +0200 -Subject: [PATCH] Revert "mkmf.rb: prefix install_dirs only with DESTDIR" - -This reverts commit 7e1d5045943835ff906850e7b3bc71f985ae5f36. ---- - lib/mkmf.rb | 29 ++++++++++++++--------------- - 1 file changed, 14 insertions(+), 15 deletions(-) - -diff --git a/lib/mkmf.rb b/lib/mkmf.rb -index ee89198..cca487e 100644 ---- a/lib/mkmf.rb -+++ b/lib/mkmf.rb -@@ -189,21 +189,21 @@ module MakeMakefile - ] - elsif $configure_args.has_key?('--vendor') - dirs = [ -- ['BINDIR', '$(DESTDIR)$(bindir)'], -- ['RUBYCOMMONDIR', '$(DESTDIR)$(vendordir)$(target_prefix)'], -- ['RUBYLIBDIR', '$(DESTDIR)$(vendorlibdir)$(target_prefix)'], -- ['RUBYARCHDIR', '$(DESTDIR)$(vendorarchdir)$(target_prefix)'], -- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], -- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], -+ ['BINDIR', '$(bindir)'], -+ ['RUBYCOMMONDIR', '$(vendordir)$(target_prefix)'], -+ ['RUBYLIBDIR', '$(vendorlibdir)$(target_prefix)'], -+ ['RUBYARCHDIR', '$(vendorarchdir)$(target_prefix)'], -+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], -+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], - ] - else - dirs = [ -- ['BINDIR', '$(DESTDIR)$(bindir)'], -- ['RUBYCOMMONDIR', '$(DESTDIR)$(sitedir)$(target_prefix)'], -- ['RUBYLIBDIR', '$(DESTDIR)$(sitelibdir)$(target_prefix)'], -- ['RUBYARCHDIR', '$(DESTDIR)$(sitearchdir)$(target_prefix)'], -- ['HDRDIR', '$(DESTDIR)$(rubyhdrdir)/ruby$(target_prefix)'], -- ['ARCHHDRDIR', '$(DESTDIR)$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], -+ ['BINDIR', '$(bindir)'], -+ ['RUBYCOMMONDIR', '$(sitedir)$(target_prefix)'], -+ ['RUBYLIBDIR', '$(sitelibdir)$(target_prefix)'], -+ ['RUBYARCHDIR', '$(sitearchdir)$(target_prefix)'], -+ ['HDRDIR', '$(rubyhdrdir)/ruby$(target_prefix)'], -+ ['ARCHHDRDIR', '$(rubyhdrdir)/$(arch)/ruby$(target_prefix)'], - ] - end - dirs << ['target_prefix', (target_prefix ? "/#{target_prefix}" : "")] -@@ -1728,7 +1728,6 @@ SRC - end - - def with_destdir(dir) -- return dir unless $extmk - dir = dir.sub($dest_prefix_pattern, '') - /\A\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir - end -@@ -1787,8 +1786,8 @@ ECHO = $(ECHO1:0=@echo) - #### Start of system configuration section. #### - #{"top_srcdir = " + $top_srcdir.sub(%r"\A#{Regexp.quote($topdir)}/", "$(topdir)/") if $extmk} - srcdir = #{srcdir.gsub(/\$\((srcdir)\)|\$\{(srcdir)\}/) {mkintpath(CONFIG[$1||$2]).unspace}} --topdir = #{mkintpath(topdir = $extmk ? CONFIG["topdir"] : $topdir).unspace} --hdrdir = #{(hdrdir = CONFIG["hdrdir"]) == topdir ? "$(topdir)" : mkintpath(hdrdir).unspace} -+topdir = #{mkintpath($extmk ? CONFIG["topdir"] : $topdir).unspace} -+hdrdir = #{mkintpath(CONFIG["hdrdir"]).unspace} - arch_hdrdir = #{$arch_hdrdir.quote} - PATH_SEPARATOR = #{CONFIG['PATH_SEPARATOR']} - VPATH = #{vpath.join(CONFIG['PATH_SEPARATOR'])} --- -1.8.2.1 - diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 3a36f91..a4a171f 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -1,8 +1,19 @@ +From 996012f6abe0ce4d68a2de9f249935c6d5b467bc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 4 Oct 2013 22:13:11 +0200 +Subject: [PATCH] Allow to specify addition preludes by configuration option. + +--- + Makefile.in | 1 + + common.mk | 2 +- + configure.in | 7 +++++++ + 3 files changed, 9 insertions(+), 1 deletion(-) + diff --git a/Makefile.in b/Makefile.in -index a93a1e6..fb30c19 100644 +index 7e8ed82..7916993 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -108,6 +108,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ +@@ -110,6 +110,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE) @@ -11,10 +22,10 @@ index a93a1e6..fb30c19 100644 #### End of system configuration section. #### diff --git a/common.mk b/common.mk -index e5069e5..ca5e3f9 100644 +index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -107,7 +107,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) +@@ -110,7 +110,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) @@ -24,10 +35,10 @@ index e5069e5..ca5e3f9 100644 YES_GEM_PRELUDE = $(GEM_PRELUDE) NO_GEM_PRELUDE = diff --git a/configure.in b/configure.in -index 7977aaf..1ef42cd 100644 +index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -3494,6 +3494,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3731,6 +3731,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl @@ -41,3 +52,6 @@ index 7977aaf..1ef42cd 100644 AC_ARG_WITH(mantype, AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), [ +-- +1.8.3.1 + diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch new file mode 100644 index 0000000..668edfa --- /dev/null +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -0,0 +1,28 @@ +From 07c666ba5c3360dd6f43605a8ac7c85c99c1721f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 1 Oct 2013 12:22:40 +0200 +Subject: [PATCH] Allow to configure libruby.so placement. + +--- + configure.in | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/configure.in b/configure.in +index 37d9a62..553d4d0 100644 +--- a/configure.in ++++ b/configure.in +@@ -2956,6 +2956,11 @@ if test ${multiarch+set}; then + fi + + archlibdir='${libdir}/${arch}' ++AC_ARG_WITH(archlibdir, ++ AS_HELP_STRING([--with-archlibdir=DIR], ++ [prefix for libruby [[LIBDIR/ARCH]]]), ++ [archlibdir="$withval"]) ++ + sitearchlibdir='${libdir}/${sitearch}' + archincludedir='${includedir}/${arch}' + sitearchincludedir='${includedir}/${sitearch}' +-- +1.8.3.1 + diff --git a/ruby-2.1.0-test_config.rb-fix-library-path.patch b/ruby-2.1.0-test_config.rb-fix-library-path.patch new file mode 100644 index 0000000..404a278 --- /dev/null +++ b/ruby-2.1.0-test_config.rb-fix-library-path.patch @@ -0,0 +1,31 @@ +From cf26cdec7bcd0668b8f8347a5f29072c8b8f6e8d Mon Sep 17 00:00:00 2001 +From: nobu +Date: Tue, 1 Oct 2013 11:36:47 +0000 +Subject: [PATCH] test_config.rb: fix library path + +* test/mkmf/test_config.rb (test_dir_config): fix expected library + path. [ruby-core:57535] [Bug #8972] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/mkmf/test_config.rb | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/test/mkmf/test_config.rb b/test/mkmf/test_config.rb +index b09dfd6..4a9be57 100644 +--- a/test/mkmf/test_config.rb ++++ b/test/mkmf/test_config.rb +@@ -8,8 +8,9 @@ class TestMkmf < Test::Unit::TestCase + class TestConfig < Test::Unit::TestCase + def test_dir_config + bug8074 = '[Bug #8074]' ++ lib = RbConfig.expand(RbConfig::MAKEFILE_CONFIG["libdir"], "exec_prefix"=>"") + assert_separately %w[-rmkmf - -- --with-foo-dir=/test/foo], %{ +- assert_equal(%w[/test/foo/include /test/foo/lib], dir_config("foo"), #{bug8074.dump}) ++ assert_equal(%w[/test/foo/include /test/foo#{lib}], dir_config("foo"), #{bug8074.dump}) + } + end + end +-- +1.8.3.1 + diff --git a/ruby.spec b/ruby.spec index 9aea8a4..4d796ff 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 2 -%global minor_version 0 +%global minor_version 1 %global teeny_version 0 -%global patch_level 247 +%global patch_level 0 %global major_minor_version %{major_version}.%{minor_version} @@ -10,7 +10,7 @@ %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -#%%global milestone preview2 +%global milestone preview1 # Keep the revision enabled for pre-releases from SVN. #%%global revision 39387 @@ -26,10 +26,10 @@ %endif -%global release 15 +%global release 16 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.0.3 +%global rubygems_version 2.2.0.preview.1 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -39,12 +39,12 @@ # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 4.0.0 -%global bigdecimal_version 1.2.0 +%global rdoc_version 4.1.0.preview.1 +%global bigdecimal_version 1.2.1 %global io_console_version 0.4.2 %global json_version 1.7.7 -%global minitest_version 4.3.2 -%global psych_version 2.0.0 +%global minitest_version 4.7.5 +%global psych_version 2.0.1 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -114,52 +114,41 @@ source_macros(rpm.expand("%{SOURCE5}")) # http://bugs.ruby-lang.org/issues/7807 Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +# Allows to override libruby.so placement. Hopefully we will be able to return +# to plain --with-rubyarchprefix. +# http://bugs.ruby-lang.org/issues/8973 +Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. Patch3: ruby-1.9.3-always-use-i386.patch # Fixes random WEBRick test failures. # https://bugs.ruby-lang.org/issues/6573. Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch +# https://github.com/rubygems/rubygems/pull/667 +Patch7: rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 Patch8: ruby-1.9.3-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 -# Note that 8th patch might be resolved by -# https://bugs.ruby-lang.org/issues/7897 Patch9: rubygems-2.0.0-binary-extensions.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch -# This slightly changes behavior of "gem install --install-dir" behavior. # Without this patch, Specifications.dirs is modified and gems installed on # the system cannot be required anymore. This causes later issues when RDoc # documentation should be generated, since json gem is sudenly not accessible. -# https://github.com/rubygems/rubygems/pull/452 +# https://github.com/rubygems/rubygems/pull/670 Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch -# This prevents issues, when ruby configuration specifies --with-ruby-version=''. -# https://github.com/rubygems/rubygems/pull/455 -Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch -# Although this does not directly affects Fedora ATM, it might be issue when -# rebuilding package on different platform (RHEL7). Please keep the patch until -# it is resolved in upstream. -# https://bugs.ruby-lang.org/issues/8384 -Patch15: ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch -# Adds aarch64 support. -# http://bugs.ruby-lang.org/issues/8331 -# https://bugzilla.redhat.com/show_bug.cgi?id=926463 -# Please note that this is the BZ patch, it might be good idea to update it -# with its upstream version when available. -Patch16: ruby-2.0.0-p195-aarch64.patch # Adds support for '--with-prelude' configuration option. This allows to built # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Fixes issues with DESTDIR. -# https://bugs.ruby-lang.org/issues/8115 -Patch18: ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.patch # Fixes multilib conlicts of .gemspec files. # https://bugs.ruby-lang.org/issues/8623 Patch19: ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch +# TestMkmf::TestConfig#test_dir_config fails on x86_64. +# http://bugs.ruby-lang.org/issues/8972 +Patch20: ruby-2.1.0-test_config.rb-fix-library-path.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -417,18 +406,17 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %setup -q -n %{ruby_archive} %patch0 -p1 +%patch1 -p1 %patch3 -p1 %patch5 -p1 +%patch7 -p1 %patch8 -p1 %patch9 -p1 %patch12 -p1 %patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 %patch17 -p1 -%patch18 -p1 %patch19 -p1 +%patch20 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -443,6 +431,7 @@ autoconf %configure \ --with-rubylibprefix='%{ruby_libdir}' \ + --with-archlibdir='%{_libdir}' \ --with-rubyarchprefix='%{ruby_libarchdir}' \ --with-sitedir='%{ruby_sitelibdir}' \ --with-sitearchdir='%{ruby_sitearchdir}' \ @@ -460,7 +449,10 @@ autoconf --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ - +# This avoids regeneration of sizes.c (BASERUBY is needed for that), when +# configure.in has newer timestamp the sizes.c (after patch is applied). +# http://bugs.ruby-lang.org/issues/8968 +touch sizes.c # Q= makes the build output more verbose and allows to check Fedora # compiler options. @@ -600,6 +592,12 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" # the test suite). touch abrt.rb +# Fix "./ruby: error while loading shared libraries: libruby.so.2.1: cannot open +# shared object file: No such file or directory" error. +# http://bugs.ruby-lang.org/issues/8971 +# Fixed in rev43129. +sed -i '/yes-test-sample/,/test-knownbugs/ s/MINIRUBY/RUNRUBY/' uncommon.mk + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -785,6 +783,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/strscan.so %{ruby_libarchdir}/syslog.so %exclude %{ruby_libarchdir}/tcltklib.so +%{ruby_libarchdir}/thread.so %exclude %{ruby_libarchdir}/tkutil.so %{ruby_libarchdir}/zlib.so @@ -893,6 +892,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Oct 07 2013 V鱈t Ondruch - 2.1.0.0-0.16.preview1 +- Update to Ruby 2.1.0.preview1. + * Tue Jul 30 2013 V鱈t Ondruch - 2.0.0.247-15 - Move Psych symlinks to vendor dir, to prevent F18 -> F19 upgrade issues (rhbz#988490). diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch index 607e028..ad0f0bf 100644 --- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -1,152 +1,29 @@ -From b95b9942361104dc5b7fd08eb4970f893d8c1a54 Mon Sep 17 00:00:00 2001 +From ad80fb9ffe5ab73e05784237de8d8b7d03784867 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 13 Feb 2013 13:12:30 +0100 -Subject: [PATCH 1/3] Remove duplicated check. +Date: Fri, 4 Oct 2013 22:13:11 +0200 +Subject: [PATCH] Do not modify global Specification.dirs during installation. -The loaded specifications are rejected already in #gather_dependencies, -so this condition cannot trigger. --- - lib/rubygems/dependency_installer.rb | 3 --- - 1 file changed, 3 deletions(-) + lib/rubygems/dependency_installer.rb | 6 ------ + 1 file changed, 6 deletions(-) diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index d811f62..dffa8df 100644 +index e7c489a..5123fce 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb -@@ -330,9 +330,6 @@ class Gem::DependencyInstaller +@@ -74,12 +74,6 @@ class Gem::DependencyInstaller + @only_install_dir = !!options[:install_dir] + @install_dir = options[:install_dir] || Gem.dir - last = @gems_to_install.size - 1 - @gems_to_install.each_with_index do |spec, index| -- # REFACTOR more current spec set hardcoding, should be abstracted? -- next if Gem::Specification.include?(spec) and index != last -- - # TODO: make this sorta_verbose so other users can benefit from it - say "Installing gem #{spec.full_name}" if Gem.configuration.really_verbose - --- -1.8.1.2 - - -From 2fa9087b1986db6c7945c0f997fed2bfff5ce06a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 13 Feb 2013 15:47:47 +0100 -Subject: [PATCH 2/3] Do not modify global Specification.dirs during - installation. - -While gems are installed into --install-dir just fine even without -modifications of Specification.dirs, change in it makes inaccessible -gems already present on the system. ---- - lib/rubygems/dependency_installer.rb | 15 ++++++--------- - 1 file changed, 6 insertions(+), 9 deletions(-) - -diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index dffa8df..841f26a 100644 ---- a/lib/rubygems/dependency_installer.rb -+++ b/lib/rubygems/dependency_installer.rb -@@ -57,17 +57,14 @@ class Gem::DependencyInstaller - # :build_args:: See Gem::Installer::new - - def initialize(options = {}) -- @install_dir = options[:install_dir] || Gem.dir - - if options[:install_dir] then +- if options[:install_dir] then - # HACK shouldn't change the global settings, needed for -i behavior - # maybe move to the install command? See also github #442 - Gem::Specification.dirs = @install_dir -- Gem.ensure_gem_subdirectories @install_dir -+ Gem.ensure_gem_subdirectories options[:install_dir] - end - +- end +- options = DEFAULT_OPTIONS.merge options -+ @install_dir = options[:install_dir] @bin_dir = options[:bin_dir] - @dev_shallow = options[:dev_shallow] - @development = options[:development] -@@ -92,7 +89,7 @@ class Gem::DependencyInstaller - @installed_gems = [] - @toplevel_specs = nil - -- @cache_dir = options[:cache_dir] || @install_dir -+ @cache_dir = options[:cache_dir] || @install_dir || Gem.dir - - # Set with any errors that SpecFetcher finds while search through - # gemspecs for a dep -@@ -202,7 +199,7 @@ class Gem::DependencyInstaller - # that this isn't dependent only on the currently installed gems - dependency_list.specs.reject! { |spec| - not keep_names.include?(spec.full_name) and -- Gem::Specification.include?(spec) -+ (!@install_dir && Gem::Specification.include?(spec)) - } - - unless dependency_list.ok? or @ignore_dependencies or @force then -@@ -254,7 +251,7 @@ class Gem::DependencyInstaller - to_do.push t.spec - end - -- results.remove_installed! dep -+ results.remove_installed! dep unless @install_dir - - @available << results - results.inject_into_list dependency_list -@@ -360,7 +357,7 @@ class Gem::DependencyInstaller - :force => @force, - :format_executable => @format_executable, - :ignore_dependencies => @ignore_dependencies, -- :install_dir => @install_dir, -+ :install_dir => (@install_dir || Gem.dir), - :security_policy => @security_policy, - :user_install => @user_install, - :wrappers => @wrappers, -- -1.8.1.2 - - -From d473204ce920702dd87257db49355929f31530d4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 15 Feb 2013 17:02:44 +0100 -Subject: [PATCH 3/3] Default to Gem.dir as late as possible. - ---- - lib/rubygems/dependency_installer.rb | 2 +- - lib/rubygems/installer.rb | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index 841f26a..abcfa0f 100644 ---- a/lib/rubygems/dependency_installer.rb -+++ b/lib/rubygems/dependency_installer.rb -@@ -357,7 +357,7 @@ class Gem::DependencyInstaller - :force => @force, - :format_executable => @format_executable, - :ignore_dependencies => @ignore_dependencies, -- :install_dir => (@install_dir || Gem.dir), -+ :install_dir => @install_dir, - :security_policy => @security_policy, - :user_install => @user_install, - :wrappers => @wrappers, -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 780a88b..6543130 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -537,13 +537,13 @@ class Gem::Installer - :bin_dir => nil, - :env_shebang => false, - :force => false, -- :install_dir => Gem.dir, - :only_install_dir => false - }.merge options - - @env_shebang = options[:env_shebang] - @force = options[:force] -- @gem_home = options[:install_dir] -+ @install_dir = options[:install_dir] -+ @gem_home = options[:install_dir] || Gem.dir - @ignore_dependencies = options[:ignore_dependencies] - @format_executable = options[:format_executable] - @security_policy = options[:security_policy] --- -1.8.1.2 +1.8.3.1 diff --git a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch b/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch deleted file mode 100644 index e443a46..0000000 --- a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch +++ /dev/null @@ -1,81 +0,0 @@ -From c9b2eff36728266052ccfff54d3ac0a0624fd0f1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 14 Feb 2013 11:50:41 +0100 -Subject: [PATCH 1/2] Use File.join insteado of manual path creation. - -This prevents issues, when File.join in #new_default_spec removes -superfluous slashes while they are kept in expected paths. E.g. the test -would fail if ruby configuration specifies --with-ruby-version=''. ---- - test/rubygems/test_gem_commands_contents_command.rb | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb -index 60df53f..35c9631 100644 ---- a/test/rubygems/test_gem_commands_contents_command.rb -+++ b/test/rubygems/test_gem_commands_contents_command.rb -@@ -140,10 +140,10 @@ lib/foo.rb - @cmd.execute - end - -- expected = %W[ -- #{Gem::ConfigMap[:bindir]}/default_command -- #{Gem::ConfigMap[:rubylibdir]}/default/gem.rb -- #{Gem::ConfigMap[:archdir]}/default_gem.so -+ expected = [ -+ File.join(Gem::ConfigMap[:bindir], 'default_command'), -+ File.join(Gem::ConfigMap[:rubylibdir], 'default/gem.rb'), -+ File.join(Gem::ConfigMap[:archdir], 'default_gem.so') - ].sort.join "\n" - - assert_equal expected, @ui.output.chomp --- -1.8.1.2 - - -From b022cef7b2e6c2d138388a6c2db02cca8c408cc6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 14 Feb 2013 13:35:20 +0100 -Subject: [PATCH 2/2] Do not add last slash to Gem.user_dir if ruby_version - string is empty. - ---- - lib/rubygems/defaults.rb | 4 +++- - test/rubygems/test_gem.rb | 6 ++++-- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index ea84e5c..05c35bb 100644 ---- a/lib/rubygems/defaults.rb -+++ b/lib/rubygems/defaults.rb -@@ -54,7 +54,9 @@ module Gem - # Path for gems in the user's home directory - - def self.user_dir -- File.join Gem.user_home, '.gem', ruby_engine, ConfigMap[:ruby_version] -+ parts = [Gem.user_home, '.gem', ruby_engine] -+ parts << ConfigMap[:ruby_version] unless ConfigMap[:ruby_version].empty? -+ File.join parts - end - - ## -diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb -index bf77009..9ee78f7 100644 ---- a/test/rubygems/test_gem.rb -+++ b/test/rubygems/test_gem.rb -@@ -1198,8 +1198,10 @@ class TestGem < Gem::TestCase - end - - def test_self_user_dir -- assert_equal File.join(@userhome, '.gem', Gem.ruby_engine, -- Gem::ConfigMap[:ruby_version]), Gem.user_dir -+ parts = [@userhome, '.gem', Gem.ruby_engine] -+ parts << Gem::ConfigMap[:ruby_version] unless Gem::ConfigMap[:ruby_version].empty? -+ -+ assert_equal File.join(parts), Gem.user_dir - end - - def test_self_user_home --- -1.8.1.2 - diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch index 4876d35..5c212e7 100644 --- a/rubygems-2.0.0-binary-extensions.patch +++ b/rubygems-2.0.0-binary-extensions.patch @@ -1,258 +1,97 @@ -From ec90622235ae19b28a327cb50a10e0311e8f3d71 Mon Sep 17 00:00:00 2001 +From 37cd8547d23973a7ec23a004ab9b60738d67ada9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 3 Nov 2011 16:43:05 +0100 -Subject: [PATCH 1/8] Add dedicate extensions folder into $LOAD_PATH. +Subject: [PATCH] Add dedicate extensions folder into $LOAD_PATH. --- - lib/rubygems/specification.rb | 32 ++++++++++++++++++++++++++++++-- - 1 file changed, 30 insertions(+), 2 deletions(-) + lib/rubygems/basic_specification.rb | 35 ++++++++++++++++++++++++++++++++--- + lib/rubygems/defaults.rb | 11 +++++++++++ + lib/rubygems/ext/builder.rb | 6 +++++- + lib/rubygems/installer.rb | 1 + + lib/rubygems/specification.rb | 7 +++++++ + lib/rubygems/uninstaller.rb | 1 + + 6 files changed, 57 insertions(+), 4 deletions(-) -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index cabdf8d..87b14d2 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1256,6 +1256,12 @@ class Gem::Specification - File.join full_gem_path, path - end - -+ unless extensions.empty? -+ paths += require_paths.map do |path| -+ File.join ext_dir, path -+ end -+ end -+ - # gem directories must come after -I and ENV['RUBYLIB'] - insert_index = Gem.load_path_insert_index - -@@ -1374,11 +1380,16 @@ class Gem::Specification - - def contains_requirable_file? file - root = full_gem_path -+ ext = ext_dir - suffixes = Gem.suffixes - - require_paths.any? do |lib| -- base = "#{root}/#{lib}/#{file}" -- suffixes.any? { |suf| File.file? "#{base}#{suf}" } -+ base = ["#{root}/#{lib}/#{file}"] -+ base << "#{ext}/#{lib}/#{file}" unless extensions.empty? -+ -+ base.any? do |path| -+ suffixes.any? { |suf| File.file? "#{path}#{suf}" } -+ end - end +diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb +index a10eab3..da3af91 100644 +--- a/lib/rubygems/basic_specification.rb ++++ b/lib/rubygems/basic_specification.rb +@@ -51,6 +51,14 @@ class Gem::BasicSpecification + File.dirname(loaded_from) == self.class.default_specifications_dir end -@@ -1674,6 +1685,23 @@ class Gem::Specification - end - - ## -+ # Returns the full path to this spec's ext directory. -+ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 -+ -+ def ext_dir -+ @gem_dir ||= File.expand_path File.join(exts_dir, full_name) -+ end -+ + ## + # Returns the full path to the exts directory containing this spec's + # gem directory. eg: /usr/local/lib/ruby/1.8/exts + + def exts_dir -+ # TODO: this logic seems terribly broken, but tests fail if just base_dir -+ @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts") ++ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir ++ end ++ + def find_full_gem_path # :nodoc: + # TODO: also, shouldn't it default to full_name if it hasn't been written? + path = File.expand_path File.join(gems_dir, full_name) +@@ -60,6 +68,15 @@ class Gem::BasicSpecification + + private :find_full_gem_path + ++ def find_full_gem_ext_path # :nodoc: ++ # TODO: skip for gems without extensions. ++ path = File.expand_path File.join(exts_dir, full_name) ++ path.untaint ++ path if File.directory? path ++ end ++ ++ private :find_full_gem_ext_path ++ + ## + # The full path to the gem (install path + full name). + +@@ -70,6 +87,13 @@ class Gem::BasicSpecification + end + + ## ++ # The full path to the gem binary extension (install path + full name). ++ ++ def full_gem_ext_path ++ @full_gem_ext_path ||= find_full_gem_ext_path + end + + ## - # Deprecated and ignored, defaults to true. + # Returns the full name (name-version) of this Gem. Platform information + # is included (name-version-platform) if it is specified and not the + # default Ruby platform. +@@ -88,9 +112,12 @@ class Gem::BasicSpecification # - # Formerly used to indicate this gem was RDoc-capable. --- -1.8.1.2 - - -From e42819f32fc5d935f7e7189ec4be8bdab0a2cf3f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 16 Nov 2011 13:26:48 +0100 -Subject: [PATCH 2/8] Use spec's ext dir for extension installation. - ---- - lib/rubygems/installer.rb | 2 +- - lib/rubygems/specification.rb | 7 +++---- - 2 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 780a88b..854c177 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -646,7 +646,7 @@ TEXT - say "This could take a while..." - end -- dest_path = File.join gem_dir, spec.require_paths.first -+ dest_path = spec.ext_dir - ran_rake = false # only run rake once - - spec.extensions.each do |extension| -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 87b14d2..492ddbe 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1689,16 +1689,15 @@ class Gem::Specification - # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 - - def ext_dir -- @gem_dir ||= File.expand_path File.join(exts_dir, full_name) -+ @ext_dir ||= File.join exts_dir, full_name, require_paths.first - end - - ## - # Returns the full path to the exts directory containing this spec's -- # gem directory. eg: /usr/local/lib/ruby/1.8/exts -+ # gem directory. eg: /usr/local/lib/ruby/1.8/gems - - def exts_dir -- # TODO: this logic seems terribly broken, but tests fail if just base_dir -- @exts_dir ||= File.join(loaded_from && base_dir || Gem.dir, "exts") -+ @exts_dir ||= gems_dir - end - - ## --- -1.8.1.2 - - -From 0e9dd0655111f7dda805233c79a3771459d9a66a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 16 Nov 2011 14:52:16 +0100 -Subject: [PATCH 3/9] Simplify the extending of $LOAD_PATH for binary gems. - ---- - lib/rubygems/specification.rb | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 492ddbe..c703827 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1256,11 +1256,7 @@ class Gem::Specification - File.join full_gem_path, path - end - -- unless extensions.empty? -- paths += require_paths.map do |path| -- File.join ext_dir, path -- end + def full_require_paths +- require_paths.map do |path| +- File.join full_gem_path, path - end -+ paths << ext_dir unless extensions.empty? || paths.include?(ext_dir) - - # gem directories must come after -I and ENV['RUBYLIB'] - insert_index = Gem.load_path_insert_index -@@ -1697,7 +1693,10 @@ class Gem::Specification - # gem directory. eg: /usr/local/lib/ruby/1.8/gems - - def exts_dir -- @exts_dir ||= gems_dir -+ @exts_dir ||= begin -+ dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} -+ dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir -+ end ++ require_paths.map do |require_path| ++ full_gem_paths = [full_gem_path, full_gem_ext_path] ++ full_gem_paths.compact! ++ ++ full_gem_paths.map { |path| File.join path, require_path } ++ end.flatten end ## --- -1.8.1.2 - - -From 9a8556c609e800d0dbd24af416d613f2e82f323c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 9 Dec 2011 16:31:04 +0100 -Subject: [PATCH 4/8] Fix the binary extension search path construction. - ---- - lib/rubygems/installer.rb | 2 +- - lib/rubygems/specification.rb | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 854c177..f1f2ad7 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -646,7 +646,7 @@ TEXT - say "This could take a while..." - end +@@ -110,7 +137,9 @@ class Gem::BasicSpecification + @loaded_from = path && path.to_s -- dest_path = spec.ext_dir -+ dest_path = File.join spec.ext_dir, spec.require_paths.first - ran_rake = false # only run rake once - - spec.extensions.each do |extension| -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index c703827..fa9ea6e 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1256,7 +1256,7 @@ class Gem::Specification - File.join full_gem_path, path - end - -- paths << ext_dir unless extensions.empty? || paths.include?(ext_dir) -+ paths << File.join(ext_dir, require_paths.first) unless extensions.empty? || (ext_dir == full_gem_path) - - # gem directories must come after -I and ENV['RUBYLIB'] - insert_index = Gem.load_path_insert_index -@@ -1685,7 +1685,7 @@ class Gem::Specification - # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 - - def ext_dir -- @ext_dir ||= File.join exts_dir, full_name, require_paths.first -+ @ext_dir ||= File.join exts_dir, full_name + @full_gem_path = nil ++ @full_gem_ext_path = nil + @gems_dir = nil ++ @exts_dir = nil + @base_dir = nil end - ## --- -1.8.1.2 - - -From 476c2f90cc6f5f490858f253a9b23eb19d53d2fc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 13 Dec 2011 12:14:54 +0100 -Subject: [PATCH 5/8] Remove binary extensions during uninstall. - ---- - lib/rubygems/uninstaller.rb | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb -index d672b9d..5c31a0c 100644 ---- a/lib/rubygems/uninstaller.rb -+++ b/lib/rubygems/uninstaller.rb -@@ -246,6 +246,7 @@ class Gem::Uninstaller - File.writable?(spec.base_dir) - - FileUtils.rm_rf spec.full_gem_path -+ FileUtils.rm_rf spec.ext_dir - - # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) - old_platform_name = [spec.name, --- -1.8.1.2 - - -From 35dc17e86f701fe1be80d98ace79735c535fd570 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 13 Dec 2011 14:27:14 +0100 -Subject: [PATCH 6/8] Avoid dependency on customized operating_system.rb. - ---- - lib/rubygems/defaults.rb | 11 +++++++++++ - lib/rubygems/specification.rb | 5 +---- - 2 files changed, 12 insertions(+), 4 deletions(-) - diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index ea84e5c..b221954 100644 +index 591580b..8ed474f 100644 --- a/lib/rubygems/defaults.rb +++ b/lib/rubygems/defaults.rb -@@ -101,6 +101,17 @@ module Gem +@@ -111,6 +111,17 @@ module Gem end ## @@ -270,75 +109,71 @@ index ea84e5c..b221954 100644 # A wrapper around RUBY_ENGINE const that may not be defined def self.ruby_engine -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index fa9ea6e..2b10499 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1693,10 +1693,7 @@ class Gem::Specification - # gem directory. eg: /usr/local/lib/ruby/1.8/gems +diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb +index 8c05723..75d5fc2 100644 +--- a/lib/rubygems/ext/builder.rb ++++ b/lib/rubygems/ext/builder.rb +@@ -170,7 +170,7 @@ EOF + say "This could take a while..." + end - def exts_dir -- @exts_dir ||= begin -- dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} -- dirs ? File.join(dirs.last[:ext_dir], 'exts') : gems_dir -- end -+ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir +- dest_path = File.join @gem_dir, @spec.require_paths.first ++ dest_path = File.join(@only_install_dir ? @gem_dir : @spec.ext_dir, @spec.require_paths.first) + + @ran_rake = false # only run rake once + +@@ -181,5 +181,9 @@ EOF + end end ++ def only_install_dir= only_install_dir ++ @only_install_dir = only_install_dir ++ end ++ + end + +diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb +index 261af89..a6aca5d 100644 +--- a/lib/rubygems/installer.rb ++++ b/lib/rubygems/installer.rb +@@ -662,6 +662,7 @@ TEXT + + def build_extensions + builder = Gem::Ext::Builder.new spec, @build_args ++ builder.only_install_dir = @only_install_dir + + builder.build_extensions + end +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index deac343..b630fa3 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -1612,6 +1612,13 @@ class Gem::Specification < Gem::BasicSpecification + @executables = Array(value) + end + ++ # Returns the full path to this spec's ext directory. ++ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 ++ ++ def ext_dir ++ @ext_dir ||= File.expand_path File.join(exts_dir, full_name) ++ end ++ ## + # Sets extensions to +extensions+, ensuring it is an array. Don't + # use this, push onto the array instead. +diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb +index 143ab6d..f81a23d 100644 +--- a/lib/rubygems/uninstaller.rb ++++ b/lib/rubygems/uninstaller.rb +@@ -247,6 +247,7 @@ class Gem::Uninstaller + File.writable?(spec.base_dir) + + FileUtils.rm_rf spec.full_gem_path ++ FileUtils.rm_rf spec.ext_dir + + # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) + old_platform_name = [spec.name, -- -1.8.1.2 - - -From 0937c0b0a3c2ed08ab5b0875f7f95e24157525c2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 7 Feb 2013 13:07:34 +0100 -Subject: [PATCH 7/8] Fix binary extensions installation when --install-dir is - specified. - ---- - lib/rubygems/installer.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index f1f2ad7..e1577fc 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -646,7 +646,7 @@ TEXT - say "This could take a while..." - end - -- dest_path = File.join spec.ext_dir, spec.require_paths.first -+ dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first) - ran_rake = false # only run rake once - - spec.extensions.each do |extension| --- -1.8.1.2 - - -From 062a11c59731f5875d5a8821a212c8a41cb84577 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 15 Feb 2013 17:07:07 +0100 -Subject: [PATCH 8/8] Use correct option. - ---- - lib/rubygems/installer.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index e1577fc..1492c68 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -646,7 +646,7 @@ TEXT - say "This could take a while..." - end - -- dest_path = File.join(options[:install_dir] ? gem_dir : spec.ext_dir, spec.require_paths.first) -+ dest_path = File.join(@install_dir ? gem_dir : spec.ext_dir, spec.require_paths.first) - ran_rake = false # only run rake once - - spec.extensions.each do |extension| --- -1.8.1.2 +1.8.3.1 diff --git a/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch b/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch new file mode 100644 index 0000000..a6766bc --- /dev/null +++ b/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch @@ -0,0 +1,71 @@ +From 02f94e96ea6a9e0fe37341eccd83ffb63549ead5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Thu, 3 Oct 2013 14:15:59 +0200 +Subject: [PATCH] DRY: Use full_require_paths on yet another place. + +--- + lib/rubygems/basic_specification.rb | 16 +++++++++++++--- + lib/rubygems/specification.rb | 11 ----------- + 2 files changed, 13 insertions(+), 14 deletions(-) + +diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb +index 24bb4bc..a10eab3 100644 +--- a/lib/rubygems/basic_specification.rb ++++ b/lib/rubygems/basic_specification.rb +@@ -38,11 +38,10 @@ class Gem::BasicSpecification + # Return true if this spec can require +file+. + + def contains_requirable_file? file +- root = full_gem_path + suffixes = Gem.suffixes + +- require_paths.any? do |lib| +- base = "#{root}/#{lib}/#{file}" ++ full_require_paths.any? do |path| ++ base = "#{path}/#{file}" + suffixes.any? { |suf| File.file? "#{base}#{suf}" } + end + end +@@ -84,6 +83,17 @@ class Gem::BasicSpecification + end + + ## ++ # Full paths in the gem to add to $LOAD_PATH when this gem is ++ # activated. ++ # ++ ++ def full_require_paths ++ require_paths.map do |path| ++ File.join full_gem_path, path ++ end ++ end ++ ++ ## + # Returns the full path to the gems directory containing this spec's + # gem directory. eg: /usr/local/lib/ruby/1.8/gems + +diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb +index 6de8c3b..deac343 100644 +--- a/lib/rubygems/specification.rb ++++ b/lib/rubygems/specification.rb +@@ -2015,17 +2015,6 @@ class Gem::Specification < Gem::BasicSpecification + end + + ## +- # Full paths in the gem to add to $LOAD_PATH when this gem is +- # activated. +- # +- +- def full_require_paths +- require_paths.map do |path| +- File.join full_gem_path, path +- end +- end +- +- ## + # The RubyGems version required by this gem + + def required_rubygems_version= req +-- +1.8.3.1 + diff --git a/sources b/sources index 44c414b..ca481bf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -60913f3eec0c4071f44df42600be2604 ruby-2.0.0-p247.tar.bz2 +d32d1ea23988399afadbd21c5a7a37fc ruby-2.1.0-preview1.tar.bz2 From 835bcc89f9cbb404b89383d71112ea0413d8de19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 7 Oct 2013 13:08:54 +0200 Subject: [PATCH 348/529] Update versions of significantly updated patches. --- ...-duplicated-paths-when-empty-version-string-i.patch | 0 ...-use-i386.patch => ruby-2.1.0-always-use-i386.patch | 0 ....patch => ruby-2.1.0-custom-rubygems-location.patch | 0 ruby.spec | 10 +++++----- ...modify-global-Specification.dirs-during-insta.patch | 0 ...ons.patch => rubygems-2.2.0-binary-extensions.patch | 0 6 files changed, 5 insertions(+), 5 deletions(-) rename ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch => ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch (100%) rename ruby-1.9.3-always-use-i386.patch => ruby-2.1.0-always-use-i386.patch (100%) rename ruby-1.9.3-custom-rubygems-location.patch => ruby-2.1.0-custom-rubygems-location.patch (100%) rename rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch => rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch (100%) rename rubygems-2.0.0-binary-extensions.patch => rubygems-2.2.0-binary-extensions.patch (100%) diff --git a/ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch similarity index 100% rename from ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch rename to ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch diff --git a/ruby-1.9.3-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch similarity index 100% rename from ruby-1.9.3-always-use-i386.patch rename to ruby-2.1.0-always-use-i386.patch diff --git a/ruby-1.9.3-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch similarity index 100% rename from ruby-1.9.3-custom-rubygems-location.patch rename to ruby-2.1.0-custom-rubygems-location.patch diff --git a/ruby.spec b/ruby.spec index 4d796ff..5c3e1a2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -113,14 +113,14 @@ source_macros(rpm.expand("%{SOURCE5}")) } # http://bugs.ruby-lang.org/issues/7807 -Patch0: ruby-2.0.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch # Allows to override libruby.so placement. Hopefully we will be able to return # to plain --with-rubyarchprefix. # http://bugs.ruby-lang.org/issues/8973 Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. -Patch3: ruby-1.9.3-always-use-i386.patch +Patch3: ruby-2.1.0-always-use-i386.patch # Fixes random WEBRick test failures. # https://bugs.ruby-lang.org/issues/6573. Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch @@ -128,17 +128,17 @@ Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch Patch7: rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 -Patch8: ruby-1.9.3-custom-rubygems-location.patch +Patch8: ruby-2.1.0-custom-rubygems-location.patch # Add support for installing binary extensions according to FHS. # https://github.com/rubygems/rubygems/issues/210 -Patch9: rubygems-2.0.0-binary-extensions.patch +Patch9: rubygems-2.2.0-binary-extensions.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch # Without this patch, Specifications.dirs is modified and gems installed on # the system cannot be required anymore. This causes later issues when RDoc # documentation should be generated, since json gem is sudenly not accessible. # https://github.com/rubygems/rubygems/pull/670 -Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +Patch13: rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch # Adds support for '--with-prelude' configuration option. This allows to built # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch similarity index 100% rename from rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch rename to rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.2.0-binary-extensions.patch similarity index 100% rename from rubygems-2.0.0-binary-extensions.patch rename to rubygems-2.2.0-binary-extensions.patch From 8f30dbcc0baa2241f9326aac6b2d9997e6f39cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 9 Oct 2013 16:10:06 +0200 Subject: [PATCH 349/529] Workaround several failing tests. --- ruby.spec | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ruby.spec b/ruby.spec index 5c3e1a2..ce694b0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -587,6 +587,13 @@ DISABLE_TESTS="" DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" %endif +%ifarch i686 +# TestSprintf#test_float fails on i686 +# http://bugs.ruby-lang.org/issues/8358 +sed -i "/assert_equal(\"0x1p+2\", sprintf('%.0a', Float('0x1.fp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb +sed -i "/assert_equal(\"-0x1.0p+2\", sprintf('%.1a', Float('-0x1.ffp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb +%endif + # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). @@ -598,6 +605,17 @@ touch abrt.rb # Fixed in rev43129. sed -i '/yes-test-sample/,/test-knownbugs/ s/MINIRUBY/RUNRUBY/' uncommon.mk +# TestSignal#test_hup_me hangs up the test suite. +# http://bugs.ruby-lang.org/issues/8997 +sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb + +%ifarch armv7l armv7hl armv7hnl +# TestProcess#test_clock_getres_constants and TestProcess#test_clock_gettime_constants fails on ARM. +# http://bugs.ruby-lang.org/issues/9008 +sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [:CLOCK_REALTIME_ALARM, :CLOCK_BOOTTIME_ALARM].include? n/' \ + test/ruby/test_process.rb +%endif + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig From 4f8b7ad60ddf7d052852dcd88e684bcb3aa7dda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 12 Nov 2013 13:28:42 +0100 Subject: [PATCH 350/529] Add remark about the upcomming ARM issue fix. --- ruby.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruby.spec b/ruby.spec index ce694b0..aebfa01 100644 --- a/ruby.spec +++ b/ruby.spec @@ -612,6 +612,9 @@ sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_sig %ifarch armv7l armv7hl armv7hnl # TestProcess#test_clock_getres_constants and TestProcess#test_clock_gettime_constants fails on ARM. # http://bugs.ruby-lang.org/issues/9008 +# Kernel issue. Should be fixed in 3.13 kernel. +# https://lkml.org/lkml/2013/10/18/521 +# http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=98d6f4dd84a134d942827584a3c5f67ffd8ec35f sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [:CLOCK_REALTIME_ALARM, :CLOCK_BOOTTIME_ALARM].include? n/' \ test/ruby/test_process.rb %endif From eac4c415ba6b6ed3a6bad631d1bd43cb93f24155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 27 Nov 2013 16:07:24 +0100 Subject: [PATCH 351/529] Update to Ruby 2.0.0-p353. - Allow MD5 in OpenSSL for tests. - Fix heap overflow in floating point parsing (CVE-2013-4164). --- .gitignore | 1 + ...inst-OpenSSL-with-enabled-ECC-curves.patch | 85 ------------------- ruby.spec | 19 +++-- ...obal-Specification.dirs-during-insta.patch | 3 +- ...s-2.0.0-Fixes-for-empty-ruby-version.patch | 49 +---------- sources | 2 +- 6 files changed, 14 insertions(+), 145 deletions(-) delete mode 100644 ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch diff --git a/.gitignore b/.gitignore index b883574..552398f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-2.0.0-p0.tar.gz /ruby-2.0.0-p195.tar.bz2 /ruby-2.0.0-p247.tar.bz2 +/ruby-2.0.0-p353.tar.bz2 diff --git a/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch b/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch deleted file mode 100644 index 461b787..0000000 --- a/ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 5617aafa2d44d0a4bc811830e225463abd01b2b2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 21 May 2013 10:01:33 +0200 -Subject: [PATCH] Fix build against OpenSSL with enabled ECC curves. - ---- - ext/openssl/ossl_pkey_ec.c | 4 ++++ - test/openssl/test_pkey_ec.rb | 26 +++++++++++++------------- - 2 files changed, 17 insertions(+), 13 deletions(-) - -diff --git a/ext/openssl/ossl_pkey_ec.c b/ext/openssl/ossl_pkey_ec.c -index 8e6d88f..29e28ca 100644 ---- a/ext/openssl/ossl_pkey_ec.c -+++ b/ext/openssl/ossl_pkey_ec.c -@@ -762,8 +762,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) - method = EC_GFp_mont_method(); - } else if (id == s_GFp_nist) { - method = EC_GFp_nist_method(); -+#if !defined(OPENSSL_NO_EC2M) - } else if (id == s_GF2m_simple) { - method = EC_GF2m_simple_method(); -+#endif - } - - if (method) { -@@ -817,8 +819,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self) - - if (id == s_GFp) { - new_curve = EC_GROUP_new_curve_GFp; -+#if !defined(OPENSSL_NO_EC2M) - } else if (id == s_GF2m) { - new_curve = EC_GROUP_new_curve_GF2m; -+#endif - } else { - ossl_raise(rb_eArgError, "unknown symbol, must be :GFp or :GF2m"); - } -diff --git a/test/openssl/test_pkey_ec.rb b/test/openssl/test_pkey_ec.rb -index f151335..56f3ff7 100644 ---- a/test/openssl/test_pkey_ec.rb -+++ b/test/openssl/test_pkey_ec.rb -@@ -7,28 +7,28 @@ class OpenSSL::TestEC < Test::Unit::TestCase - @data1 = 'foo' - @data2 = 'bar' * 1000 # data too long for DSA sig - -- @group1 = OpenSSL::PKey::EC::Group.new('secp112r1') -- @group2 = OpenSSL::PKey::EC::Group.new('sect163k1') -- @group3 = OpenSSL::PKey::EC::Group.new('prime256v1') -+ @groups = [] -+ @keys = [] - -- @key1 = OpenSSL::PKey::EC.new -- @key1.group = @group1 -- @key1.generate_key -+ OpenSSL::PKey::EC.builtin_curves.each do |curve, comment| -+ group = OpenSSL::PKey::EC::Group.new(curve) - -- @key2 = OpenSSL::PKey::EC.new(@group2.curve_name) -- @key2.generate_key -+ key = OpenSSL::PKey::EC.new(group) -+ key.generate_key - -- @key3 = OpenSSL::PKey::EC.new(@group3) -- @key3.generate_key -- -- @groups = [@group1, @group2, @group3] -- @keys = [@key1, @key2, @key3] -+ @groups << group -+ @keys << key -+ end - end - - def compare_keys(k1, k2) - assert_equal(k1.to_pem, k2.to_pem) - end - -+ def test_builtin_curves -+ assert(!OpenSSL::PKey::EC.builtin_curves.empty?) -+ end -+ - def test_curve_names - @groups.each_with_index do |group, idx| - key = @keys[idx] --- -1.8.2.1 - diff --git a/ruby.spec b/ruby.spec index 9aea8a4..6a6bb46 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 2 %global minor_version 0 %global teeny_version 0 -%global patch_level 247 +%global patch_level 353 %global major_minor_version %{major_version}.%{minor_version} @@ -26,7 +26,7 @@ %endif -%global release 15 +%global release 16 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.0.3 @@ -139,11 +139,6 @@ Patch13: rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.pat # This prevents issues, when ruby configuration specifies --with-ruby-version=''. # https://github.com/rubygems/rubygems/pull/455 Patch14: rubygems-2.0.0-Fixes-for-empty-ruby-version.patch -# Although this does not directly affects Fedora ATM, it might be issue when -# rebuilding package on different platform (RHEL7). Please keep the patch until -# it is resolved in upstream. -# https://bugs.ruby-lang.org/issues/8384 -Patch15: ruby-2.0.0-p195-Fix-build-against-OpenSSL-with-enabled-ECC-curves.patch # Adds aarch64 support. # http://bugs.ruby-lang.org/issues/8331 # https://bugzilla.redhat.com/show_bug.cgi?id=926463 @@ -424,7 +419,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch12 -p1 %patch13 -p1 %patch14 -p1 -%patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 @@ -600,7 +594,9 @@ DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" # the test suite). touch abrt.rb -make check TESTS="-v $DISABLE_TESTS" +# Allow MD5 in OpenSSL. +# https://bugs.ruby-lang.org/issues/9154 +OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -893,6 +889,11 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Nov 25 2013 V鱈t Ondruch - 2.0.0.353-16 +- Update to Ruby 2.0.0-p353. +- Allow MD5 in OpenSSL for tests. +- Fix heap overflow in floating point parsing (CVE-2013-4164). + * Tue Jul 30 2013 V鱈t Ondruch - 2.0.0.247-15 - Move Psych symlinks to vendor dir, to prevent F18 -> F19 upgrade issues (rhbz#988490). diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch index 607e028..98013a7 100644 --- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch @@ -44,7 +44,7 @@ diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_inst index dffa8df..841f26a 100644 --- a/lib/rubygems/dependency_installer.rb +++ b/lib/rubygems/dependency_installer.rb -@@ -57,17 +57,14 @@ class Gem::DependencyInstaller +@@ -57,16 +57,14 @@ class Gem::DependencyInstaller # :build_args:: See Gem::Installer::new def initialize(options = {}) @@ -54,7 +54,6 @@ index dffa8df..841f26a 100644 - # HACK shouldn't change the global settings, needed for -i behavior - # maybe move to the install command? See also github #442 - Gem::Specification.dirs = @install_dir -- Gem.ensure_gem_subdirectories @install_dir + Gem.ensure_gem_subdirectories options[:install_dir] end diff --git a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch b/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch index e443a46..365dc7b 100644 --- a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch +++ b/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch @@ -1,7 +1,7 @@ From c9b2eff36728266052ccfff54d3ac0a0624fd0f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 14 Feb 2013 11:50:41 +0100 -Subject: [PATCH 1/2] Use File.join insteado of manual path creation. +Subject: [PATCH] Use File.join insteado of manual path creation. This prevents issues, when File.join in #new_default_spec removes superfluous slashes while they are kept in expected paths. E.g. the test @@ -32,50 +32,3 @@ index 60df53f..35c9631 100644 -- 1.8.1.2 - -From b022cef7b2e6c2d138388a6c2db02cca8c408cc6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 14 Feb 2013 13:35:20 +0100 -Subject: [PATCH 2/2] Do not add last slash to Gem.user_dir if ruby_version - string is empty. - ---- - lib/rubygems/defaults.rb | 4 +++- - test/rubygems/test_gem.rb | 6 ++++-- - 2 files changed, 7 insertions(+), 3 deletions(-) - -diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index ea84e5c..05c35bb 100644 ---- a/lib/rubygems/defaults.rb -+++ b/lib/rubygems/defaults.rb -@@ -54,7 +54,9 @@ module Gem - # Path for gems in the user's home directory - - def self.user_dir -- File.join Gem.user_home, '.gem', ruby_engine, ConfigMap[:ruby_version] -+ parts = [Gem.user_home, '.gem', ruby_engine] -+ parts << ConfigMap[:ruby_version] unless ConfigMap[:ruby_version].empty? -+ File.join parts - end - - ## -diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb -index bf77009..9ee78f7 100644 ---- a/test/rubygems/test_gem.rb -+++ b/test/rubygems/test_gem.rb -@@ -1198,8 +1198,10 @@ class TestGem < Gem::TestCase - end - - def test_self_user_dir -- assert_equal File.join(@userhome, '.gem', Gem.ruby_engine, -- Gem::ConfigMap[:ruby_version]), Gem.user_dir -+ parts = [@userhome, '.gem', Gem.ruby_engine] -+ parts << Gem::ConfigMap[:ruby_version] unless Gem::ConfigMap[:ruby_version].empty? -+ -+ assert_equal File.join(parts), Gem.user_dir - end - - def test_self_user_home --- -1.8.1.2 - diff --git a/sources b/sources index 44c414b..0c071c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -60913f3eec0c4071f44df42600be2604 ruby-2.0.0-p247.tar.bz2 +20eb8f067d20f6b76b7e16cce2a85a55 ruby-2.0.0-p353.tar.bz2 From ef80e1fa9d5429f276e4640a142ea0d39e986b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 27 Nov 2013 16:07:24 +0100 Subject: [PATCH 352/529] Allow MD5 in OpenSSL for tests. --- ruby.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index aebfa01..72e92c2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -619,7 +619,9 @@ sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [: test/ruby/test_process.rb %endif -make check TESTS="-v $DISABLE_TESTS" +# Allow MD5 in OpenSSL. +# https://bugs.ruby-lang.org/issues/9154 +OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -913,6 +915,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Dec 02 2013 V鱈t Ondruch - 2.1.0.0-0.16.preview1 +- Allow MD5 in OpenSSL for tests. + * Mon Oct 07 2013 V鱈t Ondruch - 2.1.0.0-0.16.preview1 - Update to Ruby 2.1.0.preview1. From 360d2b99cd3a28d2d19195f2609a8228c2f34c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 17 Dec 2013 16:56:33 +0100 Subject: [PATCH 353/529] Upgrade to Ruby 2.1.0 (r44266). --- operating_system.rb | 10 + ...Specification.files-in-default-.gems.patch | 28 --- ...-additional-preludes-by-configuratio.patch | 6 +- ...ed-paths-when-empty-version-string-i.patch | 47 +++-- ruby-2.1.0-custom-rubygems-location.patch | 2 +- ....1.0-test_config.rb-fix-library-path.patch | 31 --- ruby.spec | 88 ++++----- ...l_require_paths-on-yet-another-place.patch | 71 ------- ...obal-Specification.dirs-during-insta.patch | 29 --- rubygems-2.2.0-binary-extensions.patch | 179 ------------------ 10 files changed, 86 insertions(+), 405 deletions(-) delete mode 100644 ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch delete mode 100644 ruby-2.1.0-test_config.rb-fix-library-path.patch delete mode 100644 rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch delete mode 100644 rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch delete mode 100644 rubygems-2.2.0-binary-extensions.patch diff --git a/operating_system.rb b/operating_system.rb index c3b19d6..fba8117 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -81,5 +81,15 @@ module Gem dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} dirs && File.join(dirs.last[:ext_dir], RbConfig::CONFIG['RUBY_INSTALL_NAME']) end + + # This method should be available since RubyGems 2.2 until RubyGems 3.0. + # https://github.com/rubygems/rubygems/issues/749 + if method_defined? :install_extension_in_lib + remove_method :install_extension_in_lib + + def install_extension_in_lib + false + end + end end end diff --git a/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch b/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch deleted file mode 100644 index 0abe8bd..0000000 --- a/ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 541f3b85cac00e5b836e018ef8afea4342e0cd39 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Tue, 9 Jul 2013 12:32:49 +0200 -Subject: [PATCH] Make stable Gem::Specification.files in default .gemspecs - -Although the .gemspec files for default gems are same in function, the -different order of their "s.files" makes them different therefore -possibly conflicting in multilib scenario. ---- - tool/rbinstall.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index 0b99408..7b54966 100755 ---- a/tool/rbinstall.rb -+++ b/tool/rbinstall.rb -@@ -608,7 +608,7 @@ module RbInstall - end - - def collect -- ruby_libraries + built_libraries -+ (ruby_libraries + built_libraries).sort - end - - private --- -1.8.3.1 - diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index a4a171f..55778ef 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -16,7 +16,7 @@ index 7e8ed82..7916993 100644 @@ -110,6 +110,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ - DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE) + DEFAULT_PRELUDES = $(GEM_PRELUDE) +OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ #### End of system configuration section. #### @@ -32,8 +32,8 @@ index 5cfbc3d..3f0a82e 100644 -PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) +PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) GEM_PRELUDE = $(srcdir)/gem_prelude.rb - YES_GEM_PRELUDE = $(GEM_PRELUDE) - NO_GEM_PRELUDE = + PRELUDES = prelude.c miniprelude.c + GOLFPRELUDES = golf_prelude.c diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 498a792..950336c 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -1,4 +1,4 @@ -From 35b8c14ddc7f9b38c21c15dfecefa3dff7567981 Mon Sep 17 00:00:00 2001 +From 763c6571697b0bd551a8a0c27d538d00f161a9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 8 Feb 2013 22:48:41 +0100 Subject: [PATCH] Prevent duplicated paths when empty version string is @@ -6,23 +6,23 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is --- configure.in | 15 +++++++++------ - loadpath.c | 4 ++++ - 2 files changed, 13 insertions(+), 6 deletions(-) + loadpath.c | 12 ++++++++++++ + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/configure.in b/configure.in -index 881449e..37d9a62 100644 +index 88d24ee..4a300b9 100644 --- a/configure.in +++ b/configure.in -@@ -3535,8 +3535,6 @@ AC_ARG_WITH(rubylibprefix, - fi - rubylibprefix="$withval"]) - AC_SUBST(rubylibprefix) +@@ -3608,8 +3608,6 @@ AC_ARG_WITH(rubylibprefix, + rubyw_install_name='$(RUBYW_INSTALL_NAME)' + ]) + -rubylibdir='${rubylibprefix}/${ruby_version}' -rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3566,6 +3564,7 @@ AC_ARG_WITH(ruby-version, +@@ -3639,6 +3637,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -30,7 +30,7 @@ index 881449e..37d9a62 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -3582,30 +3581,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -3655,30 +3654,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" eval $ruby_version elif test -z "${ruby_version}"; then @@ -70,29 +70,44 @@ index 881449e..37d9a62 100644 AC_ARG_WITH(vendorarchdir, AS_HELP_STRING([--with-vendorarchdir=DIR], diff --git a/loadpath.c b/loadpath.c -index 9160031..623dc9d 100644 +index 9160031..0d4d953 100644 --- a/loadpath.c +++ b/loadpath.c -@@ -65,7 +65,9 @@ const char ruby_initial_load_paths[] = +@@ -65,22 +65,34 @@ const char ruby_initial_load_paths[] = RUBY_SEARCH_PATH "\0" #endif #ifndef NO_RUBY_SITE_LIB -+#ifndef RUBY_LIB_VERSION_BLANK ++#ifdef RUBY_LIB_VERSION_BLANK ++ RUBY_SITE_LIB "\0" ++#else RUBY_SITE_LIB2 "\0" +#endif #ifdef RUBY_THINARCH RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif -@@ -74,7 +76,9 @@ const char ruby_initial_load_paths[] = + RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_SITE_LIB "\0" #endif ++#endif #ifndef NO_RUBY_VENDOR_LIB -+#ifndef RUBY_LIB_VERSION_BLANK ++#ifdef RUBY_LIB_VERSION_BLANK ++ RUBY_VENDOR_LIB "\0" ++#else RUBY_VENDOR_LIB2 "\0" +#endif #ifdef RUBY_THINARCH RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" #endif + RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_VENDOR_LIB "\0" + #endif ++#endif + + RUBY_LIB "\0" + #ifdef RUBY_THINARCH -- -1.8.3.1 +1.8.4.2 diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 05a0d01..b7f6588 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -39,7 +39,7 @@ index 623dc9d..74c5d9e 100644 --- a/loadpath.c +++ b/loadpath.c @@ -86,6 +86,10 @@ const char ruby_initial_load_paths[] = - RUBY_VENDOR_LIB "\0" + #endif #endif +#ifdef RUBYGEMS_DIR diff --git a/ruby-2.1.0-test_config.rb-fix-library-path.patch b/ruby-2.1.0-test_config.rb-fix-library-path.patch deleted file mode 100644 index 404a278..0000000 --- a/ruby-2.1.0-test_config.rb-fix-library-path.patch +++ /dev/null @@ -1,31 +0,0 @@ -From cf26cdec7bcd0668b8f8347a5f29072c8b8f6e8d Mon Sep 17 00:00:00 2001 -From: nobu -Date: Tue, 1 Oct 2013 11:36:47 +0000 -Subject: [PATCH] test_config.rb: fix library path - -* test/mkmf/test_config.rb (test_dir_config): fix expected library - path. [ruby-core:57535] [Bug #8972] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/mkmf/test_config.rb | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/test/mkmf/test_config.rb b/test/mkmf/test_config.rb -index b09dfd6..4a9be57 100644 ---- a/test/mkmf/test_config.rb -+++ b/test/mkmf/test_config.rb -@@ -8,8 +8,9 @@ class TestMkmf < Test::Unit::TestCase - class TestConfig < Test::Unit::TestCase - def test_dir_config - bug8074 = '[Bug #8074]' -+ lib = RbConfig.expand(RbConfig::MAKEFILE_CONFIG["libdir"], "exec_prefix"=>"") - assert_separately %w[-rmkmf - -- --with-foo-dir=/test/foo], %{ -- assert_equal(%w[/test/foo/include /test/foo/lib], dir_config("foo"), #{bug8074.dump}) -+ assert_equal(%w[/test/foo/include /test/foo#{lib}], dir_config("foo"), #{bug8074.dump}) - } - end - end --- -1.8.3.1 - diff --git a/ruby.spec b/ruby.spec index 72e92c2..0089654 100644 --- a/ruby.spec +++ b/ruby.spec @@ -10,10 +10,10 @@ %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -%global milestone preview1 +#%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -#%%global revision 39387 +%global revision 44266 %global ruby_archive %{name}-%{ruby_version} @@ -29,22 +29,23 @@ %global release 16 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.2.0.preview.1 +%global rubygems_version 2.2.0.rc.1 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. %global rubygems_dir %{_datadir}/rubygems -%global rake_version 0.9.6 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version_patch_level} -%global rdoc_version 4.1.0.preview.1 -%global bigdecimal_version 1.2.1 + +%global bigdecimal_version 1.2.3 %global io_console_version 0.4.2 -%global json_version 1.7.7 +%global json_version 1.8.1 %global minitest_version 4.7.5 -%global psych_version 2.0.1 +%global psych_version 2.0.2 +%global rake_version 10.1.0 +%global rdoc_version 4.1.0.rc.1 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -124,31 +125,15 @@ Patch3: ruby-2.1.0-always-use-i386.patch # Fixes random WEBRick test failures. # https://bugs.ruby-lang.org/issues/6573. Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch -# https://github.com/rubygems/rubygems/pull/667 -Patch7: rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 Patch8: ruby-2.1.0-custom-rubygems-location.patch -# Add support for installing binary extensions according to FHS. -# https://github.com/rubygems/rubygems/issues/210 -Patch9: rubygems-2.2.0-binary-extensions.patch # Make mkmf verbose by default Patch12: ruby-1.9.3-mkmf-verbose.patch -# Without this patch, Specifications.dirs is modified and gems installed on -# the system cannot be required anymore. This causes later issues when RDoc -# documentation should be generated, since json gem is sudenly not accessible. -# https://github.com/rubygems/rubygems/pull/670 -Patch13: rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch # Adds support for '--with-prelude' configuration option. This allows to built # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Fixes multilib conlicts of .gemspec files. -# https://bugs.ruby-lang.org/issues/8623 -Patch19: ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch -# TestMkmf::TestConfig#test_dir_config fails on x86_64. -# http://bugs.ruby-lang.org/issues/8972 -Patch20: ruby-2.1.0-test_config.rb-fix-library-path.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -160,7 +145,6 @@ Requires: rubygem(bigdecimal) >= %{bigdecimal_version} BuildRequires: autoconf BuildRequires: gdbm-devel -BuildRequires: ncurses-devel BuildRequires: libdb-devel BuildRequires: libffi-devel BuildRequires: openssl-devel @@ -409,14 +393,9 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch1 -p1 %patch3 -p1 %patch5 -p1 -%patch7 -p1 %patch8 -p1 -%patch9 -p1 %patch12 -p1 -%patch13 -p1 %patch17 -p1 -%patch19 -p1 -%patch20 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -449,11 +428,6 @@ autoconf --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ -# This avoids regeneration of sizes.c (BASERUBY is needed for that), when -# configure.in has newer timestamp the sizes.c (after patch is applied). -# http://bugs.ruby-lang.org/issues/8968 -touch sizes.c - # Q= makes the build output more verbose and allows to check Fedora # compiler options. make %{?_smp_mflags} COPY="cp -p" Q= @@ -511,25 +485,25 @@ mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_vers mv %{buildroot}%{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib -mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib +mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} mv %{buildroot}%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/specifications ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal -ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/lib/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so +ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/io mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib -mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io +mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/io mv %{buildroot}%{gem_dir}/specifications/default/io-console-%{io_console_version}.gemspec %{buildroot}%{gem_dir}/specifications ln -s %{gem_dir}/gems/io-console-%{io_console_version}/lib/io %{buildroot}%{ruby_libdir}/io -ln -s %{_libdir}/gems/%{name}/io-console-%{io_console_version}/lib/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so +ln -s %{_libdir}/gems/%{name}/io-console-%{io_console_version}/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so mkdir -p %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version} mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib -mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/lib/ +mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/ mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib @@ -537,9 +511,9 @@ mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{mi mv %{buildroot}%{gem_dir}/specifications/default/minitest-%{minitest_version}.gemspec %{buildroot}%{gem_dir}/specifications mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib -mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version} mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib -mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/lib/ +mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/ mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications # The links should replace directory, which RPM cannot handle and it is causing # issues during upgrade from F18 to F19. As a workaround the links are placed @@ -547,7 +521,7 @@ mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec # https://bugzilla.redhat.com/show_bug.cgi?id=988490 ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_vendorlibdir}/psych ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_vendorlibdir}/psych.rb -ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/lib/psych.so %{buildroot}%{ruby_vendorarchdir}/psych.so +ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_vendorarchdir}/psych.so # Adjust the gemspec files so that the gems will load properly sed -i '/^end$/ i\ @@ -619,6 +593,23 @@ sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [: test/ruby/test_process.rb %endif +# Errno::EINVAL: Invalid argument - recvmsg(2) +# Looks to be a problem of Linux 3.12+ and should be possible to remove as soon +# as Koji builders run fixed kerenel. +# https://bugs.ruby-lang.org/issues/9124 +sed -i '/^ def test_timestampns/,/^ end/ s/^/#/' test/socket/test_socket.rb +sed -i '/^ def test_timestamp/,/^ end/ s/^/#/' test/socket/test_socket.rb +sed -i '/^ def test_udp_server/,/^ end/ s/^/#/' test/socket/test_socket.rb +sed -i '/^ def test_recvmsg_nonblock_error/,/^ end/ s/^/#/' test/socket/test_nonblock.rb +sed -i '/^ def test_fd_passing_n/,/^ end/ s/^/#/' test/socket/test_unix.rb +sed -i '/^ def test_fd_passing_n2/,/^ end/ s/^/#/' test/socket/test_unix.rb +sed -i '/^ def test_recvmsg/,/^ end/ s/^/#/' test/socket/test_unix.rb +sed -i '/^ def test_sendcred_ucred/,/^ end/ s/^/#/' test/socket/test_unix.rb + +# Segmentation fault. +# https://bugs.ruby-lang.org/issues/9198 +sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb + # Allow MD5 in OpenSSL. # https://bugs.ruby-lang.org/issues/9154 OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" @@ -711,7 +702,6 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %dir %{ruby_libarchdir} %{ruby_libarchdir}/continuation.so %{ruby_libarchdir}/coverage.so -%{ruby_libarchdir}/curses.so %{ruby_libarchdir}/date_core.so %{ruby_libarchdir}/dbm.so %dir %{ruby_libarchdir}/digest @@ -798,6 +788,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %dir %{ruby_libarchdir}/racc %{ruby_libarchdir}/racc/cparse.so %{ruby_libarchdir}/rbconfig.rb +%{ruby_libarchdir}/rbconfig/sizeof.so %{ruby_libarchdir}/readline.so %{ruby_libarchdir}/ripper.so %{ruby_libarchdir}/sdbm.so @@ -915,6 +906,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Dec 17 2013 V鱈t Ondruch - 2.1.0.0-0.16.r44266 +- Upgrade to Ruby 2.1.0 (r44266). + * Mon Dec 02 2013 V鱈t Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. diff --git a/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch b/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch deleted file mode 100644 index a6766bc..0000000 --- a/rubygems-2.2.0-DRY-Use-full_require_paths-on-yet-another-place.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 02f94e96ea6a9e0fe37341eccd83ffb63549ead5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 3 Oct 2013 14:15:59 +0200 -Subject: [PATCH] DRY: Use full_require_paths on yet another place. - ---- - lib/rubygems/basic_specification.rb | 16 +++++++++++++--- - lib/rubygems/specification.rb | 11 ----------- - 2 files changed, 13 insertions(+), 14 deletions(-) - -diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb -index 24bb4bc..a10eab3 100644 ---- a/lib/rubygems/basic_specification.rb -+++ b/lib/rubygems/basic_specification.rb -@@ -38,11 +38,10 @@ class Gem::BasicSpecification - # Return true if this spec can require +file+. - - def contains_requirable_file? file -- root = full_gem_path - suffixes = Gem.suffixes - -- require_paths.any? do |lib| -- base = "#{root}/#{lib}/#{file}" -+ full_require_paths.any? do |path| -+ base = "#{path}/#{file}" - suffixes.any? { |suf| File.file? "#{base}#{suf}" } - end - end -@@ -84,6 +83,17 @@ class Gem::BasicSpecification - end - - ## -+ # Full paths in the gem to add to $LOAD_PATH when this gem is -+ # activated. -+ # -+ -+ def full_require_paths -+ require_paths.map do |path| -+ File.join full_gem_path, path -+ end -+ end -+ -+ ## - # Returns the full path to the gems directory containing this spec's - # gem directory. eg: /usr/local/lib/ruby/1.8/gems - -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index 6de8c3b..deac343 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -2015,17 +2015,6 @@ class Gem::Specification < Gem::BasicSpecification - end - - ## -- # Full paths in the gem to add to $LOAD_PATH when this gem is -- # activated. -- # -- -- def full_require_paths -- require_paths.map do |path| -- File.join full_gem_path, path -- end -- end -- -- ## - # The RubyGems version required by this gem - - def required_rubygems_version= req --- -1.8.3.1 - diff --git a/rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch deleted file mode 100644 index ad0f0bf..0000000 --- a/rubygems-2.2.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ /dev/null @@ -1,29 +0,0 @@ -From ad80fb9ffe5ab73e05784237de8d8b7d03784867 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 4 Oct 2013 22:13:11 +0200 -Subject: [PATCH] Do not modify global Specification.dirs during installation. - ---- - lib/rubygems/dependency_installer.rb | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index e7c489a..5123fce 100644 ---- a/lib/rubygems/dependency_installer.rb -+++ b/lib/rubygems/dependency_installer.rb -@@ -74,12 +74,6 @@ class Gem::DependencyInstaller - @only_install_dir = !!options[:install_dir] - @install_dir = options[:install_dir] || Gem.dir - -- if options[:install_dir] then -- # HACK shouldn't change the global settings, needed for -i behavior -- # maybe move to the install command? See also github #442 -- Gem::Specification.dirs = @install_dir -- end -- - options = DEFAULT_OPTIONS.merge options - - @bin_dir = options[:bin_dir] --- -1.8.3.1 - diff --git a/rubygems-2.2.0-binary-extensions.patch b/rubygems-2.2.0-binary-extensions.patch deleted file mode 100644 index 5c212e7..0000000 --- a/rubygems-2.2.0-binary-extensions.patch +++ /dev/null @@ -1,179 +0,0 @@ -From 37cd8547d23973a7ec23a004ab9b60738d67ada9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 3 Nov 2011 16:43:05 +0100 -Subject: [PATCH] Add dedicate extensions folder into $LOAD_PATH. - ---- - lib/rubygems/basic_specification.rb | 35 ++++++++++++++++++++++++++++++++--- - lib/rubygems/defaults.rb | 11 +++++++++++ - lib/rubygems/ext/builder.rb | 6 +++++- - lib/rubygems/installer.rb | 1 + - lib/rubygems/specification.rb | 7 +++++++ - lib/rubygems/uninstaller.rb | 1 + - 6 files changed, 57 insertions(+), 4 deletions(-) - -diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb -index a10eab3..da3af91 100644 ---- a/lib/rubygems/basic_specification.rb -+++ b/lib/rubygems/basic_specification.rb -@@ -51,6 +51,14 @@ class Gem::BasicSpecification - File.dirname(loaded_from) == self.class.default_specifications_dir - end - -+ ## -+ # Returns the full path to the exts directory containing this spec's -+ # gem directory. eg: /usr/local/lib/ruby/1.8/exts -+ -+ def exts_dir -+ @exts_dir ||= Gem.default_ext_dir_for(base_dir) || gems_dir -+ end -+ - def find_full_gem_path # :nodoc: - # TODO: also, shouldn't it default to full_name if it hasn't been written? - path = File.expand_path File.join(gems_dir, full_name) -@@ -60,6 +68,15 @@ class Gem::BasicSpecification - - private :find_full_gem_path - -+ def find_full_gem_ext_path # :nodoc: -+ # TODO: skip for gems without extensions. -+ path = File.expand_path File.join(exts_dir, full_name) -+ path.untaint -+ path if File.directory? path -+ end -+ -+ private :find_full_gem_ext_path -+ - ## - # The full path to the gem (install path + full name). - -@@ -70,6 +87,13 @@ class Gem::BasicSpecification - end - - ## -+ # The full path to the gem binary extension (install path + full name). -+ -+ def full_gem_ext_path -+ @full_gem_ext_path ||= find_full_gem_ext_path -+ end -+ -+ ## - # Returns the full name (name-version) of this Gem. Platform information - # is included (name-version-platform) if it is specified and not the - # default Ruby platform. -@@ -88,9 +112,12 @@ class Gem::BasicSpecification - # - - def full_require_paths -- require_paths.map do |path| -- File.join full_gem_path, path -- end -+ require_paths.map do |require_path| -+ full_gem_paths = [full_gem_path, full_gem_ext_path] -+ full_gem_paths.compact! -+ -+ full_gem_paths.map { |path| File.join path, require_path } -+ end.flatten - end - - ## -@@ -110,7 +137,9 @@ class Gem::BasicSpecification - @loaded_from = path && path.to_s - - @full_gem_path = nil -+ @full_gem_ext_path = nil - @gems_dir = nil -+ @exts_dir = nil - @base_dir = nil - end - -diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index 591580b..8ed474f 100644 ---- a/lib/rubygems/defaults.rb -+++ b/lib/rubygems/defaults.rb -@@ -111,6 +111,17 @@ module Gem - end - - ## -+ # Returns binary extensions dir for specified RubyGems base dir or nil -+ # if such directory cannot be determined. -+ # -+ # By default, the binary extensions are located side by side with their -+ # Ruby counterparts, therefore nil is returned -+ -+ def self.default_ext_dir_for base_dir -+ nil -+ end -+ -+ ## - # A wrapper around RUBY_ENGINE const that may not be defined - - def self.ruby_engine -diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb -index 8c05723..75d5fc2 100644 ---- a/lib/rubygems/ext/builder.rb -+++ b/lib/rubygems/ext/builder.rb -@@ -170,7 +170,7 @@ EOF - say "This could take a while..." - end - -- dest_path = File.join @gem_dir, @spec.require_paths.first -+ dest_path = File.join(@only_install_dir ? @gem_dir : @spec.ext_dir, @spec.require_paths.first) - - @ran_rake = false # only run rake once - -@@ -181,5 +181,9 @@ EOF - end - end - -+ def only_install_dir= only_install_dir -+ @only_install_dir = only_install_dir -+ end -+ - end - -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 261af89..a6aca5d 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -662,6 +662,7 @@ TEXT - - def build_extensions - builder = Gem::Ext::Builder.new spec, @build_args -+ builder.only_install_dir = @only_install_dir - - builder.build_extensions - end -diff --git a/lib/rubygems/specification.rb b/lib/rubygems/specification.rb -index deac343..b630fa3 100644 ---- a/lib/rubygems/specification.rb -+++ b/lib/rubygems/specification.rb -@@ -1612,6 +1612,13 @@ class Gem::Specification < Gem::BasicSpecification - @executables = Array(value) - end - -+ # Returns the full path to this spec's ext directory. -+ # eg: /usr/local/lib/ruby/1.8/exts/mygem-1.0 -+ -+ def ext_dir -+ @ext_dir ||= File.expand_path File.join(exts_dir, full_name) -+ end -+ - ## - # Sets extensions to +extensions+, ensuring it is an array. Don't - # use this, push onto the array instead. -diff --git a/lib/rubygems/uninstaller.rb b/lib/rubygems/uninstaller.rb -index 143ab6d..f81a23d 100644 ---- a/lib/rubygems/uninstaller.rb -+++ b/lib/rubygems/uninstaller.rb -@@ -247,6 +247,7 @@ class Gem::Uninstaller - File.writable?(spec.base_dir) - - FileUtils.rm_rf spec.full_gem_path -+ FileUtils.rm_rf spec.ext_dir - - # TODO: should this be moved to spec?... I vote eww (also exists in docmgr) - old_platform_name = [spec.name, --- -1.8.3.1 - From 453497595c4aae9a223940d409b2c7935291ed25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Dec 2013 12:26:37 +0100 Subject: [PATCH 354/529] Fix RubyGems test suite. --- ruby.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby.spec b/ruby.spec index 0089654..952626e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -593,6 +593,10 @@ sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [: test/ruby/test_process.rb %endif +# Fix "Could not find 'minitest'" error. +# http://bugs.ruby-lang.org/issues/9259 +sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb + # Errno::EINVAL: Invalid argument - recvmsg(2) # Looks to be a problem of Linux 3.12+ and should be possible to remove as soon # as Koji builders run fixed kerenel. From f84b34dea7529a382e3efe4ef74a016bdb701f6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Dec 2013 13:52:28 +0100 Subject: [PATCH 355/529] Add git and cmake BR to execute all RubyGems test cases. --- ruby.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruby.spec b/ruby.spec index 952626e..d65d6bc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -156,6 +156,9 @@ BuildRequires: procps BuildRequires: %{_bindir}/dtrace # Unbundle cert.pem BuildRequires: ca-certificates +# RubyGems test suite optional dependencies. +BuildRequires: %{_bindir}/git +BuildRequires: %{_bindir}/cmake # This package provides %%{_bindir}/ruby-mri therefore it is marked by this # virtual provide. It can be installed as dependency of rubypick. From 0492f505187c4f332ac7cb4266dd643f4312cb67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 19 Dec 2013 16:02:49 +0100 Subject: [PATCH 356/529] Update to Ruby 2.1.0 (r44289). --- ruby.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index d65d6bc..3d7e87a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 44266 +%global revision 44289 %global ruby_archive %{name}-%{ruby_version} @@ -913,8 +913,8 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Tue Dec 17 2013 V鱈t Ondruch - 2.1.0.0-0.16.r44266 -- Upgrade to Ruby 2.1.0 (r44266). +* Tue Dec 17 2013 V鱈t Ondruch - 2.1.0.0-0.16.r44289 +- Upgrade to Ruby 2.1.0 (r44289). * Mon Dec 02 2013 V鱈t Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. From 2b7dccf61f4a4965ae1dbddcd69d6e3e72480d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 20 Dec 2013 13:58:40 +0100 Subject: [PATCH 357/529] Upgrade to Ruby 2.1.0 (r44362). --- ruby-2.1.0-resolv.rb-no-encodings.patch | 143 ++++++++++++++++++++++++ ruby.spec | 15 ++- 2 files changed, 153 insertions(+), 5 deletions(-) create mode 100644 ruby-2.1.0-resolv.rb-no-encodings.patch diff --git a/ruby-2.1.0-resolv.rb-no-encodings.patch b/ruby-2.1.0-resolv.rb-no-encodings.patch new file mode 100644 index 0000000..f1037db --- /dev/null +++ b/ruby-2.1.0-resolv.rb-no-encodings.patch @@ -0,0 +1,143 @@ +From 1ffbe07e179a2e047d24c7091f6ff013195b1a93 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sat, 21 Dec 2013 03:37:26 +0000 +Subject: [PATCH] resolv.rb: no encodings + +* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not + consider encodings in hosts file. [ruby-core:59239] [Bug #9273] +* lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 7 +++++++ + lib/resolv.rb | 4 ++-- + test/resolv/test_addr.rb | 12 ++++++++++++ + test/resolv/test_dns.rb | 13 +++++++++++++ + 4 files changed, 34 insertions(+), 2 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index 72eaa6f..93686e9 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,6 +1,13 @@ + install win32.h. + [ruby-core:58801][Bug #9199] reported by arton. + ++Sat Dec 21 12:37:19 2013 Nobuyoshi Nakada ++ ++ * lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not ++ consider encodings in hosts file. [ruby-core:59239] [Bug #9273] ++ ++ * lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto. ++ + Fri Dec 20 17:52:50 2013 Koichi Sasada + + * vm_method.c: check definition of +diff --git a/lib/resolv.rb b/lib/resolv.rb +index 6d34a67..0c2b68e 100644 +--- a/lib/resolv.rb ++++ b/lib/resolv.rb +@@ -187,7 +187,7 @@ class Resolv + unless @initialized + @name2addr = {} + @addr2name = {} +- open(@filename) {|f| ++ open(@filename, 'rb') {|f| + f.each {|line| + line.sub!(/#.*/, '') + addr, hostname, *aliases = line.split(/\s+/) +@@ -920,7 +920,7 @@ class Resolv + nameserver = [] + search = nil + ndots = 1 +- open(filename) {|f| ++ open(filename, 'rb') {|f| + f.each {|line| + line.sub!(/[#;].*/, '') + keyword, *args = line.split(/\s+/) +diff --git a/test/resolv/test_addr.rb b/test/resolv/test_addr.rb +index 84bc8c2..d4728e1 100644 +--- a/test/resolv/test_addr.rb ++++ b/test/resolv/test_addr.rb +@@ -13,4 +13,16 @@ class TestResolvAddr < Test::Unit::TestCase + end + } + end ++ ++ def test_invalid_byte_comment ++ bug9273 = '[ruby-core:59239] [Bug #9273]' ++ Tempfile.open('resolv_test_addr_') do |tmpfile| ++ tmpfile.print("\xff\x00\x40") ++ tmpfile.close ++ hosts = Resolv::Hosts.new(tmpfile.path) ++ assert_nothing_raised(ArgumentError, bug9273) do ++ hosts.each_address("") {break} ++ end ++ end ++ end + end +diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb +index 0d9565e..e3e38ef 100644 +--- a/test/resolv/test_dns.rb ++++ b/test/resolv/test_dns.rb +@@ -1,6 +1,7 @@ + require 'test/unit' + require 'resolv' + require 'socket' ++require 'tempfile' + + class TestResolvDNS < Test::Unit::TestCase + def setup +@@ -150,4 +151,16 @@ class TestResolvDNS < Test::Unit::TestCase + } + end + ++ def test_invalid_byte_comment ++ bug9273 = '[ruby-core:59239] [Bug #9273]' ++ Tempfile.open('resolv_test_dns_') do |tmpfile| ++ tmpfile.print("\xff\x00\x40") ++ tmpfile.close ++ Resolv::DNS.open(tmpfile.path) do |dns| ++ assert_nothing_raised(ArgumentError, bug9273) do ++ dns.getresources("foo.example.org", Resolv::DNS::Resource::IN::A) ++ end ++ end ++ end ++ end + end +-- +1.8.4.2 + +From 1ef0a76c6c6556bf6ab155e2ad28a23748ee59ef Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sat, 21 Dec 2013 07:18:18 +0000 +Subject: [PATCH] test_dns.rb: no server access + +* test/resolv/test_dns.rb (test_invalid_byte_comment): get rid of + actual server access. [Bug #9273] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/resolv/test_dns.rb | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb +index e3e38ef..07396fb 100644 +--- a/test/resolv/test_dns.rb ++++ b/test/resolv/test_dns.rb +@@ -156,10 +156,8 @@ class TestResolvDNS < Test::Unit::TestCase + Tempfile.open('resolv_test_dns_') do |tmpfile| + tmpfile.print("\xff\x00\x40") + tmpfile.close +- Resolv::DNS.open(tmpfile.path) do |dns| +- assert_nothing_raised(ArgumentError, bug9273) do +- dns.getresources("foo.example.org", Resolv::DNS::Resource::IN::A) +- end ++ assert_nothing_raised(ArgumentError, bug9273) do ++ Resolv::DNS::Config.parse_resolv_conf(tmpfile.path) + end + end + end +-- +1.8.4.2 + diff --git a/ruby.spec b/ruby.spec index 3d7e87a..e1f3c9f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -13,7 +13,7 @@ #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 44289 +%global revision 44362 %global ruby_archive %{name}-%{ruby_version} @@ -29,7 +29,7 @@ %global release 16 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.2.0.rc.1 +%global rubygems_version 2.2.0 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -45,7 +45,7 @@ %global minitest_version 4.7.5 %global psych_version 2.0.2 %global rake_version 10.1.0 -%global rdoc_version 4.1.0.rc.1 +%global rdoc_version 4.1.0 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -134,6 +134,10 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# Fixes possible "ArgumentError: invalid byte sequence in US-ASCII" error in +# TestGemRemoteFetcher#test_download_to_cache. +# http://bugs.ruby-lang.org/issues/9273 +Patch18: ruby-2.1.0-resolv.rb-no-encodings.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -399,6 +403,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch8 -p1 %patch12 -p1 %patch17 -p1 +%patch18 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -913,8 +918,8 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Tue Dec 17 2013 V鱈t Ondruch - 2.1.0.0-0.16.r44289 -- Upgrade to Ruby 2.1.0 (r44289). +* Mon Dec 23 2013 V鱈t Ondruch - 2.1.0.0-0.16.r44362 +- Upgrade to Ruby 2.1.0 (r44362). * Mon Dec 02 2013 V鱈t Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. From 641dc00b5fa7b51f36b7072f5084e073368f1275 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 23 Dec 2013 17:55:52 +0100 Subject: [PATCH 358/529] Move RPM macros into /usr/lib/rpm/macros.d directory. This is preferred locatin for RPM macros, since macro files are not typical configuration files (rhbz#846679). --- ruby.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/ruby.spec b/ruby.spec index e1f3c9f..52f0c0b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -458,11 +458,11 @@ sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_li # Move macros file insto proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. -mkdir -p %{buildroot}%{_sysconfdir}/rpm -install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/rpm/macros.ruby -sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.ruby -install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rpm/macros.rubygems -sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.rubygems +mkdir -p %{buildroot}%{_exec_prefix}/lib/rpm/macros.d +install -m 644 %{SOURCE4} %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.ruby +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.ruby +install -m 644 %{SOURCE5} %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems # Kill bundled cert.pem mkdir -p %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ @@ -651,7 +651,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %doc README.EXT %lang(ja) %doc README.EXT.ja -%{_sysconfdir}/rpm/macros.ruby +%{_exec_prefix}/lib/rpm/macros.d/macros.ruby %{_includedir}/* %{_libdir}/libruby.so @@ -848,7 +848,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %exclude %{gem_dir}/specifications/default/test-unit-*.gemspec %files -n rubygems-devel -%{_sysconfdir}/rpm/macros.rubygems +%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems %files -n rubygem-rake %{_bindir}/rake @@ -920,6 +920,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %changelog * Mon Dec 23 2013 V鱈t Ondruch - 2.1.0.0-0.16.r44362 - Upgrade to Ruby 2.1.0 (r44362). +- Move RPM macros into /usr/lib/rpm/macros.d directory. * Mon Dec 02 2013 V鱈t Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. From e7fbfad6e4b67814896b216ceb610c0ec4b2abf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Jan 2014 14:29:26 +0100 Subject: [PATCH 359/529] Fix RubyGems version (rhbz#1036708). --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 6a6bb46..b30b83d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,10 +26,10 @@ %endif -%global release 16 +%global release 17 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.0.3 +%global rubygems_version 2.0.14 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -889,6 +889,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Jan 03 2014 V鱈t Ondruch - 2.0.0.353-17 +- Fix RubyGems version (rhbz#1036708). + * Mon Nov 25 2013 V鱈t Ondruch - 2.0.0.353-16 - Update to Ruby 2.0.0-p353. - Allow MD5 in OpenSSL for tests. From 639617a0ed572bc50a8e3438635e2d1424f8b006 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Jan 2014 14:09:59 +0100 Subject: [PATCH 360/529] Backport regenerated certificates for IMAP tests. --- ...x-test-failures-due-to-expired-certs.patch | 259 ++++++++++++++++++ ruby.spec | 5 + 2 files changed, 264 insertions(+) create mode 100644 ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch diff --git a/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch b/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch new file mode 100644 index 0000000..783484b --- /dev/null +++ b/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch @@ -0,0 +1,259 @@ +From 5ac7c395c19426a9a92f0a918b03e0f493af6e2c Mon Sep 17 00:00:00 2001 +From: tmm1 +Date: Fri, 3 Jan 2014 01:46:55 +0000 +Subject: [PATCH] test/net/imap/test_imap.rb: fix test failures due to expired + certs + +* test/net/imap/cacert.pem: generate new CA cert, since the last one + expired. [Bug #9341] [ruby-core:59459] +* test/net/imap/server.crt: new server cert signed with updated CA. +* test/net/imap/Makefile: add `make regen_certs` to automate this + process. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 8 +++++ + test/net/imap/Makefile | 15 +++++++++ + test/net/imap/cacert.pem | 84 ++++++++++++++++++++++++++---------------------- + test/net/imap/server.crt | 65 +++++++++++++++---------------------- + 4 files changed, 94 insertions(+), 78 deletions(-) + create mode 100644 test/net/imap/Makefile + +diff --git a/ChangeLog b/ChangeLog +index a4f20cd..d6a7148 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,11 @@ ++Fri Jan 3 10:43:57 2014 Aman Gupta ++ ++ * test/net/imap/cacert.pem: generate new CA cert, since the last one ++ expired. [Bug #9341] [ruby-core:59459] ++ * test/net/imap/server.crt: new server cert signed with updated CA. ++ * test/net/imap/Makefile: add `make regen_certs` to automate this ++ process. ++ + Fri Nov 22 13:18:28 2013 Nobuyoshi Nakada + + * util.c (ruby_strtod): BigMath requires more precision. +diff --git a/test/net/imap/Makefile b/test/net/imap/Makefile +new file mode 100644 +index 0000000..b2bc9c7 +--- /dev/null ++++ b/test/net/imap/Makefile +@@ -0,0 +1,15 @@ ++all: ++ ++regen_certs: ++ touch server.key ++ make server.crt ++ ++cacert.pem: server.key ++ openssl req -new -x509 -days 1825 -key server.key -out cacert.pem -text -subj "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org" ++ ++server.csr: ++ openssl req -new -key server.key -out server.csr -text -subj "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost" ++ ++server.crt: server.csr cacert.pem ++ openssl x509 -days 1825 -CA cacert.pem -CAkey server.key -set_serial 00 -in server.csr -req -text -out server.crt ++ rm server.csr +diff --git a/test/net/imap/cacert.pem b/test/net/imap/cacert.pem +index bd7e68a..7073387 100644 +--- a/test/net/imap/cacert.pem ++++ b/test/net/imap/cacert.pem +@@ -2,59 +2,65 @@ Certificate: + Data: + Version: 3 (0x2) + Serial Number: +- 9f:dc:f7:94:98:05:43:4c ++ b9:90:a2:bf:62:69:17:9c + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org + Validity +- Not Before: Dec 23 10:21:33 2010 GMT +- Not After : Jan 1 10:21:33 2014 GMT ++ Not Before: Jan 3 01:34:17 2014 GMT ++ Not After : Jan 2 01:34:17 2019 GMT + Subject: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org + Subject Public Key Info: + Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: +- 00:ce:be:2c:9f:47:ba:db:9c:9c:5b:f0:38:3b:f3: +- 74:20:37:76:23:9f:84:1c:81:90:b4:3e:00:20:34: +- 98:7e:81:69:50:a1:c3:65:96:ea:fa:00:da:8c:cc: +- 53:3f:ba:3c:d0:50:7a:5a:b4:6b:ac:d3:2e:18:ca: +- 2a:69:b3:6a:6f:38:c2:32:a8:06:b6:0a:30:a9:ee: +- 03:38:e9:05:a5:19:23:54:a8:3c:b9:08:ad:2b:72: +- 23:df:93:22:c4:46:a8:ea:f1:a6:e9:30:4a:3f:83: +- 39:e9:62:8e:8b:a3:5e:67:89:1d:7c:75:de:05:aa: +- 58:b1:b7:79:7c:10:80:6d:87 ++ RSA Public Key: (1024 bit) ++ Modulus (1024 bit): ++ 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: ++ bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: ++ 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: ++ 9d:7e:eb:a2:06:e2:ea:7d:07:c7:c7:99:c7:fb:d5: ++ b8:eb:63:77:62:2b:18:12:c3:53:58:d0:f5:c7:40: ++ 0c:01:d1:26:82:34:16:09:e3:dc:65:f4:dc:bb:5d: ++ a5:41:60:e7:a9:74:ba:d7:4c:b6:a3:9c:c5:8c:89: ++ af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: ++ d0:fc:d6:eb:fc:06:82:10:fb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: +- 41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A ++ E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 + X509v3 Authority Key Identifier: +- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A ++ keyid:E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 ++ DirName:/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org ++ serial:B9:90:A2:BF:62:69:17:9C + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption +- 86:00:33:b9:dd:ff:5f:83:59:5f:c3:29:3c:d7:11:db:10:b3: +- d7:d1:70:fb:0a:c6:74:85:c6:ea:e1:15:c4:92:f8:0e:11:cc: +- ff:a6:3c:31:c2:2c:66:d8:fe:63:93:9f:b0:97:e6:f5:bc:5c: +- 80:68:96:5d:eb:77:b9:23:dd:68:a7:49:03:ff:22:48:55:f1: +- 39:7c:20:21:ff:64:52:e1:f6:cf:3c:b3:4d:2c:5c:03:62:ea: +- c5:49:99:07:fa:8d:ff:7b:c2:75:0c:ca:24:b5:0b:f5:b7:57: +- 3a:10:f0:8a:bb:9a:e8:92:4d:d5:6f:c2:a2:29:36:61:78:a4: +- dc:7b ++ 8f:77:06:4e:31:72:12:ee:68:09:70:27:d4:31:85:ef:10:95: ++ f9:0f:2b:66:63:08:37:88:6e:b7:9b:40:3e:18:77:33:86:e8: ++ 61:6a:b7:3c:cb:c7:a6:d6:d5:92:6a:1f:56:d0:9f:5c:32:56: ++ d3:37:52:fe:0e:20:c2:7a:0d:fe:2d:3c:81:da:b8:7f:4d:6a: ++ 08:01:d9:be:7a:a2:15:be:a6:ce:49:64:90:8c:9a:ca:6e:2e: ++ 84:48:1d:94:19:56:94:46:aa:25:9b:68:c2:80:60:bf:cb:2e: ++ 35:03:ea:0a:65:5a:33:38:c6:cc:81:46:c0:bc:36:86:96:39: ++ 10:7d + -----BEGIN CERTIFICATE----- +-MIIC6DCCAlGgAwIBAgIJAJ/c95SYBUNMMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD +-VQQGEwJKUDEQMA4GA1UECAwHU2hpbWFuZTEUMBIGA1UEBwwLTWF0ei1lIGNpdHkx +-FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDDAxSdWJ5IFRlc3QgQ0Ex +-JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTAxMjIz +-MTAyMTMzWhcNMTQwMTAxMTAyMTMzWjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgM +-B1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQKDA5SdWJ5IENv +-cmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz ++MIIDjTCCAvagAwIBAgIJALmQor9iaRecMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD ++VQQGEwJKUDEQMA4GA1UECBMHU2hpbWFuZTEUMBIGA1UEBxMLTWF0ei1lIGNpdHkx ++FzAVBgNVBAoTDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDEwxSdWJ5IFRlc3QgQ0Ex ++JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTQwMTAz ++MDEzNDE3WhcNMTkwMTAyMDEzNDE3WjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT ++B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv ++cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz + ZWN1cml0eUBydWJ5LWxhbmcub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB +-gQDOviyfR7rbnJxb8Dg783QgN3Yjn4QcgZC0PgAgNJh+gWlQocNllur6ANqMzFM/ +-ujzQUHpatGus0y4Yyipps2pvOMIyqAa2CjCp7gM46QWlGSNUqDy5CK0rciPfkyLE +-Rqjq8abpMEo/gznpYo6Lo15niR18dd4Fqlixt3l8EIBthwIDAQABo1AwTjAdBgNV +-HQ4EFgQUQclJN7H6YeO61xk92dqMuYLJtGowHwYDVR0jBBgwFoAUQclJN7H6YeO6 +-1xk92dqMuYLJtGowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCGADO5 +-3f9fg1lfwyk81xHbELPX0XD7CsZ0hcbq4RXEkvgOEcz/pjwxwixm2P5jk5+wl+b1 +-vFyAaJZd63e5I91op0kD/yJIVfE5fCAh/2RS4fbPPLNNLFwDYurFSZkH+o3/e8J1 +-DMoktQv1t1c6EPCKu5rokk3Vb8KiKTZheKTcew== ++gQDbddBF3rHfv3GgDrCl5rz0HJ3lJWdkxXvL8a/Gvpqq6n4PzAWv70BpBrLJE51+ ++66IG4up9B8fHmcf71bjrY3diKxgSw1NY0PXHQAwB0SaCNBYJ49xl9Ny7XaVBYOep ++dLrXTLajnMWMia/L6J8F/ur+ZCS/5+3j9tD81uv8BoIQ+wIDAQABo4H0MIHxMB0G ++A1UdDgQWBBToflisE3sDIo2erzILhImAgAwewjCBwQYDVR0jBIG5MIG2gBToflis ++E3sDIo2erzILhImAgAwewqGBkqSBjzCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT ++B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv ++cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz ++ZWN1cml0eUBydWJ5LWxhbmcub3JnggkAuZCiv2JpF5wwDAYDVR0TBAUwAwEB/zAN ++BgkqhkiG9w0BAQUFAAOBgQCPdwZOMXIS7mgJcCfUMYXvEJX5DytmYwg3iG63m0A+ ++GHczhuhharc8y8em1tWSah9W0J9cMlbTN1L+DiDCeg3+LTyB2rh/TWoIAdm+eqIV ++vqbOSWSQjJrKbi6ESB2UGVaURqolm2jCgGC/yy41A+oKZVozOMbMgUbAvDaGljkQ ++fQ== + -----END CERTIFICATE----- +diff --git a/test/net/imap/server.crt b/test/net/imap/server.crt +index d848b26..fa4f994 100644 +--- a/test/net/imap/server.crt ++++ b/test/net/imap/server.crt +@@ -1,17 +1,17 @@ + Certificate: + Data: +- Version: 3 (0x2) ++ Version: 1 (0x0) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org + Validity +- Not Before: Dec 23 10:23:52 2010 GMT +- Not After : Jan 1 10:23:52 2014 GMT ++ Not Before: Jan 3 01:34:17 2014 GMT ++ Not After : Jan 2 01:34:17 2019 GMT + Subject: C=JP, ST=Shimane, O=Ruby Core Team, OU=Ruby Test, CN=localhost + Subject Public Key Info: + Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: ++ RSA Public Key: (1024 bit) ++ Modulus (1024 bit): + 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: + bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: + 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: +@@ -22,40 +22,27 @@ Certificate: + af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: + d0:fc:d6:eb:fc:06:82:10:fb + Exponent: 65537 (0x10001) +- X509v3 extensions: +- X509v3 Basic Constraints: +- CA:FALSE +- Netscape Comment: +- OpenSSL Generated Certificate +- X509v3 Subject Key Identifier: +- E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 +- X509v3 Authority Key Identifier: +- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A +- + Signature Algorithm: sha1WithRSAEncryption +- ae:ee:cd:fe:c9:af:48:0b:50:37:ac:6a:f6:68:90:9b:67:df: +- 6f:2d:17:c9:3c:a5:da:ad:39:dc:2a:5b:07:88:26:38:19:30: +- d6:95:cf:10:69:c7:92:14:83:be:f1:b5:8e:6f:d9:91:51:c5: +- 63:ae:1c:89:ac:27:bf:4f:2a:8f:4e:0c:57:42:0a:c9:8e:0c: +- f4:f3:02:f7:ea:44:b6:e4:47:05:af:4e:74:e4:87:87:d9:c8: +- 76:ed:ab:32:7c:f0:31:34:10:14:bc:a6:37:cd:d7:dc:33:da: +- 82:d3:d4:9b:e9:d5:cd:38:cc:fa:81:5f:4e:fd:5f:53:05:5d: +- 76:f9 ++ 85:f5:d3:05:8b:8c:f4:43:1c:88:f2:8f:b2:f2:93:77:b7:3d: ++ 95:c6:a0:34:bc:33:6a:d8:85:5f:3e:86:08:10:c5:5c:c1:76: ++ a3:53:3c:dc:38:98:23:97:e7:da:21:ac:e8:4d:3c:96:70:29: ++ ff:ff:1e:4a:9a:17:2b:db:04:62:b9:ef:ab:ea:a7:a5:e8:7c: ++ b1:d5:ed:30:a8:6c:78:de:51:7e:e3:8a:c2:a4:64:a8:63:a2: ++ bc:fd:43:9c:f3:55:7d:54:c9:6a:d8:53:1c:4b:6b:03:aa:b6: ++ 19:e6:a4:4f:47:00:96:c5:42:59:85:4e:c3:4e:cd:41:82:53: ++ 10:f8 + -----BEGIN CERTIFICATE----- +-MIIC3jCCAkegAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjDELMAkGA1UEBhMCSlAx +-EDAOBgNVBAgMB1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQK +-DA5SdWJ5IENvcmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZI +-hvcNAQkBFhZzZWN1cml0eUBydWJ5LWxhbmcub3JnMB4XDTEwMTIyMzEwMjM1MloX +-DTE0MDEwMTEwMjM1MlowYDELMAkGA1UEBhMCSlAxEDAOBgNVBAgMB1NoaW1hbmUx +-FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRIwEAYDVQQLDAlSdWJ5IFRlc3QxEjAQ +-BgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA23XQ +-Rd6x379xoA6wpea89Byd5SVnZMV7y/Gvxr6aqup+D8wFr+9AaQayyROdfuuiBuLq +-fQfHx5nH+9W462N3YisYEsNTWND1x0AMAdEmgjQWCePcZfTcu12lQWDnqXS610y2 +-o5zFjImvy+ifBf7q/mQkv+ft4/bQ/Nbr/AaCEPsCAwEAAaN7MHkwCQYDVR0TBAIw +-ADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUw +-HQYDVR0OBBYEFOh+WKwTewMijZ6vMguEiYCADB7CMB8GA1UdIwQYMBaAFEHJSTex +-+mHjutcZPdnajLmCybRqMA0GCSqGSIb3DQEBBQUAA4GBAK7uzf7Jr0gLUDesavZo +-kJtn328tF8k8pdqtOdwqWweIJjgZMNaVzxBpx5IUg77xtY5v2ZFRxWOuHImsJ79P +-Ko9ODFdCCsmODPTzAvfqRLbkRwWvTnTkh4fZyHbtqzJ88DE0EBS8pjfN19wz2oLT +-1Jvp1c04zPqBX079X1MFXXb5 ++MIICXDCCAcUCAQAwDQYJKoZIhvcNAQEFBQAwgYwxCzAJBgNVBAYTAkpQMRAwDgYD ++VQQIEwdTaGltYW5lMRQwEgYDVQQHEwtNYXR6LWUgY2l0eTEXMBUGA1UEChMOUnVi ++eSBDb3JlIFRlYW0xFTATBgNVBAMTDFJ1YnkgVGVzdCBDQTElMCMGCSqGSIb3DQEJ ++ARYWc2VjdXJpdHlAcnVieS1sYW5nLm9yZzAeFw0xNDAxMDMwMTM0MTdaFw0xOTAx ++MDIwMTM0MTdaMGAxCzAJBgNVBAYTAkpQMRAwDgYDVQQIEwdTaGltYW5lMRcwFQYD ++VQQKEw5SdWJ5IENvcmUgVGVhbTESMBAGA1UECxMJUnVieSBUZXN0MRIwEAYDVQQD ++Ewlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANt10EXesd+/ ++caAOsKXmvPQcneUlZ2TFe8vxr8a+mqrqfg/MBa/vQGkGsskTnX7rogbi6n0Hx8eZ ++x/vVuOtjd2IrGBLDU1jQ9cdADAHRJoI0Fgnj3GX03LtdpUFg56l0utdMtqOcxYyJ ++r8vonwX+6v5kJL/n7eP20PzW6/wGghD7AgMBAAEwDQYJKoZIhvcNAQEFBQADgYEA ++hfXTBYuM9EMciPKPsvKTd7c9lcagNLwzatiFXz6GCBDFXMF2o1M83DiYI5fn2iGs ++6E08lnAp//8eSpoXK9sEYrnvq+qnpeh8sdXtMKhseN5RfuOKwqRkqGOivP1DnPNV ++fVTJathTHEtrA6q2GeakT0cAlsVCWYVOw07NQYJTEPg= + -----END CERTIFICATE----- +-- +1.8.5.1 + diff --git a/ruby.spec b/ruby.spec index b30b83d..9b8460a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -155,6 +155,9 @@ Patch18: ruby-2.0.0-p247-Revert-mkmf.rb-prefix-install_dirs-only-with-DESTDIR.pa # Fixes multilib conlicts of .gemspec files. # https://bugs.ruby-lang.org/issues/8623 Patch19: ruby-2.0.0-p247-Make-stable-Gem-Specification.files-in-default-.gems.patch +# Backport regenerated certificates for IMAP tests. +# http://bugs.ruby-lang.org/issues/9341 +Patch20: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -423,6 +426,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -891,6 +895,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %changelog * Fri Jan 03 2014 V鱈t Ondruch - 2.0.0.353-17 - Fix RubyGems version (rhbz#1036708). +- Fix FTBFS due to expired certificate for IMAP test case. * Mon Nov 25 2013 V鱈t Ondruch - 2.0.0.353-16 - Update to Ruby 2.0.0-p353. From f8855bc5dd7fed13a6ca027265c2065997365c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 2 Jan 2014 18:36:55 +0100 Subject: [PATCH 361/529] Ignore IMAP tests due to expired certificate. --- ruby.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby.spec b/ruby.spec index 52f0c0b..f1bb181 100644 --- a/ruby.spec +++ b/ruby.spec @@ -563,6 +563,10 @@ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{r %check DISABLE_TESTS="" +# Ignore IMAP tests due to expired certificate. +# http://bugs.ruby-lang.org/issues/9341 +DISABLE_TESTS="-x test_imap.rb $DISABLE_TESTS" + %ifarch armv7l armv7hl armv7hnl # test_call_double(DL::TestDL) fails on ARM HardFP # http://bugs.ruby-lang.org/issues/6592 From 7b70466c53e32de5aba4f14d448c8050aed1094f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 2 Jan 2014 18:58:30 +0100 Subject: [PATCH 362/529] Upgrade to Ruby 2.1.0. --- ruby.spec | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/ruby.spec b/ruby.spec index f1bb181..fac33a8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -6,14 +6,13 @@ %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} -%global ruby_version_patch_level %{major_minor_version}.%{teeny_version}.%{patch_level} %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. #%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -%global revision 44362 +#%%global revision 44362 %global ruby_archive %{name}-%{ruby_version} @@ -22,11 +21,14 @@ %global development_release %{?milestone}%{?!milestone:%{?revision:r%{revision}}} %global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision:r%{revision}}} %else -%global ruby_archive %{ruby_archive}-p%{patch_level} +# Ruby will be using semver versioning scheme since Ruby 2.1.0. However, it is +# unclear ATM what name will be used when next bugfix version is released. +# http://bugs.ruby-lang.org/issues/8835 +#%%global ruby_archive %{ruby_archive}-p%{patch_level} %endif -%global release 16 +%global release 17 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.0 @@ -37,7 +39,7 @@ # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 -%global irb_version %{ruby_version_patch_level} +%global irb_version %{ruby_version} %global bigdecimal_version 1.2.3 %global io_console_version 0.4.2 @@ -61,7 +63,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby -Version: %{ruby_version_patch_level} +Version: %{ruby_version} Release: %{release_string} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... @@ -247,7 +249,7 @@ specified in standard Ruby syntax. Summary: The Interactive Ruby Version: %{irb_version} Group: Development/Libraries -Requires: %{name}-libs = %{ruby_version_patch_level} +Requires: %{name}-libs = %{ruby_version} Provides: irb = %{version}-%{release} Provides: ruby(irb) = %{version}-%{release} BuildArch: noarch @@ -387,8 +389,8 @@ serialize and de-serialize most Ruby objects to and from the YAML format. %package tcltk Summary: Tcl/Tk interface for scripting language Ruby Group: Development/Languages -Requires: %{name}-libs%{?_isa} = %{ruby_version_patch_level} -Provides: ruby(tcltk) = %{ruby_version_patch_level}-%{release} +Requires: %{name}-libs%{?_isa} = %{ruby_version} +Provides: ruby(tcltk) = %{ruby_version}-%{release} %description tcltk Tcl/Tk interface for the object-oriented scripting language Ruby. @@ -922,16 +924,11 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Mon Dec 23 2013 V鱈t Ondruch - 2.1.0.0-0.16.r44362 -- Upgrade to Ruby 2.1.0 (r44362). +* Thu Jan 02 2014 V鱈t Ondruch - 2.1.0-17 +- Upgrade to Ruby 2.1.0. - Move RPM macros into /usr/lib/rpm/macros.d directory. - -* Mon Dec 02 2013 V鱈t Ondruch - 2.1.0.0-0.16.preview1 - Allow MD5 in OpenSSL for tests. -* Mon Oct 07 2013 V鱈t Ondruch - 2.1.0.0-0.16.preview1 -- Update to Ruby 2.1.0.preview1. - * Tue Jul 30 2013 V鱈t Ondruch - 2.0.0.247-15 - Move Psych symlinks to vendor dir, to prevent F18 -> F19 upgrade issues (rhbz#988490). From 16f19fee741116801ec4832494ef8844233e534e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 2 Jan 2014 19:00:56 +0100 Subject: [PATCH 363/529] Remove obsoleted obsoletes. --- ruby.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index fac33a8..68a65d5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -271,8 +271,6 @@ Requires: rubygem(json) >= %{json_version} Provides: rdoc = %{version}-%{release} Provides: ri = %{version}-%{release} Provides: rubygem(rdoc) = %{version}-%{release} -Obsoletes: ruby-rdoc < %{version} -Obsoletes: ruby-ri < %{version} BuildArch: noarch %description -n rubygem-rdoc From 8fc18e146bbc17abdc649038fd11e3ad5fc2f4fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Jan 2014 13:20:53 +0100 Subject: [PATCH 364/529] Re-enable fixed test case. --- ruby.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index 68a65d5..1bd690f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -585,12 +585,6 @@ sed -i "/assert_equal(\"-0x1.0p+2\", sprintf('%.1a', Float('-0x1.ffp+1')), \"\[r # the test suite). touch abrt.rb -# Fix "./ruby: error while loading shared libraries: libruby.so.2.1: cannot open -# shared object file: No such file or directory" error. -# http://bugs.ruby-lang.org/issues/8971 -# Fixed in rev43129. -sed -i '/yes-test-sample/,/test-knownbugs/ s/MINIRUBY/RUNRUBY/' uncommon.mk - # TestSignal#test_hup_me hangs up the test suite. # http://bugs.ruby-lang.org/issues/8997 sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb From 97430c9392040e6befb5cdf52f54f8e08bd99382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Jan 2014 14:09:59 +0100 Subject: [PATCH 365/529] Backport regenerated certificates for IMAP tests. --- ...x-test-failures-due-to-expired-certs.patch | 259 ++++++++++++++++++ ruby.spec | 8 +- 2 files changed, 263 insertions(+), 4 deletions(-) create mode 100644 ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch diff --git a/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch b/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch new file mode 100644 index 0000000..f9fa197 --- /dev/null +++ b/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch @@ -0,0 +1,259 @@ +From 5ac7c395c19426a9a92f0a918b03e0f493af6e2c Mon Sep 17 00:00:00 2001 +From: tmm1 +Date: Fri, 3 Jan 2014 01:46:55 +0000 +Subject: [PATCH] test/net/imap/test_imap.rb: fix test failures due to expired + certs + +* test/net/imap/cacert.pem: generate new CA cert, since the last one + expired. [Bug #9341] [ruby-core:59459] +* test/net/imap/server.crt: new server cert signed with updated CA. +* test/net/imap/Makefile: add `make regen_certs` to automate this + process. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 8 +++++ + test/net/imap/Makefile | 15 +++++++++ + test/net/imap/cacert.pem | 84 ++++++++++++++++++++++++++---------------------- + test/net/imap/server.crt | 65 +++++++++++++++---------------------- + 4 files changed, 94 insertions(+), 78 deletions(-) + create mode 100644 test/net/imap/Makefile + +diff --git a/ChangeLog b/ChangeLog +index a4f20cd..d6a7148 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,11 @@ ++Fri Jan 3 10:43:57 2014 Aman Gupta ++ ++ * test/net/imap/cacert.pem: generate new CA cert, since the last one ++ expired. [Bug #9341] [ruby-core:59459] ++ * test/net/imap/server.crt: new server cert signed with updated CA. ++ * test/net/imap/Makefile: add `make regen_certs` to automate this ++ process. ++ + Wed Dec 25 16:58:31 2013 Nobuyoshi Nakada + + * proc.c (rb_mod_define_method): consider visibility only if self +diff --git a/test/net/imap/Makefile b/test/net/imap/Makefile +new file mode 100644 +index 0000000..b2bc9c7 +--- /dev/null ++++ b/test/net/imap/Makefile +@@ -0,0 +1,15 @@ ++all: ++ ++regen_certs: ++ touch server.key ++ make server.crt ++ ++cacert.pem: server.key ++ openssl req -new -x509 -days 1825 -key server.key -out cacert.pem -text -subj "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org" ++ ++server.csr: ++ openssl req -new -key server.key -out server.csr -text -subj "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost" ++ ++server.crt: server.csr cacert.pem ++ openssl x509 -days 1825 -CA cacert.pem -CAkey server.key -set_serial 00 -in server.csr -req -text -out server.crt ++ rm server.csr +diff --git a/test/net/imap/cacert.pem b/test/net/imap/cacert.pem +index bd7e68a..7073387 100644 +--- a/test/net/imap/cacert.pem ++++ b/test/net/imap/cacert.pem +@@ -2,59 +2,65 @@ Certificate: + Data: + Version: 3 (0x2) + Serial Number: +- 9f:dc:f7:94:98:05:43:4c ++ b9:90:a2:bf:62:69:17:9c + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org + Validity +- Not Before: Dec 23 10:21:33 2010 GMT +- Not After : Jan 1 10:21:33 2014 GMT ++ Not Before: Jan 3 01:34:17 2014 GMT ++ Not After : Jan 2 01:34:17 2019 GMT + Subject: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org + Subject Public Key Info: + Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: +- 00:ce:be:2c:9f:47:ba:db:9c:9c:5b:f0:38:3b:f3: +- 74:20:37:76:23:9f:84:1c:81:90:b4:3e:00:20:34: +- 98:7e:81:69:50:a1:c3:65:96:ea:fa:00:da:8c:cc: +- 53:3f:ba:3c:d0:50:7a:5a:b4:6b:ac:d3:2e:18:ca: +- 2a:69:b3:6a:6f:38:c2:32:a8:06:b6:0a:30:a9:ee: +- 03:38:e9:05:a5:19:23:54:a8:3c:b9:08:ad:2b:72: +- 23:df:93:22:c4:46:a8:ea:f1:a6:e9:30:4a:3f:83: +- 39:e9:62:8e:8b:a3:5e:67:89:1d:7c:75:de:05:aa: +- 58:b1:b7:79:7c:10:80:6d:87 ++ RSA Public Key: (1024 bit) ++ Modulus (1024 bit): ++ 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: ++ bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: ++ 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: ++ 9d:7e:eb:a2:06:e2:ea:7d:07:c7:c7:99:c7:fb:d5: ++ b8:eb:63:77:62:2b:18:12:c3:53:58:d0:f5:c7:40: ++ 0c:01:d1:26:82:34:16:09:e3:dc:65:f4:dc:bb:5d: ++ a5:41:60:e7:a9:74:ba:d7:4c:b6:a3:9c:c5:8c:89: ++ af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: ++ d0:fc:d6:eb:fc:06:82:10:fb + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Subject Key Identifier: +- 41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A ++ E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 + X509v3 Authority Key Identifier: +- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A ++ keyid:E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 ++ DirName:/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org ++ serial:B9:90:A2:BF:62:69:17:9C + + X509v3 Basic Constraints: + CA:TRUE + Signature Algorithm: sha1WithRSAEncryption +- 86:00:33:b9:dd:ff:5f:83:59:5f:c3:29:3c:d7:11:db:10:b3: +- d7:d1:70:fb:0a:c6:74:85:c6:ea:e1:15:c4:92:f8:0e:11:cc: +- ff:a6:3c:31:c2:2c:66:d8:fe:63:93:9f:b0:97:e6:f5:bc:5c: +- 80:68:96:5d:eb:77:b9:23:dd:68:a7:49:03:ff:22:48:55:f1: +- 39:7c:20:21:ff:64:52:e1:f6:cf:3c:b3:4d:2c:5c:03:62:ea: +- c5:49:99:07:fa:8d:ff:7b:c2:75:0c:ca:24:b5:0b:f5:b7:57: +- 3a:10:f0:8a:bb:9a:e8:92:4d:d5:6f:c2:a2:29:36:61:78:a4: +- dc:7b ++ 8f:77:06:4e:31:72:12:ee:68:09:70:27:d4:31:85:ef:10:95: ++ f9:0f:2b:66:63:08:37:88:6e:b7:9b:40:3e:18:77:33:86:e8: ++ 61:6a:b7:3c:cb:c7:a6:d6:d5:92:6a:1f:56:d0:9f:5c:32:56: ++ d3:37:52:fe:0e:20:c2:7a:0d:fe:2d:3c:81:da:b8:7f:4d:6a: ++ 08:01:d9:be:7a:a2:15:be:a6:ce:49:64:90:8c:9a:ca:6e:2e: ++ 84:48:1d:94:19:56:94:46:aa:25:9b:68:c2:80:60:bf:cb:2e: ++ 35:03:ea:0a:65:5a:33:38:c6:cc:81:46:c0:bc:36:86:96:39: ++ 10:7d + -----BEGIN CERTIFICATE----- +-MIIC6DCCAlGgAwIBAgIJAJ/c95SYBUNMMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD +-VQQGEwJKUDEQMA4GA1UECAwHU2hpbWFuZTEUMBIGA1UEBwwLTWF0ei1lIGNpdHkx +-FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDDAxSdWJ5IFRlc3QgQ0Ex +-JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTAxMjIz +-MTAyMTMzWhcNMTQwMTAxMTAyMTMzWjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgM +-B1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQKDA5SdWJ5IENv +-cmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz ++MIIDjTCCAvagAwIBAgIJALmQor9iaRecMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD ++VQQGEwJKUDEQMA4GA1UECBMHU2hpbWFuZTEUMBIGA1UEBxMLTWF0ei1lIGNpdHkx ++FzAVBgNVBAoTDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDEwxSdWJ5IFRlc3QgQ0Ex ++JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTQwMTAz ++MDEzNDE3WhcNMTkwMTAyMDEzNDE3WjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT ++B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv ++cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz + ZWN1cml0eUBydWJ5LWxhbmcub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB +-gQDOviyfR7rbnJxb8Dg783QgN3Yjn4QcgZC0PgAgNJh+gWlQocNllur6ANqMzFM/ +-ujzQUHpatGus0y4Yyipps2pvOMIyqAa2CjCp7gM46QWlGSNUqDy5CK0rciPfkyLE +-Rqjq8abpMEo/gznpYo6Lo15niR18dd4Fqlixt3l8EIBthwIDAQABo1AwTjAdBgNV +-HQ4EFgQUQclJN7H6YeO61xk92dqMuYLJtGowHwYDVR0jBBgwFoAUQclJN7H6YeO6 +-1xk92dqMuYLJtGowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCGADO5 +-3f9fg1lfwyk81xHbELPX0XD7CsZ0hcbq4RXEkvgOEcz/pjwxwixm2P5jk5+wl+b1 +-vFyAaJZd63e5I91op0kD/yJIVfE5fCAh/2RS4fbPPLNNLFwDYurFSZkH+o3/e8J1 +-DMoktQv1t1c6EPCKu5rokk3Vb8KiKTZheKTcew== ++gQDbddBF3rHfv3GgDrCl5rz0HJ3lJWdkxXvL8a/Gvpqq6n4PzAWv70BpBrLJE51+ ++66IG4up9B8fHmcf71bjrY3diKxgSw1NY0PXHQAwB0SaCNBYJ49xl9Ny7XaVBYOep ++dLrXTLajnMWMia/L6J8F/ur+ZCS/5+3j9tD81uv8BoIQ+wIDAQABo4H0MIHxMB0G ++A1UdDgQWBBToflisE3sDIo2erzILhImAgAwewjCBwQYDVR0jBIG5MIG2gBToflis ++E3sDIo2erzILhImAgAwewqGBkqSBjzCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT ++B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv ++cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz ++ZWN1cml0eUBydWJ5LWxhbmcub3JnggkAuZCiv2JpF5wwDAYDVR0TBAUwAwEB/zAN ++BgkqhkiG9w0BAQUFAAOBgQCPdwZOMXIS7mgJcCfUMYXvEJX5DytmYwg3iG63m0A+ ++GHczhuhharc8y8em1tWSah9W0J9cMlbTN1L+DiDCeg3+LTyB2rh/TWoIAdm+eqIV ++vqbOSWSQjJrKbi6ESB2UGVaURqolm2jCgGC/yy41A+oKZVozOMbMgUbAvDaGljkQ ++fQ== + -----END CERTIFICATE----- +diff --git a/test/net/imap/server.crt b/test/net/imap/server.crt +index d848b26..fa4f994 100644 +--- a/test/net/imap/server.crt ++++ b/test/net/imap/server.crt +@@ -1,17 +1,17 @@ + Certificate: + Data: +- Version: 3 (0x2) ++ Version: 1 (0x0) + Serial Number: 0 (0x0) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org + Validity +- Not Before: Dec 23 10:23:52 2010 GMT +- Not After : Jan 1 10:23:52 2014 GMT ++ Not Before: Jan 3 01:34:17 2014 GMT ++ Not After : Jan 2 01:34:17 2019 GMT + Subject: C=JP, ST=Shimane, O=Ruby Core Team, OU=Ruby Test, CN=localhost + Subject Public Key Info: + Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: ++ RSA Public Key: (1024 bit) ++ Modulus (1024 bit): + 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: + bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: + 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: +@@ -22,40 +22,27 @@ Certificate: + af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: + d0:fc:d6:eb:fc:06:82:10:fb + Exponent: 65537 (0x10001) +- X509v3 extensions: +- X509v3 Basic Constraints: +- CA:FALSE +- Netscape Comment: +- OpenSSL Generated Certificate +- X509v3 Subject Key Identifier: +- E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 +- X509v3 Authority Key Identifier: +- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A +- + Signature Algorithm: sha1WithRSAEncryption +- ae:ee:cd:fe:c9:af:48:0b:50:37:ac:6a:f6:68:90:9b:67:df: +- 6f:2d:17:c9:3c:a5:da:ad:39:dc:2a:5b:07:88:26:38:19:30: +- d6:95:cf:10:69:c7:92:14:83:be:f1:b5:8e:6f:d9:91:51:c5: +- 63:ae:1c:89:ac:27:bf:4f:2a:8f:4e:0c:57:42:0a:c9:8e:0c: +- f4:f3:02:f7:ea:44:b6:e4:47:05:af:4e:74:e4:87:87:d9:c8: +- 76:ed:ab:32:7c:f0:31:34:10:14:bc:a6:37:cd:d7:dc:33:da: +- 82:d3:d4:9b:e9:d5:cd:38:cc:fa:81:5f:4e:fd:5f:53:05:5d: +- 76:f9 ++ 85:f5:d3:05:8b:8c:f4:43:1c:88:f2:8f:b2:f2:93:77:b7:3d: ++ 95:c6:a0:34:bc:33:6a:d8:85:5f:3e:86:08:10:c5:5c:c1:76: ++ a3:53:3c:dc:38:98:23:97:e7:da:21:ac:e8:4d:3c:96:70:29: ++ ff:ff:1e:4a:9a:17:2b:db:04:62:b9:ef:ab:ea:a7:a5:e8:7c: ++ b1:d5:ed:30:a8:6c:78:de:51:7e:e3:8a:c2:a4:64:a8:63:a2: ++ bc:fd:43:9c:f3:55:7d:54:c9:6a:d8:53:1c:4b:6b:03:aa:b6: ++ 19:e6:a4:4f:47:00:96:c5:42:59:85:4e:c3:4e:cd:41:82:53: ++ 10:f8 + -----BEGIN CERTIFICATE----- +-MIIC3jCCAkegAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjDELMAkGA1UEBhMCSlAx +-EDAOBgNVBAgMB1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQK +-DA5SdWJ5IENvcmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZI +-hvcNAQkBFhZzZWN1cml0eUBydWJ5LWxhbmcub3JnMB4XDTEwMTIyMzEwMjM1MloX +-DTE0MDEwMTEwMjM1MlowYDELMAkGA1UEBhMCSlAxEDAOBgNVBAgMB1NoaW1hbmUx +-FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRIwEAYDVQQLDAlSdWJ5IFRlc3QxEjAQ +-BgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA23XQ +-Rd6x379xoA6wpea89Byd5SVnZMV7y/Gvxr6aqup+D8wFr+9AaQayyROdfuuiBuLq +-fQfHx5nH+9W462N3YisYEsNTWND1x0AMAdEmgjQWCePcZfTcu12lQWDnqXS610y2 +-o5zFjImvy+ifBf7q/mQkv+ft4/bQ/Nbr/AaCEPsCAwEAAaN7MHkwCQYDVR0TBAIw +-ADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUw +-HQYDVR0OBBYEFOh+WKwTewMijZ6vMguEiYCADB7CMB8GA1UdIwQYMBaAFEHJSTex +-+mHjutcZPdnajLmCybRqMA0GCSqGSIb3DQEBBQUAA4GBAK7uzf7Jr0gLUDesavZo +-kJtn328tF8k8pdqtOdwqWweIJjgZMNaVzxBpx5IUg77xtY5v2ZFRxWOuHImsJ79P +-Ko9ODFdCCsmODPTzAvfqRLbkRwWvTnTkh4fZyHbtqzJ88DE0EBS8pjfN19wz2oLT +-1Jvp1c04zPqBX079X1MFXXb5 ++MIICXDCCAcUCAQAwDQYJKoZIhvcNAQEFBQAwgYwxCzAJBgNVBAYTAkpQMRAwDgYD ++VQQIEwdTaGltYW5lMRQwEgYDVQQHEwtNYXR6LWUgY2l0eTEXMBUGA1UEChMOUnVi ++eSBDb3JlIFRlYW0xFTATBgNVBAMTDFJ1YnkgVGVzdCBDQTElMCMGCSqGSIb3DQEJ ++ARYWc2VjdXJpdHlAcnVieS1sYW5nLm9yZzAeFw0xNDAxMDMwMTM0MTdaFw0xOTAx ++MDIwMTM0MTdaMGAxCzAJBgNVBAYTAkpQMRAwDgYDVQQIEwdTaGltYW5lMRcwFQYD ++VQQKEw5SdWJ5IENvcmUgVGVhbTESMBAGA1UECxMJUnVieSBUZXN0MRIwEAYDVQQD ++Ewlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANt10EXesd+/ ++caAOsKXmvPQcneUlZ2TFe8vxr8a+mqrqfg/MBa/vQGkGsskTnX7rogbi6n0Hx8eZ ++x/vVuOtjd2IrGBLDU1jQ9cdADAHRJoI0Fgnj3GX03LtdpUFg56l0utdMtqOcxYyJ ++r8vonwX+6v5kJL/n7eP20PzW6/wGghD7AgMBAAEwDQYJKoZIhvcNAQEFBQADgYEA ++hfXTBYuM9EMciPKPsvKTd7c9lcagNLwzatiFXz6GCBDFXMF2o1M83DiYI5fn2iGs ++6E08lnAp//8eSpoXK9sEYrnvq+qnpeh8sdXtMKhseN5RfuOKwqRkqGOivP1DnPNV ++fVTJathTHEtrA6q2GeakT0cAlsVCWYVOw07NQYJTEPg= + -----END CERTIFICATE----- +-- +1.8.5.1 + diff --git a/ruby.spec b/ruby.spec index 1bd690f..486ca5e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -140,6 +140,9 @@ Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # TestGemRemoteFetcher#test_download_to_cache. # http://bugs.ruby-lang.org/issues/9273 Patch18: ruby-2.1.0-resolv.rb-no-encodings.patch +# Backport regenerated certificates for IMAP tests. +# http://bugs.ruby-lang.org/issues/9341 +Patch19: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -404,6 +407,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch12 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -563,10 +567,6 @@ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{r %check DISABLE_TESTS="" -# Ignore IMAP tests due to expired certificate. -# http://bugs.ruby-lang.org/issues/9341 -DISABLE_TESTS="-x test_imap.rb $DISABLE_TESTS" - %ifarch armv7l armv7hl armv7hnl # test_call_double(DL::TestDL) fails on ARM HardFP # http://bugs.ruby-lang.org/issues/6592 From 0f37fb5c2c291a48379a7edb97c53ae991fcb401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Jan 2014 16:21:47 +0100 Subject: [PATCH 366/529] Use %{_rpmconfigdir} for specifying RPM config dir. --- ruby.spec | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ruby.spec b/ruby.spec index 486ca5e..d2fba26 100644 --- a/ruby.spec +++ b/ruby.spec @@ -462,11 +462,11 @@ sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_li # Move macros file insto proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. -mkdir -p %{buildroot}%{_exec_prefix}/lib/rpm/macros.d -install -m 644 %{SOURCE4} %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.ruby -sed -i "s/%%{name}/%{name}/" %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.ruby -install -m 644 %{SOURCE5} %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems -sed -i "s/%%{name}/%{name}/" %{buildroot}%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems +mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d +install -m 644 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby +install -m 644 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems # Kill bundled cert.pem mkdir -p %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ @@ -649,7 +649,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %doc README.EXT %lang(ja) %doc README.EXT.ja -%{_exec_prefix}/lib/rpm/macros.d/macros.ruby +%{_rpmconfigdir}/macros.d/macros.ruby %{_includedir}/* %{_libdir}/libruby.so @@ -846,7 +846,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %exclude %{gem_dir}/specifications/default/test-unit-*.gemspec %files -n rubygems-devel -%{_exec_prefix}/lib/rpm/macros.d/macros.rubygems +%{_rpmconfigdir}/macros.d/macros.rubygems %files -n rubygem-rake %{_bindir}/rake From 02ee7904a419f4434bdef373500f3b14916fed0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 6 Jan 2014 13:48:46 +0100 Subject: [PATCH 367/529] Rebase patches. --- ...o-specify-additional-preludes-by-configuratio.patch | 6 +++--- ruby-2.1.0-Enable-configuration-of-archlibdir.patch | 2 +- ...-duplicated-paths-when-empty-version-string-i.patch | 6 +++--- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 10 +++++----- ruby-2.1.0-resolv.rb-no-encodings.patch | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 55778ef..4487c44 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -13,7 +13,7 @@ diff --git a/Makefile.in b/Makefile.in index 7e8ed82..7916993 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -110,6 +110,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ +@@ -114,6 +114,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ DEFAULT_PRELUDES = $(GEM_PRELUDE) @@ -25,7 +25,7 @@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -110,7 +110,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) +@@ -109,7 +109,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) @@ -38,7 +38,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -3731,6 +3731,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3814,6 +3814,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 668edfa..4b44444 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -2956,6 +2956,11 @@ if test ${multiarch+set}; then +@@ -3044,6 +3044,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 950336c..86d1675 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index 88d24ee..4a300b9 100644 --- a/configure.in +++ b/configure.in -@@ -3608,8 +3608,6 @@ AC_ARG_WITH(rubylibprefix, +@@ -3618,8 +3618,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -22,7 +22,7 @@ index 88d24ee..4a300b9 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3639,6 +3637,7 @@ AC_ARG_WITH(ruby-version, +@@ -3649,6 +3647,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -30,7 +30,7 @@ index 88d24ee..4a300b9 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -3655,30 +3654,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -3665,30 +3664,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" eval $ruby_version elif test -z "${ruby_version}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 10e3d99..b7e2fed 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -3647,6 +3647,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3730,6 +3730,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index b7f6588..3c7272e 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -3621,6 +3621,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3704,6 +3704,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3644,6 +3648,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3727,6 +3731,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -38,7 +38,7 @@ diff --git a/loadpath.c b/loadpath.c index 623dc9d..74c5d9e 100644 --- a/loadpath.c +++ b/loadpath.c -@@ -86,6 +86,10 @@ const char ruby_initial_load_paths[] = +@@ -94,6 +94,10 @@ const char ruby_initial_load_paths[] = #endif #endif @@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"] +@@ -324,6 +324,7 @@ sitelibdir = CONFIG["sitelibdir"] sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -505,7 +506,15 @@ end +@@ -512,7 +513,15 @@ end install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[README* *.txt *.rdoc *.gemspec] diff --git a/ruby-2.1.0-resolv.rb-no-encodings.patch b/ruby-2.1.0-resolv.rb-no-encodings.patch index f1037db..27e91aa 100644 --- a/ruby-2.1.0-resolv.rb-no-encodings.patch +++ b/ruby-2.1.0-resolv.rb-no-encodings.patch @@ -19,7 +19,7 @@ diff --git a/ChangeLog b/ChangeLog index 72eaa6f..93686e9 100644 --- a/ChangeLog +++ b/ChangeLog -@@ -1,6 +1,13 @@ +@@ -67,6 +67,13 @@ install win32.h. [ruby-core:58801][Bug #9199] reported by arton. From 19ff4992f3753a8a614abf5088635b6fbd2464e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 10 Jan 2014 14:53:57 +0100 Subject: [PATCH 368/529] Detect if rubygems are running under rpmbuild. This allows to install binaryi extensions on suitable place and clears the .spec files a bit. --- operating_system.rb | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/operating_system.rb b/operating_system.rb index fba8117..079564f 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -11,6 +11,15 @@ module Gem end private :previous_but_one_dir_to + ## + # Tries to detect, if arguments and environment variables suggest that + # 'gem install' is executed from rpmbuild. + + def rpmbuild? + (ARGV.include?('--install-dir') || ARGV.include?('-i')) && ENV['RPM_PACKAGE_NAME'] + end + private :rpmbuild? + ## # Default gems locations allowed on FHS system (/usr, /usr/share). # The locations are derived from directories specified during build @@ -78,8 +87,16 @@ module Gem end def default_ext_dir_for base_dir - dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} - dirs && File.join(dirs.last[:ext_dir], RbConfig::CONFIG['RUBY_INSTALL_NAME']) + dir = if rpmbuild? + build_dir = base_dir.chomp Gem.default_dirs[:system][:gem_dir] + if build_dir != base_dir + File.join build_dir, Gem.default_dirs[:system][:ext_dir] + end + else + dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} + dirs && dirs.last[:ext_dir] + end + dir && File.join(dir, RbConfig::CONFIG['RUBY_INSTALL_NAME']) end # This method should be available since RubyGems 2.2 until RubyGems 3.0. From 86a8f5cf5aacdfe5700ba763d9391f3dfd0b5db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 10 Jan 2014 15:26:24 +0100 Subject: [PATCH 369/529] Bump the release and add changelog. --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d2fba26..3eff915 100644 --- a/ruby.spec +++ b/ruby.spec @@ -28,7 +28,7 @@ %endif -%global release 17 +%global release 18 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.0 @@ -916,6 +916,10 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Jan 10 2014 V鱈t Ondruch - 2.1.0-18 +- Detect if rubygems are running under rpmbuild and install gem binary + extensions into appropriate place. + * Thu Jan 02 2014 V鱈t Ondruch - 2.1.0-17 - Upgrade to Ruby 2.1.0. - Move RPM macros into /usr/lib/rpm/macros.d directory. From e11dee85448fc7270671c1f1a004739f49a93903 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 10 Jan 2014 16:06:12 +0100 Subject: [PATCH 370/529] Don't generate documentation on unexpected places. --- ruby.spec | 9 +++ ...-Add-BasicSpecification-source_paths.patch | 73 +++++++++++++++++++ ...ource_paths-for-fallback-rdoc-plugin.patch | 26 +++++++ 3 files changed, 108 insertions(+) create mode 100644 rubygems-2.2.1-Add-BasicSpecification-source_paths.patch create mode 100644 rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch diff --git a/ruby.spec b/ruby.spec index 3eff915..ce34984 100644 --- a/ruby.spec +++ b/ruby.spec @@ -143,6 +143,12 @@ Patch18: ruby-2.1.0-resolv.rb-no-encodings.patch # Backport regenerated certificates for IMAP tests. # http://bugs.ruby-lang.org/issues/9341 Patch19: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch +# Fix documentation generated on unexpected places. +# https://github.com/rubygems/rubygems/issues/758 +# https://github.com/rubygems/rubygems/commit/e088c6824209d98eccb0f1e6c7e21f26b4a1178d +Patch20: rubygems-2.2.1-Add-BasicSpecification-source_paths.patch +# https://github.com/rubygems/rubygems/commit/2f03b54b63043aadce9e95b83e98b29712bad21f +Patch21: rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -408,6 +414,8 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 +%patch21 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -917,6 +925,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %changelog * Fri Jan 10 2014 V鱈t Ondruch - 2.1.0-18 +- Don't generate documentation on unexpected places. - Detect if rubygems are running under rpmbuild and install gem binary extensions into appropriate place. diff --git a/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch b/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch new file mode 100644 index 0000000..3cd1bed --- /dev/null +++ b/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch @@ -0,0 +1,73 @@ +From e088c6824209d98eccb0f1e6c7e21f26b4a1178d Mon Sep 17 00:00:00 2001 +From: Eric Hodel +Date: Mon, 6 Jan 2014 14:20:18 -0800 +Subject: [PATCH] Add BasicSpecification#source_paths + +This allows documentation and analysis tools to retrieve paths of source +files in gems. This is needed as the introduction of shared gem +directories means the extension source directory is no longer included +in require_paths (which was meant for $LOAD_PATH, not source code). +--- + lib/rubygems/basic_specification.rb | 18 ++++++++++++++++++ + test/rubygems/test_gem_specification.rb | 16 ++++++++++++++++ + 2 files changed, 34 insertions(+) + +diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb +index a52377f..470a6eb 100644 +--- a/lib/rubygems/basic_specification.rb ++++ b/lib/rubygems/basic_specification.rb +@@ -207,6 +207,24 @@ def require_paths + end + + ## ++ # Returns the paths to the source files for use with analysis and ++ # documentation tools. These paths are relative to full_gem_path. ++ ++ def source_paths ++ paths = raw_require_paths.dup ++ ++ if @extensions then ++ ext_dirs = @extensions.map do |extension| ++ extension.split(File::SEPARATOR, 2).first ++ end.uniq ++ ++ paths.concat ext_dirs ++ end ++ ++ paths.uniq ++ end ++ ++ ## + # Return a Gem::Specification from this gem + + def to_spec +diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb +index 46db0c4..b72a5d1 100644 +--- a/test/rubygems/test_gem_specification.rb ++++ b/test/rubygems/test_gem_specification.rb +@@ -1809,6 +1809,22 @@ def test_source + assert_kind_of Gem::Source::Installed, @a1.source + end + ++ def test_source_paths ++ ext_spec ++ ++ @ext.require_paths = %w[lib ext foo] ++ @ext.extensions << 'bar/baz' ++ ++ expected = %w[ ++ lib ++ ext ++ foo ++ bar ++ ] ++ ++ assert_equal expected, @ext.source_paths ++ end ++ + def test_full_require_paths + ext_spec + +-- +1.8.5.1 + diff --git a/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch b/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch new file mode 100644 index 0000000..edf40f1 --- /dev/null +++ b/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch @@ -0,0 +1,26 @@ +From 2f03b54b63043aadce9e95b83e98b29712bad21f Mon Sep 17 00:00:00 2001 +From: Eric Hodel +Date: Mon, 6 Jan 2014 14:30:07 -0800 +Subject: [PATCH] Use source_paths for fallback rdoc plugin + +Fixes #758 +--- + lib/rubygems/rdoc.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/rubygems/rdoc.rb b/lib/rubygems/rdoc.rb +index 52249dc..633bd89 100644 +--- a/lib/rubygems/rdoc.rb ++++ b/lib/rubygems/rdoc.rb +@@ -193,7 +193,7 @@ def generate + ::RDoc::Parser::C.reset + + args = @spec.rdoc_options +- args.concat @spec.require_paths ++ args.concat @spec.source_paths + args.concat @spec.extra_rdoc_files + + case config_args = Gem.configuration[:rdoc] +-- +1.8.5.1 + From c4c64c841ce1b36e531038f235af66162c14b5a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 15 Jan 2014 10:16:52 +0100 Subject: [PATCH 371/529] Add support for ppc64le arch (rhbz#1053263). --- config.h | 5 +++++ ruby.spec | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.h b/config.h index ce501db..b34e398 100644 --- a/config.h +++ b/config.h @@ -20,7 +20,12 @@ #elif defined(__ia64__) #include "ruby/config-ia64.h" #elif defined(__powerpc64__) +#include +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #include "ruby/config-ppc64.h" +#else +#include "ruby/config-ppc64le.h" +#endif #elif defined(__powerpc__) #include "ruby/config-ppc.h" #elif defined(__s390x__) diff --git a/ruby.spec b/ruby.spec index 9b8460a..421ac13 100644 --- a/ruby.spec +++ b/ruby.spec @@ -893,9 +893,10 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Fri Jan 03 2014 V鱈t Ondruch - 2.0.0.353-17 +* Wed Jan 15 2014 V鱈t Ondruch - 2.0.0.353-17 - Fix RubyGems version (rhbz#1036708). - Fix FTBFS due to expired certificate for IMAP test case. +- Add support for ppc64le arch (rhbz#1053263). * Mon Nov 25 2013 V鱈t Ondruch - 2.0.0.353-16 - Update to Ruby 2.0.0-p353. From 199081935ed74325e7ae917b44a55dc1511d960f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 15 Jan 2014 10:16:52 +0100 Subject: [PATCH 372/529] Add support for ppc64le arch (rhbz#1053263). --- config.h | 5 +++++ ruby.spec | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/config.h b/config.h index ce501db..b34e398 100644 --- a/config.h +++ b/config.h @@ -20,7 +20,12 @@ #elif defined(__ia64__) #include "ruby/config-ia64.h" #elif defined(__powerpc64__) +#include +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #include "ruby/config-ppc64.h" +#else +#include "ruby/config-ppc64le.h" +#endif #elif defined(__powerpc__) #include "ruby/config-ppc.h" #elif defined(__s390x__) diff --git a/ruby.spec b/ruby.spec index ce34984..5436e1f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -924,10 +924,11 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Fri Jan 10 2014 V鱈t Ondruch - 2.1.0-18 +* Wed Jan 15 2014 V鱈t Ondruch - 2.1.0-18 - Don't generate documentation on unexpected places. - Detect if rubygems are running under rpmbuild and install gem binary extensions into appropriate place. +- Add support for ppc64le arch (rhbz#1053263). * Thu Jan 02 2014 V鱈t Ondruch - 2.1.0-17 - Upgrade to Ruby 2.1.0. From 04104b76f38b35a4e2f646cbefe7ed6cf423b468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Feb 2014 08:59:35 +0100 Subject: [PATCH 373/529] "Errno::EINVAL: Invalid argument - recvmsg(2)" works with recent kernel. Tested with Kernel 3.12.8-300.fc20.x86_64. https://bugs.ruby-lang.org/issues/9124 --- ruby.spec | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ruby.spec b/ruby.spec index 5436e1f..ea28606 100644 --- a/ruby.spec +++ b/ruby.spec @@ -611,19 +611,6 @@ sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [: # http://bugs.ruby-lang.org/issues/9259 sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb -# Errno::EINVAL: Invalid argument - recvmsg(2) -# Looks to be a problem of Linux 3.12+ and should be possible to remove as soon -# as Koji builders run fixed kerenel. -# https://bugs.ruby-lang.org/issues/9124 -sed -i '/^ def test_timestampns/,/^ end/ s/^/#/' test/socket/test_socket.rb -sed -i '/^ def test_timestamp/,/^ end/ s/^/#/' test/socket/test_socket.rb -sed -i '/^ def test_udp_server/,/^ end/ s/^/#/' test/socket/test_socket.rb -sed -i '/^ def test_recvmsg_nonblock_error/,/^ end/ s/^/#/' test/socket/test_nonblock.rb -sed -i '/^ def test_fd_passing_n/,/^ end/ s/^/#/' test/socket/test_unix.rb -sed -i '/^ def test_fd_passing_n2/,/^ end/ s/^/#/' test/socket/test_unix.rb -sed -i '/^ def test_recvmsg/,/^ end/ s/^/#/' test/socket/test_unix.rb -sed -i '/^ def test_sendcred_ucred/,/^ end/ s/^/#/' test/socket/test_unix.rb - # Segmentation fault. # https://bugs.ruby-lang.org/issues/9198 sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb @@ -929,6 +916,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" - Detect if rubygems are running under rpmbuild and install gem binary extensions into appropriate place. - Add support for ppc64le arch (rhbz#1053263). +- Re-enable some test cases, which are passing now with Kernel 3.12.8+. * Thu Jan 02 2014 V鱈t Ondruch - 2.1.0-17 - Upgrade to Ruby 2.1.0. From 7347c8fd58b3bc41f59f79faadfb0a17309ebc13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Feb 2014 09:04:54 +0100 Subject: [PATCH 374/529] Re-enabled "TestProcess#{test_clock_getres_constants,test_clock_gettime_constants} The issue was fixed with Kernel 3.12.9-300.fc20.armv7hl. http://bugs.ruby-lang.org/issues/9008 --- ruby.spec | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ruby.spec b/ruby.spec index ea28606..645265f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -597,16 +597,6 @@ touch abrt.rb # http://bugs.ruby-lang.org/issues/8997 sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb -%ifarch armv7l armv7hl armv7hnl -# TestProcess#test_clock_getres_constants and TestProcess#test_clock_gettime_constants fails on ARM. -# http://bugs.ruby-lang.org/issues/9008 -# Kernel issue. Should be fixed in 3.13 kernel. -# https://lkml.org/lkml/2013/10/18/521 -# http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?id=98d6f4dd84a134d942827584a3c5f67ffd8ec35f -sed -i '/Process.constants.grep(\/\\ACLOCK_\/).each {|n|/ s/$/\n next if [:CLOCK_REALTIME_ALARM, :CLOCK_BOOTTIME_ALARM].include? n/' \ - test/ruby/test_process.rb -%endif - # Fix "Could not find 'minitest'" error. # http://bugs.ruby-lang.org/issues/9259 sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb From 9fc3f49bd63fd3521e47ba3f09fb42d372a88e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 6 Feb 2014 10:34:50 +0100 Subject: [PATCH 375/529] Backport fix for floating point issues on i686. --- ruby-2.2.0-configure.in-use-SSE2.patch | 49 ++++++++++++++++++++++++++ ruby.spec | 12 +++---- 2 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 ruby-2.2.0-configure.in-use-SSE2.patch diff --git a/ruby-2.2.0-configure.in-use-SSE2.patch b/ruby-2.2.0-configure.in-use-SSE2.patch new file mode 100644 index 0000000..87858ce --- /dev/null +++ b/ruby-2.2.0-configure.in-use-SSE2.patch @@ -0,0 +1,49 @@ +From 40967a5c0b975f3f3ec1538a820985aa61b65b8f Mon Sep 17 00:00:00 2001 +From: nobu +Date: Thu, 9 Jan 2014 11:46:26 +0000 +Subject: [PATCH] configure.in: use SSE2 + +* configure.in: use SSE2 instructions to drop unexpected precisions on + other than mingw. [ruby-core:59472] [Bug #8358] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 5 +++++ + configure.in | 8 ++++++++- + 2 files changed, 13 insertions(+), 0 deletion(-) + +diff --git a/ChangeLog b/ChangeLog +index 7ec6eec..9ba337f 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++Thu Jan 9 20:46:22 2014 Nobuyoshi Nakada ++ ++ * configure.in: use SSE2 instructions to drop unexpected precisions on ++ other than mingw. [ruby-core:59472] [Bug #8358] ++ + Fri Jan 3 10:43:57 2014 Aman Gupta + + * test/net/imap/cacert.pem: generate new CA cert, since the last one +diff --git a/configure.in b/configure.in +index f9e9431..9c95cc4 100644 +--- a/configure.in ++++ b/configure.in +@@ -858,6 +857,14 @@ if test "$GCC" = yes; then + for oflag in -fno-fast-math; do + RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)]) + done ++ AS_CASE(["$target"], ++ [*-darwin*], [ ++ # doesn't seem necessary on Mac OS X ++ ], ++ [[i[4-6]86*]], [ ++ RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse)]) ++ ] ++ ) + fi + + AC_ARG_WITH(opt-dir, +-- +1.8.5.1 + diff --git a/ruby.spec b/ruby.spec index 645265f..6a4e404 100644 --- a/ruby.spec +++ b/ruby.spec @@ -149,6 +149,9 @@ Patch19: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch Patch20: rubygems-2.2.1-Add-BasicSpecification-source_paths.patch # https://github.com/rubygems/rubygems/commit/2f03b54b63043aadce9e95b83e98b29712bad21f Patch21: rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch +# TestSprintf#test_float fails on i686 +# http://bugs.ruby-lang.org/issues/8358 +Patch22: ruby-2.2.0-configure.in-use-SSE2.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -416,6 +419,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -581,13 +585,6 @@ DISABLE_TESTS="" DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" %endif -%ifarch i686 -# TestSprintf#test_float fails on i686 -# http://bugs.ruby-lang.org/issues/8358 -sed -i "/assert_equal(\"0x1p+2\", sprintf('%.0a', Float('0x1.fp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb -sed -i "/assert_equal(\"-0x1.0p+2\", sprintf('%.1a', Float('-0x1.ffp+1')), \"\[ruby-dev:42551\]\")/ s/^/#/" test/ruby/test_sprintf.rb -%endif - # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). @@ -907,6 +904,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" extensions into appropriate place. - Add support for ppc64le arch (rhbz#1053263). - Re-enable some test cases, which are passing now with Kernel 3.12.8+. +- Backport fix for floating point issues on i686. * Thu Jan 02 2014 V鱈t Ondruch - 2.1.0-17 - Upgrade to Ruby 2.1.0. From bbb52ff9a696a2e39dccafb0e5765d1ff3549aca Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Mon, 10 Feb 2014 14:13:33 +0100 Subject: [PATCH 376/529] Don't link cert.pem explicitely --- ruby.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ruby.spec b/ruby.spec index 421ac13..c1abd20 100644 --- a/ruby.spec +++ b/ruby.spec @@ -26,7 +26,7 @@ %endif -%global release 17 +%global release 18 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.0.14 @@ -179,8 +179,6 @@ BuildRequires: tk-devel # Needed to pass test_set_program_name(TestRubyOptions) BuildRequires: procps BuildRequires: %{_bindir}/dtrace -# Unbundle cert.pem -BuildRequires: ca-certificates # This package provides %%{_bindir}/ruby-mri therefore it is marked by this # virtual provide. It can be installed as dependency of rubypick. @@ -223,7 +221,6 @@ Requires: ruby(release) Requires: rubygem(rdoc) >= %{rdoc_version} Requires: rubygem(io-console) >= %{io_console_version} Requires: rubygem(psych) >= %{psych_version} -Requires: ca-certificates Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} BuildArch: noarch @@ -488,11 +485,6 @@ sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.ruby install -m 644 %{SOURCE5} %{buildroot}%{_sysconfdir}/rpm/macros.rubygems sed -i "s/%%{name}/%{name}/" %{buildroot}%{_sysconfdir}/rpm/macros.rubygems -# Kill bundled cert.pem -mkdir -p %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ -ln -sf %{_sysconfdir}/pki/tls/cert.pem \ - %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ca-bundle.pem - # Install custom operating_system.rb. mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults @@ -893,6 +885,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Feb 10 2014 Josef Stribny - 2.0.0.353-18 +- Don't link cert.pem explicitely + * Wed Jan 15 2014 V鱈t Ondruch - 2.0.0.353-17 - Fix RubyGems version (rhbz#1036708). - Fix FTBFS due to expired certificate for IMAP test case. From b038223eae017fc71e3b2e1cc1221a7308bfdeba Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Mon, 10 Feb 2014 14:17:53 +0100 Subject: [PATCH 377/529] Don't link cert.pem explicitely --- ruby.spec | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/ruby.spec b/ruby.spec index 6a4e404..86359f7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -28,7 +28,7 @@ %endif -%global release 18 +%global release 19 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.0 @@ -172,8 +172,6 @@ BuildRequires: tk-devel # Needed to pass test_set_program_name(TestRubyOptions) BuildRequires: procps BuildRequires: %{_bindir}/dtrace -# Unbundle cert.pem -BuildRequires: ca-certificates # RubyGems test suite optional dependencies. BuildRequires: %{_bindir}/git BuildRequires: %{_bindir}/cmake @@ -219,7 +217,6 @@ Requires: ruby(release) Requires: rubygem(rdoc) >= %{rdoc_version} Requires: rubygem(io-console) >= %{io_console_version} Requires: rubygem(psych) >= %{psych_version} -Requires: ca-certificates Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} BuildArch: noarch @@ -480,11 +477,6 @@ sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby install -m 644 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems -# Kill bundled cert.pem -mkdir -p %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ -ln -sf %{_sysconfdir}/pki/tls/cert.pem \ - %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ca-bundle.pem - # Install custom operating_system.rb. mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults @@ -898,6 +890,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Feb 10 2014 Josef Stribny - 2.1.0-19 +- Don't link cert.pem explicitely + * Wed Jan 15 2014 V鱈t Ondruch - 2.1.0-18 - Don't generate documentation on unexpected places. - Detect if rubygems are running under rpmbuild and install gem binary From 724ffdbb53749eb752ed8d30bc663e48a0738948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 3 Mar 2014 17:49:42 +0100 Subject: [PATCH 378/529] Add RPM dependency generators for RubyGems. --- ruby.spec | 16 ++++++++++ rubygems.attr | 3 ++ rubygems.prov | 36 +++++++++++++++++++++++ rubygems.req | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 136 insertions(+) create mode 100644 rubygems.attr create mode 100644 rubygems.prov create mode 100644 rubygems.req diff --git a/ruby.spec b/ruby.spec index 86359f7..f157de9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -82,6 +82,10 @@ Source6: abrt_prelude.rb # https://fedorahosted.org/fpc/ticket/312 # https://bugzilla.redhat.com/show_bug.cgi?id=977941 Source7: config.h +# RPM dependency generators. +Source8: rubygems.attr +Source9: rubygems.req +Source10: rubygems.prov # Include the constants defined in macros files. @@ -477,6 +481,12 @@ sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby install -m 644 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems +# Install dependency generators. +mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs +install -m 644 %{SOURCE8} %{buildroot}%{_rpmconfigdir}/fileattrs +install -m 755 %{SOURCE9} %{buildroot}%{_rpmconfigdir} +install -m 755 %{SOURCE10} %{buildroot}%{_rpmconfigdir} + # Install custom operating_system.rb. mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults @@ -821,6 +831,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %files -n rubygems-devel %{_rpmconfigdir}/macros.d/macros.rubygems +%{_rpmconfigdir}/fileattrs/rubygems.attr +%{_rpmconfigdir}/rubygems.req +%{_rpmconfigdir}/rubygems.prov %files -n rubygem-rake %{_bindir}/rake @@ -890,6 +903,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Mar 03 2014 V鱈t Ondruch - 2.1.0-19 +- Add RPM dependency generators for RubyGems. + * Mon Feb 10 2014 Josef Stribny - 2.1.0-19 - Don't link cert.pem explicitely diff --git a/rubygems.attr b/rubygems.attr new file mode 100644 index 0000000..f711775 --- /dev/null +++ b/rubygems.attr @@ -0,0 +1,3 @@ +%__rubygems_requires %{_rpmconfigdir}/rubygems.req +%__rubygems_provides %{_rpmconfigdir}/rubygems.prov +%__rubygems_path ^%{gem_spec}$ diff --git a/rubygems.prov b/rubygems.prov new file mode 100644 index 0000000..f23ec3f --- /dev/null +++ b/rubygems.prov @@ -0,0 +1,36 @@ +#!/usr/bin/ruby + +require 'rubygems/package' + +module RubyGemsProv + module Helpers + # If there is some prelease version files, such as rc1 (i.e. non-numeric + # field), prepend this field by tilde instead of dot. + def self.normalize_prerelease(version) + if version.prerelease? + prerelease = version.version.sub /^#{version.release}\./, '' + "#{version.release}~#{prerelease}" + else + version.release + end + end + end + + # Reports all functionality gem provides. + def self.provides + while filename = gets + filename.strip! + begin + specification = Gem::Specification.load filename + + puts "rubygem(#{specification.name}) = #{Helpers::normalize_prerelease(specification.version)}" + rescue => e + # Ignore all errors. + end + end + end +end + +if __FILE__ == $0 + RubyGemsProv::provides +end diff --git a/rubygems.req b/rubygems.req new file mode 100644 index 0000000..831d7af --- /dev/null +++ b/rubygems.req @@ -0,0 +1,81 @@ +#!/usr/bin/ruby + +require 'rubygems/package' + +module RubyGemsReq + module Helpers + # Expands '~>' and '!=' gem requirements. + def self.expand_requirement(requirements) + requirements.inject([]) do |output, r| + output.concat case r.first + when '~>' + expand_pessimistic_requirement(r) + when '!=' + expand_not_equal_requirement(r) + else + [r] + end + end + end + + # Expands the pessimistic version operator '~>' into equivalent '>=' and + # '<' pair. + def self.expand_pessimistic_requirement(requirement) + next_version = Gem::Version.create(requirement.last).bump + return ['>=', requirement.last], ['<', next_version] + end + + # Expands the not equal version operator '!=' into equivalent '<' and + # '>' pair. + def self.expand_not_equal_requirement(requirement) + return ['<', requirement.last], ['>', requirement.last] + end + + # Converts Gem::Requirement into array of requirements strings compatible + # with RPM .spec file. + def self.requirement_versions_to_rpm(requirement) + self.expand_requirement(requirement.requirements).map do |op, version| + version == Gem::Version.new(0) ? "" : "#{op} #{version}" + end + end + end + + # Report RubyGems dependency, versioned if required. + def self.rubygems_dependency(specification) + Helpers::requirement_versions_to_rpm(specification.required_rubygems_version).each do |requirement| + dependency_string = "ruby(rubygems)" + dependency_strint += " #{specification.required_rubygems_version}" if requirement && requirement.length > 0 + puts dependency_string + end + end + + # Report all gem dependencies including their version. + def self.gem_depenencies(specification) + specification.runtime_dependencies.each do |dependency| + Helpers::requirement_versions_to_rpm(dependency.requirement).each do |requirement| + dependency_string = "rubygem(#{dependency.name})" + dependency_string += " #{requirement}" if requirement && requirement.length > 0 + puts dependency_string + end + end + end + + # Reports all requirements specified by all provided .gemspec files. + def self.requires + while filename = gets + filename.strip! + begin + specification = Gem::Specification.load filename + + rubygems_dependency(specification) + gem_depenencies(specification) + rescue => e + # Ignore all errors. + end + end + end +end + +if __FILE__ == $0 + RubyGemsReq::requires +end From df08120417d5cf499448bcc02ced3a1034fbb859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 5 Mar 2014 15:30:45 +0100 Subject: [PATCH 379/529] Update to Ruby 2.1.1. --- ...-additional-preludes-by-configuratio.patch | 2 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 6 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ruby-2.1.0-resolv.rb-no-encodings.patch | 143 ---------- ...x-test-failures-due-to-expired-certs.patch | 259 ------------------ ruby-2.2.0-configure.in-use-SSE2.patch | 49 ---- ruby.spec | 36 +-- ...-Add-BasicSpecification-source_paths.patch | 73 ----- ...ource_paths-for-fallback-rdoc-plugin.patch | 26 -- 11 files changed, 17 insertions(+), 585 deletions(-) delete mode 100644 ruby-2.1.0-resolv.rb-no-encodings.patch delete mode 100644 ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch delete mode 100644 ruby-2.2.0-configure.in-use-SSE2.patch delete mode 100644 rubygems-2.2.1-Add-BasicSpecification-source_paths.patch delete mode 100644 rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 4487c44..e297a73 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -38,7 +38,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -3814,6 +3814,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3841,6 +3841,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 4b44444..90a97d7 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3044,6 +3044,11 @@ if test ${multiarch+set}; then +@@ -3071,6 +3071,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 86d1675..da88a97 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -13,7 +13,7 @@ diff --git a/configure.in b/configure.in index 88d24ee..4a300b9 100644 --- a/configure.in +++ b/configure.in -@@ -3618,8 +3618,6 @@ AS_CASE(["$target_os"], +@@ -3645,8 +3645,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -22,7 +22,7 @@ index 88d24ee..4a300b9 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3649,6 +3647,7 @@ AC_ARG_WITH(ruby-version, +@@ -3676,6 +3676,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -30,7 +30,7 @@ index 88d24ee..4a300b9 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -3665,30 +3664,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -3692,30 +3691,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" eval $ruby_version elif test -z "${ruby_version}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index b7e2fed..88eff60 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -3730,6 +3730,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3757,6 +3757,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 3c7272e..e0e488b 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -3704,6 +3704,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3731,6 +3731,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3727,6 +3731,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3754,6 +3754,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.1.0-resolv.rb-no-encodings.patch b/ruby-2.1.0-resolv.rb-no-encodings.patch deleted file mode 100644 index 27e91aa..0000000 --- a/ruby-2.1.0-resolv.rb-no-encodings.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 1ffbe07e179a2e047d24c7091f6ff013195b1a93 Mon Sep 17 00:00:00 2001 -From: nobu -Date: Sat, 21 Dec 2013 03:37:26 +0000 -Subject: [PATCH] resolv.rb: no encodings - -* lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not - consider encodings in hosts file. [ruby-core:59239] [Bug #9273] -* lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 7 +++++++ - lib/resolv.rb | 4 ++-- - test/resolv/test_addr.rb | 12 ++++++++++++ - test/resolv/test_dns.rb | 13 +++++++++++++ - 4 files changed, 34 insertions(+), 2 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 72eaa6f..93686e9 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -67,6 +67,13 @@ - install win32.h. - [ruby-core:58801][Bug #9199] reported by arton. - -+Sat Dec 21 12:37:19 2013 Nobuyoshi Nakada -+ -+ * lib/resolv.rb (Resolv::Hosts#lazy_initialize): should not -+ consider encodings in hosts file. [ruby-core:59239] [Bug #9273] -+ -+ * lib/resolv.rb (Resolv::Config.parse_resolv_conf): ditto. -+ - Fri Dec 20 17:52:50 2013 Koichi Sasada - - * vm_method.c: check definition of -diff --git a/lib/resolv.rb b/lib/resolv.rb -index 6d34a67..0c2b68e 100644 ---- a/lib/resolv.rb -+++ b/lib/resolv.rb -@@ -187,7 +187,7 @@ class Resolv - unless @initialized - @name2addr = {} - @addr2name = {} -- open(@filename) {|f| -+ open(@filename, 'rb') {|f| - f.each {|line| - line.sub!(/#.*/, '') - addr, hostname, *aliases = line.split(/\s+/) -@@ -920,7 +920,7 @@ class Resolv - nameserver = [] - search = nil - ndots = 1 -- open(filename) {|f| -+ open(filename, 'rb') {|f| - f.each {|line| - line.sub!(/[#;].*/, '') - keyword, *args = line.split(/\s+/) -diff --git a/test/resolv/test_addr.rb b/test/resolv/test_addr.rb -index 84bc8c2..d4728e1 100644 ---- a/test/resolv/test_addr.rb -+++ b/test/resolv/test_addr.rb -@@ -13,4 +13,16 @@ class TestResolvAddr < Test::Unit::TestCase - end - } - end -+ -+ def test_invalid_byte_comment -+ bug9273 = '[ruby-core:59239] [Bug #9273]' -+ Tempfile.open('resolv_test_addr_') do |tmpfile| -+ tmpfile.print("\xff\x00\x40") -+ tmpfile.close -+ hosts = Resolv::Hosts.new(tmpfile.path) -+ assert_nothing_raised(ArgumentError, bug9273) do -+ hosts.each_address("") {break} -+ end -+ end -+ end - end -diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb -index 0d9565e..e3e38ef 100644 ---- a/test/resolv/test_dns.rb -+++ b/test/resolv/test_dns.rb -@@ -1,6 +1,7 @@ - require 'test/unit' - require 'resolv' - require 'socket' -+require 'tempfile' - - class TestResolvDNS < Test::Unit::TestCase - def setup -@@ -150,4 +151,16 @@ class TestResolvDNS < Test::Unit::TestCase - } - end - -+ def test_invalid_byte_comment -+ bug9273 = '[ruby-core:59239] [Bug #9273]' -+ Tempfile.open('resolv_test_dns_') do |tmpfile| -+ tmpfile.print("\xff\x00\x40") -+ tmpfile.close -+ Resolv::DNS.open(tmpfile.path) do |dns| -+ assert_nothing_raised(ArgumentError, bug9273) do -+ dns.getresources("foo.example.org", Resolv::DNS::Resource::IN::A) -+ end -+ end -+ end -+ end - end --- -1.8.4.2 - -From 1ef0a76c6c6556bf6ab155e2ad28a23748ee59ef Mon Sep 17 00:00:00 2001 -From: nobu -Date: Sat, 21 Dec 2013 07:18:18 +0000 -Subject: [PATCH] test_dns.rb: no server access - -* test/resolv/test_dns.rb (test_invalid_byte_comment): get rid of - actual server access. [Bug #9273] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44318 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/resolv/test_dns.rb | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/test/resolv/test_dns.rb b/test/resolv/test_dns.rb -index e3e38ef..07396fb 100644 ---- a/test/resolv/test_dns.rb -+++ b/test/resolv/test_dns.rb -@@ -156,10 +156,8 @@ class TestResolvDNS < Test::Unit::TestCase - Tempfile.open('resolv_test_dns_') do |tmpfile| - tmpfile.print("\xff\x00\x40") - tmpfile.close -- Resolv::DNS.open(tmpfile.path) do |dns| -- assert_nothing_raised(ArgumentError, bug9273) do -- dns.getresources("foo.example.org", Resolv::DNS::Resource::IN::A) -- end -+ assert_nothing_raised(ArgumentError, bug9273) do -+ Resolv::DNS::Config.parse_resolv_conf(tmpfile.path) - end - end - end --- -1.8.4.2 - diff --git a/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch b/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch deleted file mode 100644 index f9fa197..0000000 --- a/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch +++ /dev/null @@ -1,259 +0,0 @@ -From 5ac7c395c19426a9a92f0a918b03e0f493af6e2c Mon Sep 17 00:00:00 2001 -From: tmm1 -Date: Fri, 3 Jan 2014 01:46:55 +0000 -Subject: [PATCH] test/net/imap/test_imap.rb: fix test failures due to expired - certs - -* test/net/imap/cacert.pem: generate new CA cert, since the last one - expired. [Bug #9341] [ruby-core:59459] -* test/net/imap/server.crt: new server cert signed with updated CA. -* test/net/imap/Makefile: add `make regen_certs` to automate this - process. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 8 +++++ - test/net/imap/Makefile | 15 +++++++++ - test/net/imap/cacert.pem | 84 ++++++++++++++++++++++++++---------------------- - test/net/imap/server.crt | 65 +++++++++++++++---------------------- - 4 files changed, 94 insertions(+), 78 deletions(-) - create mode 100644 test/net/imap/Makefile - -diff --git a/ChangeLog b/ChangeLog -index a4f20cd..d6a7148 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,11 @@ -+Fri Jan 3 10:43:57 2014 Aman Gupta -+ -+ * test/net/imap/cacert.pem: generate new CA cert, since the last one -+ expired. [Bug #9341] [ruby-core:59459] -+ * test/net/imap/server.crt: new server cert signed with updated CA. -+ * test/net/imap/Makefile: add `make regen_certs` to automate this -+ process. -+ - Wed Dec 25 16:58:31 2013 Nobuyoshi Nakada - - * proc.c (rb_mod_define_method): consider visibility only if self -diff --git a/test/net/imap/Makefile b/test/net/imap/Makefile -new file mode 100644 -index 0000000..b2bc9c7 ---- /dev/null -+++ b/test/net/imap/Makefile -@@ -0,0 +1,15 @@ -+all: -+ -+regen_certs: -+ touch server.key -+ make server.crt -+ -+cacert.pem: server.key -+ openssl req -new -x509 -days 1825 -key server.key -out cacert.pem -text -subj "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org" -+ -+server.csr: -+ openssl req -new -key server.key -out server.csr -text -subj "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost" -+ -+server.crt: server.csr cacert.pem -+ openssl x509 -days 1825 -CA cacert.pem -CAkey server.key -set_serial 00 -in server.csr -req -text -out server.crt -+ rm server.csr -diff --git a/test/net/imap/cacert.pem b/test/net/imap/cacert.pem -index bd7e68a..7073387 100644 ---- a/test/net/imap/cacert.pem -+++ b/test/net/imap/cacert.pem -@@ -2,59 +2,65 @@ Certificate: - Data: - Version: 3 (0x2) - Serial Number: -- 9f:dc:f7:94:98:05:43:4c -+ b9:90:a2:bf:62:69:17:9c - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org - Validity -- Not Before: Dec 23 10:21:33 2010 GMT -- Not After : Jan 1 10:21:33 2014 GMT -+ Not Before: Jan 3 01:34:17 2014 GMT -+ Not After : Jan 2 01:34:17 2019 GMT - Subject: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org - Subject Public Key Info: - Public Key Algorithm: rsaEncryption -- Public-Key: (1024 bit) -- Modulus: -- 00:ce:be:2c:9f:47:ba:db:9c:9c:5b:f0:38:3b:f3: -- 74:20:37:76:23:9f:84:1c:81:90:b4:3e:00:20:34: -- 98:7e:81:69:50:a1:c3:65:96:ea:fa:00:da:8c:cc: -- 53:3f:ba:3c:d0:50:7a:5a:b4:6b:ac:d3:2e:18:ca: -- 2a:69:b3:6a:6f:38:c2:32:a8:06:b6:0a:30:a9:ee: -- 03:38:e9:05:a5:19:23:54:a8:3c:b9:08:ad:2b:72: -- 23:df:93:22:c4:46:a8:ea:f1:a6:e9:30:4a:3f:83: -- 39:e9:62:8e:8b:a3:5e:67:89:1d:7c:75:de:05:aa: -- 58:b1:b7:79:7c:10:80:6d:87 -+ RSA Public Key: (1024 bit) -+ Modulus (1024 bit): -+ 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: -+ bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: -+ 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: -+ 9d:7e:eb:a2:06:e2:ea:7d:07:c7:c7:99:c7:fb:d5: -+ b8:eb:63:77:62:2b:18:12:c3:53:58:d0:f5:c7:40: -+ 0c:01:d1:26:82:34:16:09:e3:dc:65:f4:dc:bb:5d: -+ a5:41:60:e7:a9:74:ba:d7:4c:b6:a3:9c:c5:8c:89: -+ af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: -+ d0:fc:d6:eb:fc:06:82:10:fb - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: -- 41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A -+ E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 - X509v3 Authority Key Identifier: -- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A -+ keyid:E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 -+ DirName:/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org -+ serial:B9:90:A2:BF:62:69:17:9C - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption -- 86:00:33:b9:dd:ff:5f:83:59:5f:c3:29:3c:d7:11:db:10:b3: -- d7:d1:70:fb:0a:c6:74:85:c6:ea:e1:15:c4:92:f8:0e:11:cc: -- ff:a6:3c:31:c2:2c:66:d8:fe:63:93:9f:b0:97:e6:f5:bc:5c: -- 80:68:96:5d:eb:77:b9:23:dd:68:a7:49:03:ff:22:48:55:f1: -- 39:7c:20:21:ff:64:52:e1:f6:cf:3c:b3:4d:2c:5c:03:62:ea: -- c5:49:99:07:fa:8d:ff:7b:c2:75:0c:ca:24:b5:0b:f5:b7:57: -- 3a:10:f0:8a:bb:9a:e8:92:4d:d5:6f:c2:a2:29:36:61:78:a4: -- dc:7b -+ 8f:77:06:4e:31:72:12:ee:68:09:70:27:d4:31:85:ef:10:95: -+ f9:0f:2b:66:63:08:37:88:6e:b7:9b:40:3e:18:77:33:86:e8: -+ 61:6a:b7:3c:cb:c7:a6:d6:d5:92:6a:1f:56:d0:9f:5c:32:56: -+ d3:37:52:fe:0e:20:c2:7a:0d:fe:2d:3c:81:da:b8:7f:4d:6a: -+ 08:01:d9:be:7a:a2:15:be:a6:ce:49:64:90:8c:9a:ca:6e:2e: -+ 84:48:1d:94:19:56:94:46:aa:25:9b:68:c2:80:60:bf:cb:2e: -+ 35:03:ea:0a:65:5a:33:38:c6:cc:81:46:c0:bc:36:86:96:39: -+ 10:7d - -----BEGIN CERTIFICATE----- --MIIC6DCCAlGgAwIBAgIJAJ/c95SYBUNMMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD --VQQGEwJKUDEQMA4GA1UECAwHU2hpbWFuZTEUMBIGA1UEBwwLTWF0ei1lIGNpdHkx --FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDDAxSdWJ5IFRlc3QgQ0Ex --JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTAxMjIz --MTAyMTMzWhcNMTQwMTAxMTAyMTMzWjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgM --B1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQKDA5SdWJ5IENv --cmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz -+MIIDjTCCAvagAwIBAgIJALmQor9iaRecMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD -+VQQGEwJKUDEQMA4GA1UECBMHU2hpbWFuZTEUMBIGA1UEBxMLTWF0ei1lIGNpdHkx -+FzAVBgNVBAoTDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDEwxSdWJ5IFRlc3QgQ0Ex -+JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTQwMTAz -+MDEzNDE3WhcNMTkwMTAyMDEzNDE3WjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT -+B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv -+cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz - ZWN1cml0eUBydWJ5LWxhbmcub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB --gQDOviyfR7rbnJxb8Dg783QgN3Yjn4QcgZC0PgAgNJh+gWlQocNllur6ANqMzFM/ --ujzQUHpatGus0y4Yyipps2pvOMIyqAa2CjCp7gM46QWlGSNUqDy5CK0rciPfkyLE --Rqjq8abpMEo/gznpYo6Lo15niR18dd4Fqlixt3l8EIBthwIDAQABo1AwTjAdBgNV --HQ4EFgQUQclJN7H6YeO61xk92dqMuYLJtGowHwYDVR0jBBgwFoAUQclJN7H6YeO6 --1xk92dqMuYLJtGowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCGADO5 --3f9fg1lfwyk81xHbELPX0XD7CsZ0hcbq4RXEkvgOEcz/pjwxwixm2P5jk5+wl+b1 --vFyAaJZd63e5I91op0kD/yJIVfE5fCAh/2RS4fbPPLNNLFwDYurFSZkH+o3/e8J1 --DMoktQv1t1c6EPCKu5rokk3Vb8KiKTZheKTcew== -+gQDbddBF3rHfv3GgDrCl5rz0HJ3lJWdkxXvL8a/Gvpqq6n4PzAWv70BpBrLJE51+ -+66IG4up9B8fHmcf71bjrY3diKxgSw1NY0PXHQAwB0SaCNBYJ49xl9Ny7XaVBYOep -+dLrXTLajnMWMia/L6J8F/ur+ZCS/5+3j9tD81uv8BoIQ+wIDAQABo4H0MIHxMB0G -+A1UdDgQWBBToflisE3sDIo2erzILhImAgAwewjCBwQYDVR0jBIG5MIG2gBToflis -+E3sDIo2erzILhImAgAwewqGBkqSBjzCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT -+B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv -+cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz -+ZWN1cml0eUBydWJ5LWxhbmcub3JnggkAuZCiv2JpF5wwDAYDVR0TBAUwAwEB/zAN -+BgkqhkiG9w0BAQUFAAOBgQCPdwZOMXIS7mgJcCfUMYXvEJX5DytmYwg3iG63m0A+ -+GHczhuhharc8y8em1tWSah9W0J9cMlbTN1L+DiDCeg3+LTyB2rh/TWoIAdm+eqIV -+vqbOSWSQjJrKbi6ESB2UGVaURqolm2jCgGC/yy41A+oKZVozOMbMgUbAvDaGljkQ -+fQ== - -----END CERTIFICATE----- -diff --git a/test/net/imap/server.crt b/test/net/imap/server.crt -index d848b26..fa4f994 100644 ---- a/test/net/imap/server.crt -+++ b/test/net/imap/server.crt -@@ -1,17 +1,17 @@ - Certificate: - Data: -- Version: 3 (0x2) -+ Version: 1 (0x0) - Serial Number: 0 (0x0) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org - Validity -- Not Before: Dec 23 10:23:52 2010 GMT -- Not After : Jan 1 10:23:52 2014 GMT -+ Not Before: Jan 3 01:34:17 2014 GMT -+ Not After : Jan 2 01:34:17 2019 GMT - Subject: C=JP, ST=Shimane, O=Ruby Core Team, OU=Ruby Test, CN=localhost - Subject Public Key Info: - Public Key Algorithm: rsaEncryption -- Public-Key: (1024 bit) -- Modulus: -+ RSA Public Key: (1024 bit) -+ Modulus (1024 bit): - 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: - bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: - 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: -@@ -22,40 +22,27 @@ Certificate: - af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: - d0:fc:d6:eb:fc:06:82:10:fb - Exponent: 65537 (0x10001) -- X509v3 extensions: -- X509v3 Basic Constraints: -- CA:FALSE -- Netscape Comment: -- OpenSSL Generated Certificate -- X509v3 Subject Key Identifier: -- E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 -- X509v3 Authority Key Identifier: -- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A -- - Signature Algorithm: sha1WithRSAEncryption -- ae:ee:cd:fe:c9:af:48:0b:50:37:ac:6a:f6:68:90:9b:67:df: -- 6f:2d:17:c9:3c:a5:da:ad:39:dc:2a:5b:07:88:26:38:19:30: -- d6:95:cf:10:69:c7:92:14:83:be:f1:b5:8e:6f:d9:91:51:c5: -- 63:ae:1c:89:ac:27:bf:4f:2a:8f:4e:0c:57:42:0a:c9:8e:0c: -- f4:f3:02:f7:ea:44:b6:e4:47:05:af:4e:74:e4:87:87:d9:c8: -- 76:ed:ab:32:7c:f0:31:34:10:14:bc:a6:37:cd:d7:dc:33:da: -- 82:d3:d4:9b:e9:d5:cd:38:cc:fa:81:5f:4e:fd:5f:53:05:5d: -- 76:f9 -+ 85:f5:d3:05:8b:8c:f4:43:1c:88:f2:8f:b2:f2:93:77:b7:3d: -+ 95:c6:a0:34:bc:33:6a:d8:85:5f:3e:86:08:10:c5:5c:c1:76: -+ a3:53:3c:dc:38:98:23:97:e7:da:21:ac:e8:4d:3c:96:70:29: -+ ff:ff:1e:4a:9a:17:2b:db:04:62:b9:ef:ab:ea:a7:a5:e8:7c: -+ b1:d5:ed:30:a8:6c:78:de:51:7e:e3:8a:c2:a4:64:a8:63:a2: -+ bc:fd:43:9c:f3:55:7d:54:c9:6a:d8:53:1c:4b:6b:03:aa:b6: -+ 19:e6:a4:4f:47:00:96:c5:42:59:85:4e:c3:4e:cd:41:82:53: -+ 10:f8 - -----BEGIN CERTIFICATE----- --MIIC3jCCAkegAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjDELMAkGA1UEBhMCSlAx --EDAOBgNVBAgMB1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQK --DA5SdWJ5IENvcmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZI --hvcNAQkBFhZzZWN1cml0eUBydWJ5LWxhbmcub3JnMB4XDTEwMTIyMzEwMjM1MloX --DTE0MDEwMTEwMjM1MlowYDELMAkGA1UEBhMCSlAxEDAOBgNVBAgMB1NoaW1hbmUx --FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRIwEAYDVQQLDAlSdWJ5IFRlc3QxEjAQ --BgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA23XQ --Rd6x379xoA6wpea89Byd5SVnZMV7y/Gvxr6aqup+D8wFr+9AaQayyROdfuuiBuLq --fQfHx5nH+9W462N3YisYEsNTWND1x0AMAdEmgjQWCePcZfTcu12lQWDnqXS610y2 --o5zFjImvy+ifBf7q/mQkv+ft4/bQ/Nbr/AaCEPsCAwEAAaN7MHkwCQYDVR0TBAIw --ADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUw --HQYDVR0OBBYEFOh+WKwTewMijZ6vMguEiYCADB7CMB8GA1UdIwQYMBaAFEHJSTex --+mHjutcZPdnajLmCybRqMA0GCSqGSIb3DQEBBQUAA4GBAK7uzf7Jr0gLUDesavZo --kJtn328tF8k8pdqtOdwqWweIJjgZMNaVzxBpx5IUg77xtY5v2ZFRxWOuHImsJ79P --Ko9ODFdCCsmODPTzAvfqRLbkRwWvTnTkh4fZyHbtqzJ88DE0EBS8pjfN19wz2oLT --1Jvp1c04zPqBX079X1MFXXb5 -+MIICXDCCAcUCAQAwDQYJKoZIhvcNAQEFBQAwgYwxCzAJBgNVBAYTAkpQMRAwDgYD -+VQQIEwdTaGltYW5lMRQwEgYDVQQHEwtNYXR6LWUgY2l0eTEXMBUGA1UEChMOUnVi -+eSBDb3JlIFRlYW0xFTATBgNVBAMTDFJ1YnkgVGVzdCBDQTElMCMGCSqGSIb3DQEJ -+ARYWc2VjdXJpdHlAcnVieS1sYW5nLm9yZzAeFw0xNDAxMDMwMTM0MTdaFw0xOTAx -+MDIwMTM0MTdaMGAxCzAJBgNVBAYTAkpQMRAwDgYDVQQIEwdTaGltYW5lMRcwFQYD -+VQQKEw5SdWJ5IENvcmUgVGVhbTESMBAGA1UECxMJUnVieSBUZXN0MRIwEAYDVQQD -+Ewlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANt10EXesd+/ -+caAOsKXmvPQcneUlZ2TFe8vxr8a+mqrqfg/MBa/vQGkGsskTnX7rogbi6n0Hx8eZ -+x/vVuOtjd2IrGBLDU1jQ9cdADAHRJoI0Fgnj3GX03LtdpUFg56l0utdMtqOcxYyJ -+r8vonwX+6v5kJL/n7eP20PzW6/wGghD7AgMBAAEwDQYJKoZIhvcNAQEFBQADgYEA -+hfXTBYuM9EMciPKPsvKTd7c9lcagNLwzatiFXz6GCBDFXMF2o1M83DiYI5fn2iGs -+6E08lnAp//8eSpoXK9sEYrnvq+qnpeh8sdXtMKhseN5RfuOKwqRkqGOivP1DnPNV -+fVTJathTHEtrA6q2GeakT0cAlsVCWYVOw07NQYJTEPg= - -----END CERTIFICATE----- --- -1.8.5.1 - diff --git a/ruby-2.2.0-configure.in-use-SSE2.patch b/ruby-2.2.0-configure.in-use-SSE2.patch deleted file mode 100644 index 87858ce..0000000 --- a/ruby-2.2.0-configure.in-use-SSE2.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 40967a5c0b975f3f3ec1538a820985aa61b65b8f Mon Sep 17 00:00:00 2001 -From: nobu -Date: Thu, 9 Jan 2014 11:46:26 +0000 -Subject: [PATCH] configure.in: use SSE2 - -* configure.in: use SSE2 instructions to drop unexpected precisions on - other than mingw. [ruby-core:59472] [Bug #8358] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 5 +++++ - configure.in | 8 ++++++++- - 2 files changed, 13 insertions(+), 0 deletion(-) - -diff --git a/ChangeLog b/ChangeLog -index 7ec6eec..9ba337f 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,8 @@ -+Thu Jan 9 20:46:22 2014 Nobuyoshi Nakada -+ -+ * configure.in: use SSE2 instructions to drop unexpected precisions on -+ other than mingw. [ruby-core:59472] [Bug #8358] -+ - Fri Jan 3 10:43:57 2014 Aman Gupta - - * test/net/imap/cacert.pem: generate new CA cert, since the last one -diff --git a/configure.in b/configure.in -index f9e9431..9c95cc4 100644 ---- a/configure.in -+++ b/configure.in -@@ -858,6 +857,14 @@ if test "$GCC" = yes; then - for oflag in -fno-fast-math; do - RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)]) - done -+ AS_CASE(["$target"], -+ [*-darwin*], [ -+ # doesn't seem necessary on Mac OS X -+ ], -+ [[i[4-6]86*]], [ -+ RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse)]) -+ ] -+ ) - fi - - AC_ARG_WITH(opt-dir, --- -1.8.5.1 - diff --git a/ruby.spec b/ruby.spec index f157de9..21f63ed 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 2 %global minor_version 1 -%global teeny_version 0 -%global patch_level 0 +%global teeny_version 1 +%global patch_level 76 %global major_minor_version %{major_version}.%{minor_version} @@ -28,10 +28,10 @@ %endif -%global release 19 +%global release 18 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.2.0 +%global rubygems_version 2.2.2 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -41,11 +41,11 @@ # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version} -%global bigdecimal_version 1.2.3 +%global bigdecimal_version 1.2.4 %global io_console_version 0.4.2 %global json_version 1.8.1 %global minitest_version 4.7.5 -%global psych_version 2.0.2 +%global psych_version 2.0.3 %global rake_version 10.1.0 %global rdoc_version 4.1.0 @@ -140,22 +140,6 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Fixes possible "ArgumentError: invalid byte sequence in US-ASCII" error in -# TestGemRemoteFetcher#test_download_to_cache. -# http://bugs.ruby-lang.org/issues/9273 -Patch18: ruby-2.1.0-resolv.rb-no-encodings.patch -# Backport regenerated certificates for IMAP tests. -# http://bugs.ruby-lang.org/issues/9341 -Patch19: ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch -# Fix documentation generated on unexpected places. -# https://github.com/rubygems/rubygems/issues/758 -# https://github.com/rubygems/rubygems/commit/e088c6824209d98eccb0f1e6c7e21f26b4a1178d -Patch20: rubygems-2.2.1-Add-BasicSpecification-source_paths.patch -# https://github.com/rubygems/rubygems/commit/2f03b54b63043aadce9e95b83e98b29712bad21f -Patch21: rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch -# TestSprintf#test_float fails on i686 -# http://bugs.ruby-lang.org/issues/8358 -Patch22: ruby-2.2.0-configure.in-use-SSE2.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -416,11 +400,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch8 -p1 %patch12 -p1 %patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -903,6 +882,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Mar 05 2014 V鱈t Ondruch - 2.1.1-18 +- Update to Ruby 2.1.1. + * Mon Mar 03 2014 V鱈t Ondruch - 2.1.0-19 - Add RPM dependency generators for RubyGems. diff --git a/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch b/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch deleted file mode 100644 index 3cd1bed..0000000 --- a/rubygems-2.2.1-Add-BasicSpecification-source_paths.patch +++ /dev/null @@ -1,73 +0,0 @@ -From e088c6824209d98eccb0f1e6c7e21f26b4a1178d Mon Sep 17 00:00:00 2001 -From: Eric Hodel -Date: Mon, 6 Jan 2014 14:20:18 -0800 -Subject: [PATCH] Add BasicSpecification#source_paths - -This allows documentation and analysis tools to retrieve paths of source -files in gems. This is needed as the introduction of shared gem -directories means the extension source directory is no longer included -in require_paths (which was meant for $LOAD_PATH, not source code). ---- - lib/rubygems/basic_specification.rb | 18 ++++++++++++++++++ - test/rubygems/test_gem_specification.rb | 16 ++++++++++++++++ - 2 files changed, 34 insertions(+) - -diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb -index a52377f..470a6eb 100644 ---- a/lib/rubygems/basic_specification.rb -+++ b/lib/rubygems/basic_specification.rb -@@ -207,6 +207,24 @@ def require_paths - end - - ## -+ # Returns the paths to the source files for use with analysis and -+ # documentation tools. These paths are relative to full_gem_path. -+ -+ def source_paths -+ paths = raw_require_paths.dup -+ -+ if @extensions then -+ ext_dirs = @extensions.map do |extension| -+ extension.split(File::SEPARATOR, 2).first -+ end.uniq -+ -+ paths.concat ext_dirs -+ end -+ -+ paths.uniq -+ end -+ -+ ## - # Return a Gem::Specification from this gem - - def to_spec -diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb -index 46db0c4..b72a5d1 100644 ---- a/test/rubygems/test_gem_specification.rb -+++ b/test/rubygems/test_gem_specification.rb -@@ -1809,6 +1809,22 @@ def test_source - assert_kind_of Gem::Source::Installed, @a1.source - end - -+ def test_source_paths -+ ext_spec -+ -+ @ext.require_paths = %w[lib ext foo] -+ @ext.extensions << 'bar/baz' -+ -+ expected = %w[ -+ lib -+ ext -+ foo -+ bar -+ ] -+ -+ assert_equal expected, @ext.source_paths -+ end -+ - def test_full_require_paths - ext_spec - --- -1.8.5.1 - diff --git a/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch b/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch deleted file mode 100644 index edf40f1..0000000 --- a/rubygems-2.2.1-Use-source_paths-for-fallback-rdoc-plugin.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2f03b54b63043aadce9e95b83e98b29712bad21f Mon Sep 17 00:00:00 2001 -From: Eric Hodel -Date: Mon, 6 Jan 2014 14:30:07 -0800 -Subject: [PATCH] Use source_paths for fallback rdoc plugin - -Fixes #758 ---- - lib/rubygems/rdoc.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/rubygems/rdoc.rb b/lib/rubygems/rdoc.rb -index 52249dc..633bd89 100644 ---- a/lib/rubygems/rdoc.rb -+++ b/lib/rubygems/rdoc.rb -@@ -193,7 +193,7 @@ def generate - ::RDoc::Parser::C.reset - - args = @spec.rdoc_options -- args.concat @spec.require_paths -+ args.concat @spec.source_paths - args.concat @spec.extra_rdoc_files - - case config_args = Gem.configuration[:rdoc] --- -1.8.5.1 - From 699faa5e257b4448f7dd8fb72c4416a5d957490b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 7 Apr 2014 14:47:45 +0200 Subject: [PATCH 380/529] Fix typo. --- rubygems.req | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rubygems.req b/rubygems.req index 831d7af..4f7a583 100644 --- a/rubygems.req +++ b/rubygems.req @@ -44,7 +44,7 @@ module RubyGemsReq def self.rubygems_dependency(specification) Helpers::requirement_versions_to_rpm(specification.required_rubygems_version).each do |requirement| dependency_string = "ruby(rubygems)" - dependency_strint += " #{specification.required_rubygems_version}" if requirement && requirement.length > 0 + dependency_string += " #{specification.required_rubygems_version}" if requirement && requirement.length > 0 puts dependency_string end end From 0d5d7e9999b737c46f5ec14daa8a2378d4295326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 7 Apr 2014 15:23:37 +0200 Subject: [PATCH 381/529] Use revisions instead of tilde. Tilde is prohibited by FPC: https://fedorahosted.org/fpc/ticket/398 --- rubygems.prov | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rubygems.prov b/rubygems.prov index f23ec3f..b7c9777 100644 --- a/rubygems.prov +++ b/rubygems.prov @@ -9,9 +9,9 @@ module RubyGemsProv def self.normalize_prerelease(version) if version.prerelease? prerelease = version.version.sub /^#{version.release}\./, '' - "#{version.release}~#{prerelease}" + "#{version.release}-0.1.#{prerelease}" else - version.release + "#{version.release}-1" end end end From a7c9cd0323b3d5d30dbe2c0768bc60ad468cb03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 8 Apr 2014 13:32:43 +0200 Subject: [PATCH 382/529] Import Ruby 2.1 sources. --- .gitignore | 1 + ...x-test-failures-due-to-expired-certs.patch | 259 ------------------ ...obal-Specification.dirs-during-insta.patch | 151 ---------- ...s-2.0.0-Fixes-for-empty-ruby-version.patch | 34 --- sources | 2 +- 5 files changed, 2 insertions(+), 445 deletions(-) delete mode 100644 ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch delete mode 100644 rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch delete mode 100644 rubygems-2.0.0-Fixes-for-empty-ruby-version.patch diff --git a/.gitignore b/.gitignore index 552398f..1c061b4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-2.0.0-p195.tar.bz2 /ruby-2.0.0-p247.tar.bz2 /ruby-2.0.0-p353.tar.bz2 +/ruby-2.1.1.tar.bz2 diff --git a/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch b/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch deleted file mode 100644 index 783484b..0000000 --- a/ruby-2.1.1-fix-test-failures-due-to-expired-certs.patch +++ /dev/null @@ -1,259 +0,0 @@ -From 5ac7c395c19426a9a92f0a918b03e0f493af6e2c Mon Sep 17 00:00:00 2001 -From: tmm1 -Date: Fri, 3 Jan 2014 01:46:55 +0000 -Subject: [PATCH] test/net/imap/test_imap.rb: fix test failures due to expired - certs - -* test/net/imap/cacert.pem: generate new CA cert, since the last one - expired. [Bug #9341] [ruby-core:59459] -* test/net/imap/server.crt: new server cert signed with updated CA. -* test/net/imap/Makefile: add `make regen_certs` to automate this - process. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 8 +++++ - test/net/imap/Makefile | 15 +++++++++ - test/net/imap/cacert.pem | 84 ++++++++++++++++++++++++++---------------------- - test/net/imap/server.crt | 65 +++++++++++++++---------------------- - 4 files changed, 94 insertions(+), 78 deletions(-) - create mode 100644 test/net/imap/Makefile - -diff --git a/ChangeLog b/ChangeLog -index a4f20cd..d6a7148 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,11 @@ -+Fri Jan 3 10:43:57 2014 Aman Gupta -+ -+ * test/net/imap/cacert.pem: generate new CA cert, since the last one -+ expired. [Bug #9341] [ruby-core:59459] -+ * test/net/imap/server.crt: new server cert signed with updated CA. -+ * test/net/imap/Makefile: add `make regen_certs` to automate this -+ process. -+ - Fri Nov 22 13:18:28 2013 Nobuyoshi Nakada - - * util.c (ruby_strtod): BigMath requires more precision. -diff --git a/test/net/imap/Makefile b/test/net/imap/Makefile -new file mode 100644 -index 0000000..b2bc9c7 ---- /dev/null -+++ b/test/net/imap/Makefile -@@ -0,0 +1,15 @@ -+all: -+ -+regen_certs: -+ touch server.key -+ make server.crt -+ -+cacert.pem: server.key -+ openssl req -new -x509 -days 1825 -key server.key -out cacert.pem -text -subj "/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org" -+ -+server.csr: -+ openssl req -new -key server.key -out server.csr -text -subj "/C=JP/ST=Shimane/O=Ruby Core Team/OU=Ruby Test/CN=localhost" -+ -+server.crt: server.csr cacert.pem -+ openssl x509 -days 1825 -CA cacert.pem -CAkey server.key -set_serial 00 -in server.csr -req -text -out server.crt -+ rm server.csr -diff --git a/test/net/imap/cacert.pem b/test/net/imap/cacert.pem -index bd7e68a..7073387 100644 ---- a/test/net/imap/cacert.pem -+++ b/test/net/imap/cacert.pem -@@ -2,59 +2,65 @@ Certificate: - Data: - Version: 3 (0x2) - Serial Number: -- 9f:dc:f7:94:98:05:43:4c -+ b9:90:a2:bf:62:69:17:9c - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org - Validity -- Not Before: Dec 23 10:21:33 2010 GMT -- Not After : Jan 1 10:21:33 2014 GMT -+ Not Before: Jan 3 01:34:17 2014 GMT -+ Not After : Jan 2 01:34:17 2019 GMT - Subject: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org - Subject Public Key Info: - Public Key Algorithm: rsaEncryption -- Public-Key: (1024 bit) -- Modulus: -- 00:ce:be:2c:9f:47:ba:db:9c:9c:5b:f0:38:3b:f3: -- 74:20:37:76:23:9f:84:1c:81:90:b4:3e:00:20:34: -- 98:7e:81:69:50:a1:c3:65:96:ea:fa:00:da:8c:cc: -- 53:3f:ba:3c:d0:50:7a:5a:b4:6b:ac:d3:2e:18:ca: -- 2a:69:b3:6a:6f:38:c2:32:a8:06:b6:0a:30:a9:ee: -- 03:38:e9:05:a5:19:23:54:a8:3c:b9:08:ad:2b:72: -- 23:df:93:22:c4:46:a8:ea:f1:a6:e9:30:4a:3f:83: -- 39:e9:62:8e:8b:a3:5e:67:89:1d:7c:75:de:05:aa: -- 58:b1:b7:79:7c:10:80:6d:87 -+ RSA Public Key: (1024 bit) -+ Modulus (1024 bit): -+ 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: -+ bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: -+ 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: -+ 9d:7e:eb:a2:06:e2:ea:7d:07:c7:c7:99:c7:fb:d5: -+ b8:eb:63:77:62:2b:18:12:c3:53:58:d0:f5:c7:40: -+ 0c:01:d1:26:82:34:16:09:e3:dc:65:f4:dc:bb:5d: -+ a5:41:60:e7:a9:74:ba:d7:4c:b6:a3:9c:c5:8c:89: -+ af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: -+ d0:fc:d6:eb:fc:06:82:10:fb - Exponent: 65537 (0x10001) - X509v3 extensions: - X509v3 Subject Key Identifier: -- 41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A -+ E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 - X509v3 Authority Key Identifier: -- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A -+ keyid:E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 -+ DirName:/C=JP/ST=Shimane/L=Matz-e city/O=Ruby Core Team/CN=Ruby Test CA/emailAddress=security@ruby-lang.org -+ serial:B9:90:A2:BF:62:69:17:9C - - X509v3 Basic Constraints: - CA:TRUE - Signature Algorithm: sha1WithRSAEncryption -- 86:00:33:b9:dd:ff:5f:83:59:5f:c3:29:3c:d7:11:db:10:b3: -- d7:d1:70:fb:0a:c6:74:85:c6:ea:e1:15:c4:92:f8:0e:11:cc: -- ff:a6:3c:31:c2:2c:66:d8:fe:63:93:9f:b0:97:e6:f5:bc:5c: -- 80:68:96:5d:eb:77:b9:23:dd:68:a7:49:03:ff:22:48:55:f1: -- 39:7c:20:21:ff:64:52:e1:f6:cf:3c:b3:4d:2c:5c:03:62:ea: -- c5:49:99:07:fa:8d:ff:7b:c2:75:0c:ca:24:b5:0b:f5:b7:57: -- 3a:10:f0:8a:bb:9a:e8:92:4d:d5:6f:c2:a2:29:36:61:78:a4: -- dc:7b -+ 8f:77:06:4e:31:72:12:ee:68:09:70:27:d4:31:85:ef:10:95: -+ f9:0f:2b:66:63:08:37:88:6e:b7:9b:40:3e:18:77:33:86:e8: -+ 61:6a:b7:3c:cb:c7:a6:d6:d5:92:6a:1f:56:d0:9f:5c:32:56: -+ d3:37:52:fe:0e:20:c2:7a:0d:fe:2d:3c:81:da:b8:7f:4d:6a: -+ 08:01:d9:be:7a:a2:15:be:a6:ce:49:64:90:8c:9a:ca:6e:2e: -+ 84:48:1d:94:19:56:94:46:aa:25:9b:68:c2:80:60:bf:cb:2e: -+ 35:03:ea:0a:65:5a:33:38:c6:cc:81:46:c0:bc:36:86:96:39: -+ 10:7d - -----BEGIN CERTIFICATE----- --MIIC6DCCAlGgAwIBAgIJAJ/c95SYBUNMMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD --VQQGEwJKUDEQMA4GA1UECAwHU2hpbWFuZTEUMBIGA1UEBwwLTWF0ei1lIGNpdHkx --FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDDAxSdWJ5IFRlc3QgQ0Ex --JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTAxMjIz --MTAyMTMzWhcNMTQwMTAxMTAyMTMzWjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgM --B1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQKDA5SdWJ5IENv --cmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz -+MIIDjTCCAvagAwIBAgIJALmQor9iaRecMA0GCSqGSIb3DQEBBQUAMIGMMQswCQYD -+VQQGEwJKUDEQMA4GA1UECBMHU2hpbWFuZTEUMBIGA1UEBxMLTWF0ei1lIGNpdHkx -+FzAVBgNVBAoTDlJ1YnkgQ29yZSBUZWFtMRUwEwYDVQQDEwxSdWJ5IFRlc3QgQ0Ex -+JTAjBgkqhkiG9w0BCQEWFnNlY3VyaXR5QHJ1YnktbGFuZy5vcmcwHhcNMTQwMTAz -+MDEzNDE3WhcNMTkwMTAyMDEzNDE3WjCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT -+B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv -+cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz - ZWN1cml0eUBydWJ5LWxhbmcub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB --gQDOviyfR7rbnJxb8Dg783QgN3Yjn4QcgZC0PgAgNJh+gWlQocNllur6ANqMzFM/ --ujzQUHpatGus0y4Yyipps2pvOMIyqAa2CjCp7gM46QWlGSNUqDy5CK0rciPfkyLE --Rqjq8abpMEo/gznpYo6Lo15niR18dd4Fqlixt3l8EIBthwIDAQABo1AwTjAdBgNV --HQ4EFgQUQclJN7H6YeO61xk92dqMuYLJtGowHwYDVR0jBBgwFoAUQclJN7H6YeO6 --1xk92dqMuYLJtGowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCGADO5 --3f9fg1lfwyk81xHbELPX0XD7CsZ0hcbq4RXEkvgOEcz/pjwxwixm2P5jk5+wl+b1 --vFyAaJZd63e5I91op0kD/yJIVfE5fCAh/2RS4fbPPLNNLFwDYurFSZkH+o3/e8J1 --DMoktQv1t1c6EPCKu5rokk3Vb8KiKTZheKTcew== -+gQDbddBF3rHfv3GgDrCl5rz0HJ3lJWdkxXvL8a/Gvpqq6n4PzAWv70BpBrLJE51+ -+66IG4up9B8fHmcf71bjrY3diKxgSw1NY0PXHQAwB0SaCNBYJ49xl9Ny7XaVBYOep -+dLrXTLajnMWMia/L6J8F/ur+ZCS/5+3j9tD81uv8BoIQ+wIDAQABo4H0MIHxMB0G -+A1UdDgQWBBToflisE3sDIo2erzILhImAgAwewjCBwQYDVR0jBIG5MIG2gBToflis -+E3sDIo2erzILhImAgAwewqGBkqSBjzCBjDELMAkGA1UEBhMCSlAxEDAOBgNVBAgT -+B1NoaW1hbmUxFDASBgNVBAcTC01hdHotZSBjaXR5MRcwFQYDVQQKEw5SdWJ5IENv -+cmUgVGVhbTEVMBMGA1UEAxMMUnVieSBUZXN0IENBMSUwIwYJKoZIhvcNAQkBFhZz -+ZWN1cml0eUBydWJ5LWxhbmcub3JnggkAuZCiv2JpF5wwDAYDVR0TBAUwAwEB/zAN -+BgkqhkiG9w0BAQUFAAOBgQCPdwZOMXIS7mgJcCfUMYXvEJX5DytmYwg3iG63m0A+ -+GHczhuhharc8y8em1tWSah9W0J9cMlbTN1L+DiDCeg3+LTyB2rh/TWoIAdm+eqIV -+vqbOSWSQjJrKbi6ESB2UGVaURqolm2jCgGC/yy41A+oKZVozOMbMgUbAvDaGljkQ -+fQ== - -----END CERTIFICATE----- -diff --git a/test/net/imap/server.crt b/test/net/imap/server.crt -index d848b26..fa4f994 100644 ---- a/test/net/imap/server.crt -+++ b/test/net/imap/server.crt -@@ -1,17 +1,17 @@ - Certificate: - Data: -- Version: 3 (0x2) -+ Version: 1 (0x0) - Serial Number: 0 (0x0) - Signature Algorithm: sha1WithRSAEncryption - Issuer: C=JP, ST=Shimane, L=Matz-e city, O=Ruby Core Team, CN=Ruby Test CA/emailAddress=security@ruby-lang.org - Validity -- Not Before: Dec 23 10:23:52 2010 GMT -- Not After : Jan 1 10:23:52 2014 GMT -+ Not Before: Jan 3 01:34:17 2014 GMT -+ Not After : Jan 2 01:34:17 2019 GMT - Subject: C=JP, ST=Shimane, O=Ruby Core Team, OU=Ruby Test, CN=localhost - Subject Public Key Info: - Public Key Algorithm: rsaEncryption -- Public-Key: (1024 bit) -- Modulus: -+ RSA Public Key: (1024 bit) -+ Modulus (1024 bit): - 00:db:75:d0:45:de:b1:df:bf:71:a0:0e:b0:a5:e6: - bc:f4:1c:9d:e5:25:67:64:c5:7b:cb:f1:af:c6:be: - 9a:aa:ea:7e:0f:cc:05:af:ef:40:69:06:b2:c9:13: -@@ -22,40 +22,27 @@ Certificate: - af:cb:e8:9f:05:fe:ea:fe:64:24:bf:e7:ed:e3:f6: - d0:fc:d6:eb:fc:06:82:10:fb - Exponent: 65537 (0x10001) -- X509v3 extensions: -- X509v3 Basic Constraints: -- CA:FALSE -- Netscape Comment: -- OpenSSL Generated Certificate -- X509v3 Subject Key Identifier: -- E8:7E:58:AC:13:7B:03:22:8D:9E:AF:32:0B:84:89:80:80:0C:1E:C2 -- X509v3 Authority Key Identifier: -- keyid:41:C9:49:37:B1:FA:61:E3:BA:D7:19:3D:D9:DA:8C:B9:82:C9:B4:6A -- - Signature Algorithm: sha1WithRSAEncryption -- ae:ee:cd:fe:c9:af:48:0b:50:37:ac:6a:f6:68:90:9b:67:df: -- 6f:2d:17:c9:3c:a5:da:ad:39:dc:2a:5b:07:88:26:38:19:30: -- d6:95:cf:10:69:c7:92:14:83:be:f1:b5:8e:6f:d9:91:51:c5: -- 63:ae:1c:89:ac:27:bf:4f:2a:8f:4e:0c:57:42:0a:c9:8e:0c: -- f4:f3:02:f7:ea:44:b6:e4:47:05:af:4e:74:e4:87:87:d9:c8: -- 76:ed:ab:32:7c:f0:31:34:10:14:bc:a6:37:cd:d7:dc:33:da: -- 82:d3:d4:9b:e9:d5:cd:38:cc:fa:81:5f:4e:fd:5f:53:05:5d: -- 76:f9 -+ 85:f5:d3:05:8b:8c:f4:43:1c:88:f2:8f:b2:f2:93:77:b7:3d: -+ 95:c6:a0:34:bc:33:6a:d8:85:5f:3e:86:08:10:c5:5c:c1:76: -+ a3:53:3c:dc:38:98:23:97:e7:da:21:ac:e8:4d:3c:96:70:29: -+ ff:ff:1e:4a:9a:17:2b:db:04:62:b9:ef:ab:ea:a7:a5:e8:7c: -+ b1:d5:ed:30:a8:6c:78:de:51:7e:e3:8a:c2:a4:64:a8:63:a2: -+ bc:fd:43:9c:f3:55:7d:54:c9:6a:d8:53:1c:4b:6b:03:aa:b6: -+ 19:e6:a4:4f:47:00:96:c5:42:59:85:4e:c3:4e:cd:41:82:53: -+ 10:f8 - -----BEGIN CERTIFICATE----- --MIIC3jCCAkegAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjDELMAkGA1UEBhMCSlAx --EDAOBgNVBAgMB1NoaW1hbmUxFDASBgNVBAcMC01hdHotZSBjaXR5MRcwFQYDVQQK --DA5SdWJ5IENvcmUgVGVhbTEVMBMGA1UEAwwMUnVieSBUZXN0IENBMSUwIwYJKoZI --hvcNAQkBFhZzZWN1cml0eUBydWJ5LWxhbmcub3JnMB4XDTEwMTIyMzEwMjM1MloX --DTE0MDEwMTEwMjM1MlowYDELMAkGA1UEBhMCSlAxEDAOBgNVBAgMB1NoaW1hbmUx --FzAVBgNVBAoMDlJ1YnkgQ29yZSBUZWFtMRIwEAYDVQQLDAlSdWJ5IFRlc3QxEjAQ --BgNVBAMMCWxvY2FsaG9zdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA23XQ --Rd6x379xoA6wpea89Byd5SVnZMV7y/Gvxr6aqup+D8wFr+9AaQayyROdfuuiBuLq --fQfHx5nH+9W462N3YisYEsNTWND1x0AMAdEmgjQWCePcZfTcu12lQWDnqXS610y2 --o5zFjImvy+ifBf7q/mQkv+ft4/bQ/Nbr/AaCEPsCAwEAAaN7MHkwCQYDVR0TBAIw --ADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUw --HQYDVR0OBBYEFOh+WKwTewMijZ6vMguEiYCADB7CMB8GA1UdIwQYMBaAFEHJSTex --+mHjutcZPdnajLmCybRqMA0GCSqGSIb3DQEBBQUAA4GBAK7uzf7Jr0gLUDesavZo --kJtn328tF8k8pdqtOdwqWweIJjgZMNaVzxBpx5IUg77xtY5v2ZFRxWOuHImsJ79P --Ko9ODFdCCsmODPTzAvfqRLbkRwWvTnTkh4fZyHbtqzJ88DE0EBS8pjfN19wz2oLT --1Jvp1c04zPqBX079X1MFXXb5 -+MIICXDCCAcUCAQAwDQYJKoZIhvcNAQEFBQAwgYwxCzAJBgNVBAYTAkpQMRAwDgYD -+VQQIEwdTaGltYW5lMRQwEgYDVQQHEwtNYXR6LWUgY2l0eTEXMBUGA1UEChMOUnVi -+eSBDb3JlIFRlYW0xFTATBgNVBAMTDFJ1YnkgVGVzdCBDQTElMCMGCSqGSIb3DQEJ -+ARYWc2VjdXJpdHlAcnVieS1sYW5nLm9yZzAeFw0xNDAxMDMwMTM0MTdaFw0xOTAx -+MDIwMTM0MTdaMGAxCzAJBgNVBAYTAkpQMRAwDgYDVQQIEwdTaGltYW5lMRcwFQYD -+VQQKEw5SdWJ5IENvcmUgVGVhbTESMBAGA1UECxMJUnVieSBUZXN0MRIwEAYDVQQD -+Ewlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANt10EXesd+/ -+caAOsKXmvPQcneUlZ2TFe8vxr8a+mqrqfg/MBa/vQGkGsskTnX7rogbi6n0Hx8eZ -+x/vVuOtjd2IrGBLDU1jQ9cdADAHRJoI0Fgnj3GX03LtdpUFg56l0utdMtqOcxYyJ -+r8vonwX+6v5kJL/n7eP20PzW6/wGghD7AgMBAAEwDQYJKoZIhvcNAQEFBQADgYEA -+hfXTBYuM9EMciPKPsvKTd7c9lcagNLwzatiFXz6GCBDFXMF2o1M83DiYI5fn2iGs -+6E08lnAp//8eSpoXK9sEYrnvq+qnpeh8sdXtMKhseN5RfuOKwqRkqGOivP1DnPNV -+fVTJathTHEtrA6q2GeakT0cAlsVCWYVOw07NQYJTEPg= - -----END CERTIFICATE----- --- -1.8.5.1 - diff --git a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch b/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch deleted file mode 100644 index 98013a7..0000000 --- a/rubygems-2.0.0-Do-not-modify-global-Specification.dirs-during-insta.patch +++ /dev/null @@ -1,151 +0,0 @@ -From b95b9942361104dc5b7fd08eb4970f893d8c1a54 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 13 Feb 2013 13:12:30 +0100 -Subject: [PATCH 1/3] Remove duplicated check. - -The loaded specifications are rejected already in #gather_dependencies, -so this condition cannot trigger. ---- - lib/rubygems/dependency_installer.rb | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index d811f62..dffa8df 100644 ---- a/lib/rubygems/dependency_installer.rb -+++ b/lib/rubygems/dependency_installer.rb -@@ -330,9 +330,6 @@ class Gem::DependencyInstaller - - last = @gems_to_install.size - 1 - @gems_to_install.each_with_index do |spec, index| -- # REFACTOR more current spec set hardcoding, should be abstracted? -- next if Gem::Specification.include?(spec) and index != last -- - # TODO: make this sorta_verbose so other users can benefit from it - say "Installing gem #{spec.full_name}" if Gem.configuration.really_verbose - --- -1.8.1.2 - - -From 2fa9087b1986db6c7945c0f997fed2bfff5ce06a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Wed, 13 Feb 2013 15:47:47 +0100 -Subject: [PATCH 2/3] Do not modify global Specification.dirs during - installation. - -While gems are installed into --install-dir just fine even without -modifications of Specification.dirs, change in it makes inaccessible -gems already present on the system. ---- - lib/rubygems/dependency_installer.rb | 15 ++++++--------- - 1 file changed, 6 insertions(+), 9 deletions(-) - -diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index dffa8df..841f26a 100644 ---- a/lib/rubygems/dependency_installer.rb -+++ b/lib/rubygems/dependency_installer.rb -@@ -57,16 +57,14 @@ class Gem::DependencyInstaller - # :build_args:: See Gem::Installer::new - - def initialize(options = {}) -- @install_dir = options[:install_dir] || Gem.dir - - if options[:install_dir] then -- # HACK shouldn't change the global settings, needed for -i behavior -- # maybe move to the install command? See also github #442 -- Gem::Specification.dirs = @install_dir -+ Gem.ensure_gem_subdirectories options[:install_dir] - end - - options = DEFAULT_OPTIONS.merge options - -+ @install_dir = options[:install_dir] - @bin_dir = options[:bin_dir] - @dev_shallow = options[:dev_shallow] - @development = options[:development] -@@ -92,7 +89,7 @@ class Gem::DependencyInstaller - @installed_gems = [] - @toplevel_specs = nil - -- @cache_dir = options[:cache_dir] || @install_dir -+ @cache_dir = options[:cache_dir] || @install_dir || Gem.dir - - # Set with any errors that SpecFetcher finds while search through - # gemspecs for a dep -@@ -202,7 +199,7 @@ class Gem::DependencyInstaller - # that this isn't dependent only on the currently installed gems - dependency_list.specs.reject! { |spec| - not keep_names.include?(spec.full_name) and -- Gem::Specification.include?(spec) -+ (!@install_dir && Gem::Specification.include?(spec)) - } - - unless dependency_list.ok? or @ignore_dependencies or @force then -@@ -254,7 +251,7 @@ class Gem::DependencyInstaller - to_do.push t.spec - end - -- results.remove_installed! dep -+ results.remove_installed! dep unless @install_dir - - @available << results - results.inject_into_list dependency_list -@@ -360,7 +357,7 @@ class Gem::DependencyInstaller - :force => @force, - :format_executable => @format_executable, - :ignore_dependencies => @ignore_dependencies, -- :install_dir => @install_dir, -+ :install_dir => (@install_dir || Gem.dir), - :security_policy => @security_policy, - :user_install => @user_install, - :wrappers => @wrappers, --- -1.8.1.2 - - -From d473204ce920702dd87257db49355929f31530d4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 15 Feb 2013 17:02:44 +0100 -Subject: [PATCH 3/3] Default to Gem.dir as late as possible. - ---- - lib/rubygems/dependency_installer.rb | 2 +- - lib/rubygems/installer.rb | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/lib/rubygems/dependency_installer.rb b/lib/rubygems/dependency_installer.rb -index 841f26a..abcfa0f 100644 ---- a/lib/rubygems/dependency_installer.rb -+++ b/lib/rubygems/dependency_installer.rb -@@ -357,7 +357,7 @@ class Gem::DependencyInstaller - :force => @force, - :format_executable => @format_executable, - :ignore_dependencies => @ignore_dependencies, -- :install_dir => (@install_dir || Gem.dir), -+ :install_dir => @install_dir, - :security_policy => @security_policy, - :user_install => @user_install, - :wrappers => @wrappers, -diff --git a/lib/rubygems/installer.rb b/lib/rubygems/installer.rb -index 780a88b..6543130 100644 ---- a/lib/rubygems/installer.rb -+++ b/lib/rubygems/installer.rb -@@ -537,13 +537,13 @@ class Gem::Installer - :bin_dir => nil, - :env_shebang => false, - :force => false, -- :install_dir => Gem.dir, - :only_install_dir => false - }.merge options - - @env_shebang = options[:env_shebang] - @force = options[:force] -- @gem_home = options[:install_dir] -+ @install_dir = options[:install_dir] -+ @gem_home = options[:install_dir] || Gem.dir - @ignore_dependencies = options[:ignore_dependencies] - @format_executable = options[:format_executable] - @security_policy = options[:security_policy] --- -1.8.1.2 - diff --git a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch b/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch deleted file mode 100644 index 365dc7b..0000000 --- a/rubygems-2.0.0-Fixes-for-empty-ruby-version.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c9b2eff36728266052ccfff54d3ac0a0624fd0f1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 14 Feb 2013 11:50:41 +0100 -Subject: [PATCH] Use File.join insteado of manual path creation. - -This prevents issues, when File.join in #new_default_spec removes -superfluous slashes while they are kept in expected paths. E.g. the test -would fail if ruby configuration specifies --with-ruby-version=''. ---- - test/rubygems/test_gem_commands_contents_command.rb | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/test/rubygems/test_gem_commands_contents_command.rb b/test/rubygems/test_gem_commands_contents_command.rb -index 60df53f..35c9631 100644 ---- a/test/rubygems/test_gem_commands_contents_command.rb -+++ b/test/rubygems/test_gem_commands_contents_command.rb -@@ -140,10 +140,10 @@ lib/foo.rb - @cmd.execute - end - -- expected = %W[ -- #{Gem::ConfigMap[:bindir]}/default_command -- #{Gem::ConfigMap[:rubylibdir]}/default/gem.rb -- #{Gem::ConfigMap[:archdir]}/default_gem.so -+ expected = [ -+ File.join(Gem::ConfigMap[:bindir], 'default_command'), -+ File.join(Gem::ConfigMap[:rubylibdir], 'default/gem.rb'), -+ File.join(Gem::ConfigMap[:archdir], 'default_gem.so') - ].sort.join "\n" - - assert_equal expected, @ui.output.chomp --- -1.8.1.2 - diff --git a/sources b/sources index 0c071c1..d4da5ce 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -20eb8f067d20f6b76b7e16cce2a85a55 ruby-2.0.0-p353.tar.bz2 +53edc33b2f590ecdd9f6a344b9d92d0d ruby-2.1.1.tar.bz2 From 3f594feabd9e2aa513cb4cd97ef1af4adce2fca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 9 Apr 2014 09:34:30 +0200 Subject: [PATCH 383/529] Revert regression of Hash#reject. --- ruby-2.1.2-p79-hash.c-extra-states.patch | 33 ++++++++++++++++++++++++ ruby.spec | 6 ++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 ruby-2.1.2-p79-hash.c-extra-states.patch diff --git a/ruby-2.1.2-p79-hash.c-extra-states.patch b/ruby-2.1.2-p79-hash.c-extra-states.patch new file mode 100644 index 0000000..834bb4c --- /dev/null +++ b/ruby-2.1.2-p79-hash.c-extra-states.patch @@ -0,0 +1,33 @@ +From d5c45b5fb11748acbfc9ee6c7dbfeb04408de53d Mon Sep 17 00:00:00 2001 +From: naruse +Date: Sat, 1 Mar 2014 09:02:36 +0000 +Subject: [PATCH] merge revision(s) 44370: [Backport #9576] + + hash.c: extra states + + * hash.c (rb_hash_reject): use words "extra states". + + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + hash.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/hash.c b/hash.c +index 66cd94b..9a5814a 100644 +--- a/hash.c ++++ b/hash.c +@@ -1178,7 +1178,7 @@ struct shift_var { + #endif + } + } +-#if HASH_REJECT_COPY_MISC_ATTRIBUTES ++#if HASH_REJECT_COPY_EXTRA_STATES + result = rb_hash_dup_empty(hash); + #else + result = rb_hash_new(); +diff --git a/version.h b/version.h +index 8c8f900..59c80e3 100644 +-- +1.9.1 + diff --git a/ruby.spec b/ruby.spec index 4744e93..11d9a6d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -139,6 +139,8 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# https://www.ruby-lang.org/en/news/2014/03/10/regression-of-hash-reject-in-ruby-2-1-1/ +Patch18: ruby-2.1.2-p79-hash.c-extra-states.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -399,6 +401,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch8 -p1 %patch12 -p1 %patch17 -p1 +%patch18 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -881,8 +884,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Wed Mar 05 2014 V鱈t Ondruch - 2.1.1-18 +* Tue Apr 08 2014 V鱈t Ondruch - 2.1.1-18 - Update to Ruby 2.1.1. +- Revert regression of Hash#reject. * Mon Mar 03 2014 V鱈t Ondruch - 2.1.0-19 - Add RPM dependency generators for RubyGems. From f49b015f1f33c5432d1fabbf6dcbd99cb0859fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 23 Apr 2014 16:36:57 +0200 Subject: [PATCH 384/529] Correctly expand $(prefix) in some Makefiles, e.g. eruby. --- ...ed-paths-when-empty-version-string-i.patch | 28 ++++++++++++++----- ruby.spec | 5 +++- 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index da88a97..37c6fa4 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -1,16 +1,17 @@ -From 763c6571697b0bd551a8a0c27d538d00f161a9f3 Mon Sep 17 00:00:00 2001 +From e24d97c938c481450ed80ec83e5399595946c1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 8 Feb 2013 22:48:41 +0100 Subject: [PATCH] Prevent duplicated paths when empty version string is configured. --- - configure.in | 15 +++++++++------ - loadpath.c | 12 ++++++++++++ - 2 files changed, 21 insertions(+), 6 deletions(-) + configure.in | 15 +++++++++------ + loadpath.c | 12 ++++++++++++ + tool/mkconfig.rb | 2 +- + 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/configure.in b/configure.in -index 88d24ee..4a300b9 100644 +index 17ed3ed..5843651 100644 --- a/configure.in +++ b/configure.in @@ -3645,8 +3645,6 @@ AS_CASE(["$target_os"], @@ -22,7 +23,7 @@ index 88d24ee..4a300b9 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3676,6 +3676,7 @@ AC_ARG_WITH(ruby-version, +@@ -3676,6 +3674,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -108,6 +109,19 @@ index 9160031..0d4d953 100644 RUBY_LIB "\0" #ifdef RUBY_THINARCH +diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb +index 07076d4..35e6c3c 100755 +--- a/tool/mkconfig.rb ++++ b/tool/mkconfig.rb +@@ -121,7 +121,7 @@ File.foreach "config.status" do |line| + val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump + case name + when /^prefix$/ +- val = "(TOPDIR || DESTDIR + #{val})" ++ val = "(((TOPDIR && TOPDIR.empty?) ? nil : TOPDIR) || DESTDIR + #{val})" + when /^ARCH_FLAG$/ + val = "arch_flag || #{val}" if universal + when /^UNIVERSAL_ARCHNAMES$/ -- -1.8.4.2 +1.9.0 diff --git a/ruby.spec b/ruby.spec index 11d9a6d..cc721d1 100644 --- a/ruby.spec +++ b/ruby.spec @@ -27,7 +27,7 @@ %endif -%global release 18 +%global release 19 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -884,6 +884,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Apr 23 2014 V鱈t Ondruch - 2.1.1-19 +- Correctly expand $(prefix) in some Makefiles, e.g. eruby. + * Tue Apr 08 2014 V鱈t Ondruch - 2.1.1-18 - Update to Ruby 2.1.1. - Revert regression of Hash#reject. From eab15b0506ea7c7512a071fcd00df38849120e17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 6 May 2014 08:18:00 +0200 Subject: [PATCH 385/529] Remove useless exclude (rhbz#1065897). --- ruby.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index cc721d1..190decb 100644 --- a/ruby.spec +++ b/ruby.spec @@ -27,7 +27,7 @@ %endif -%global release 19 +%global release 20 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -650,7 +650,6 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/dl %{ruby_libdir}/drb %{ruby_libdir}/fiddle -%exclude %{ruby_libdir}/gems %exclude %{ruby_libdir}/irb %{ruby_libdir}/matrix %{ruby_libdir}/net @@ -884,6 +883,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue May 06 2014 V鱈t Ondruch - 2.1.1-20 +- Remove useless exclude (rhbz#1065897). + * Wed Apr 23 2014 V鱈t Ondruch - 2.1.1-19 - Correctly expand $(prefix) in some Makefiles, e.g. eruby. From 0a113b08ab42965229d4bc12a472d2db8917f176 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 6 May 2014 14:31:57 +0200 Subject: [PATCH 386/529] Extract load macro into external file and include it. --- load.inc | 30 ++++++++++++++++++++++++++++++ ruby.spec | 37 +++++++------------------------------ 2 files changed, 37 insertions(+), 30 deletions(-) create mode 100644 load.inc diff --git a/load.inc b/load.inc new file mode 100644 index 0000000..bf9c07e --- /dev/null +++ b/load.inc @@ -0,0 +1,30 @@ +%{lua: + +function source_macros(file) + local macro = nil + + for line in io.lines(file) do + if not macro and line:match("^%%") then + macro = line:match("^%%(.*)$") + line = nil + end + + if macro then + if line and macro:match("^.-%s*\\%s*$") then + macro = macro .. '\n' .. line + end + + if not macro:match("^.-%s*\\%s*$") then + rpm.define(macro) + macro = nil + end + end + end +end + +} + +# Include the constants defined in macros files. Could be dropped as soon as +# RPM supports the %%load macro (RPM 4.12+ probably). +# http://lists.rpm.org/pipermail/rpm-maint/2014-February/003659.html +%define load() %{lua:source_macros(rpm.expand("%1"))} diff --git a/ruby.spec b/ruby.spec index 190decb..655437b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -86,37 +86,13 @@ Source8: rubygems.attr Source9: rubygems.req Source10: rubygems.prov +# %%load function should be supported in RPM 4.12+. +# http://lists.rpm.org/pipermail/rpm-maint/2014-February/003659.html +Source100: load.inc +%include %{SOURCE100} -# Include the constants defined in macros files. -# http://rpm.org/ticket/866 -%{lua: - -function source_macros(file) - local macro = nil - - for line in io.lines(file) do - if not macro and line:match("^%%") then - macro = line:match("^%%(.*)$") - line = nil - end - - if macro then - if line and macro:match("^.-%s*\\%s*$") then - macro = macro .. '\n' .. line - end - - if not macro:match("^.-%s*\\%s*$") then - rpm.define(macro) - macro = nil - end - end - end -end - -source_macros(rpm.expand("%{SOURCE4}")) -source_macros(rpm.expand("%{SOURCE5}")) - -} +%{load %{SOURCE4}} +%{load %{SOURCE5}} # http://bugs.ruby-lang.org/issues/7807 Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -885,6 +861,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %changelog * Tue May 06 2014 V鱈t Ondruch - 2.1.1-20 - Remove useless exclude (rhbz#1065897). +- Extract load macro into external file and include it. * Wed Apr 23 2014 V鱈t Ondruch - 2.1.1-19 - Correctly expand $(prefix) in some Makefiles, e.g. eruby. From efdf386e3192775d84b69006d3bc12d5532455d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 7 May 2014 15:40:54 +0200 Subject: [PATCH 387/529] Kill bundled certificates. --- ruby.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ruby.spec b/ruby.spec index 655437b..df45731 100644 --- a/ruby.spec +++ b/ruby.spec @@ -430,6 +430,16 @@ install -m644 %{SOURCE7} %{buildroot}%{_includedir}/%{name}/config.h # http://bugs.ruby-lang.org/issues/7807 sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc +# Kill bundled certificates, as they should be part of ca-sertificates. +for cert in \ + Class3PublicPrimaryCertificationAuthority.pem \ + DigiCertHighAssuranceEVRootCA.pem \ + EntrustnetSecureServerCertificationAuthority.pem \ + GeoTrustGlobalCA.pem +do + rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert +done + # Move macros file insto proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d @@ -862,6 +872,7 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" * Tue May 06 2014 V鱈t Ondruch - 2.1.1-20 - Remove useless exclude (rhbz#1065897). - Extract load macro into external file and include it. +- Kill bundled certificates. * Wed Apr 23 2014 V鱈t Ondruch - 2.1.1-19 - Correctly expand $(prefix) in some Makefiles, e.g. eruby. From 098cd8787a738c16e2583c47b364f6389b553838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 7 May 2014 15:43:31 +0200 Subject: [PATCH 388/529] Fix typo. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index df45731..c1beea5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -430,7 +430,7 @@ install -m644 %{SOURCE7} %{buildroot}%{_includedir}/%{name}/config.h # http://bugs.ruby-lang.org/issues/7807 sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc -# Kill bundled certificates, as they should be part of ca-sertificates. +# Kill bundled certificates, as they should be part of ca-certificates. for cert in \ Class3PublicPrimaryCertificationAuthority.pem \ DigiCertHighAssuranceEVRootCA.pem \ From d09c32278d13358b0d1fe0a3e92f0b262c3ff1ef Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Tue, 20 May 2014 13:24:29 +0200 Subject: [PATCH 389/529] Update to Ruby 2.1.2 --- .gitignore | 1 + ruby-2.1.2-p79-hash.c-extra-states.patch | 33 ------------------------ ruby.spec | 12 ++++----- sources | 2 +- 4 files changed, 8 insertions(+), 40 deletions(-) delete mode 100644 ruby-2.1.2-p79-hash.c-extra-states.patch diff --git a/.gitignore b/.gitignore index 1c061b4..f4b5d13 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz /ruby-2.0.0-p247.tar.bz2 /ruby-2.0.0-p353.tar.bz2 /ruby-2.1.1.tar.bz2 +/ruby-2.1.2.tar.bz2 diff --git a/ruby-2.1.2-p79-hash.c-extra-states.patch b/ruby-2.1.2-p79-hash.c-extra-states.patch deleted file mode 100644 index 834bb4c..0000000 --- a/ruby-2.1.2-p79-hash.c-extra-states.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d5c45b5fb11748acbfc9ee6c7dbfeb04408de53d Mon Sep 17 00:00:00 2001 -From: naruse -Date: Sat, 1 Mar 2014 09:02:36 +0000 -Subject: [PATCH] merge revision(s) 44370: [Backport #9576] - - hash.c: extra states - - * hash.c (rb_hash_reject): use words "extra states". - - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - hash.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/hash.c b/hash.c -index 66cd94b..9a5814a 100644 ---- a/hash.c -+++ b/hash.c -@@ -1178,7 +1178,7 @@ struct shift_var { - #endif - } - } --#if HASH_REJECT_COPY_MISC_ATTRIBUTES -+#if HASH_REJECT_COPY_EXTRA_STATES - result = rb_hash_dup_empty(hash); - #else - result = rb_hash_new(); -diff --git a/version.h b/version.h -index 8c8f900..59c80e3 100644 --- -1.9.1 - diff --git a/ruby.spec b/ruby.spec index c1beea5..7c9bdc0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,7 @@ %global major_version 2 %global minor_version 1 -%global teeny_version 1 -%global patch_level 76 +%global teeny_version 2 +%global patch_level 95 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -44,7 +44,7 @@ %global io_console_version 0.4.2 %global json_version 1.8.1 %global minitest_version 4.7.5 -%global psych_version 2.0.3 +%global psych_version 2.0.5 %global rake_version 10.1.0 %global rdoc_version 4.1.0 @@ -115,8 +115,6 @@ Patch12: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# https://www.ruby-lang.org/en/news/2014/03/10/regression-of-hash-reject-in-ruby-2-1-1/ -Patch18: ruby-2.1.2-p79-hash.c-extra-states.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -377,7 +375,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch8 -p1 %patch12 -p1 %patch17 -p1 -%patch18 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -869,6 +866,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue May 20 2014 Josef Stribny - 2.1.2-21 +- Update to Ruby 2.1.2 + * Tue May 06 2014 V鱈t Ondruch - 2.1.1-20 - Remove useless exclude (rhbz#1065897). - Extract load macro into external file and include it. diff --git a/sources b/sources index d4da5ce..429bbe7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -53edc33b2f590ecdd9f6a344b9d92d0d ruby-2.1.1.tar.bz2 +ed9b8565bdeccb401d628ec8d54a0774 ruby-2.1.2.tar.bz2 From ce47215a639e7293cda9c7019145b54606fc02d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= Date: Wed, 21 May 2014 12:36:54 +0200 Subject: [PATCH 390/529] - Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86 --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 7c9bdc0..6bace2d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -27,7 +27,7 @@ %endif -%global release 20 +%global release 21 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -63,7 +63,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version} -Release: %{release_string} +Release: %{release_string}.1 Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -866,6 +866,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed May 21 2014 Jaroslav karvada +- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86 + * Tue May 20 2014 Josef Stribny - 2.1.2-21 - Update to Ruby 2.1.2 From 96581d5c9605c490cc6d2ba86162ae739191694e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 22:07:12 -0500 Subject: [PATCH 391/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 6bace2d..32635b4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -27,7 +27,7 @@ %endif -%global release 21 +%global release 22 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -63,7 +63,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version} -Release: %{release_string}.1 +Release: %{release_string}.2 Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -866,6 +866,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Sun Jun 08 2014 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Wed May 21 2014 Jaroslav karvada - Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86 From c31c7edb6913eb7417ee68c59997548df2943dde Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Tue, 24 Jun 2014 12:07:04 +0100 Subject: [PATCH 392/529] Fix FTBFS, Specify tcl/tk 8.6, Add upstream patch to build with libffi 3.1 --- .gitignore | 26 +------------------------- ruby-r46485-libffi31.patch | 14 ++++++++++++++ ruby.spec | 30 ++++++++++++++++++++---------- 3 files changed, 35 insertions(+), 35 deletions(-) create mode 100644 ruby-r46485-libffi31.patch diff --git a/.gitignore b/.gitignore index f4b5d13..9c1eabd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1 @@ -ruby-1.8.7-p299.tar.bz2 -ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz -/ruby-1.8.7-p302.tar.bz2 -/ruby-rev54f344095916f83a2755a177f94e65a1c390a612-ext_tk.tar.gz -/ruby-1.8.7-p330.tar.bz2 -/ruby-revf30eca26639ce538339bc488c7ed1fd397b0c13f-ext_tk.tar.gz -/ruby-1.8.7-p334.tar.bz2 -/ruby-1.8.7-p352.tar.bz2 -/ruby-revc2dfaa7d40531aef3706bcc16f38178b0c6633ee-ext_tk.tar.gz -/ruby-1.8.7-p357.tar.bz2 -/ruby-1.9.3-p0.tar.gz -/ruby-1.9.3-p125.tar.gz -/ruby-1.9.3-p194.tar.gz -/ruby-1.9.3-p286.tar.gz -/ruby-1.9.3-p327.tar.gz -/ruby-1.9.3-p362.tar.gz -/ruby-1.9.3-p374.tar.gz -/ruby-1.9.3-p385.tar.gz -/ruby-2.0.0-r39387.tar.gz -/ruby-2.0.0-p0.tar.gz -/ruby-2.0.0-p195.tar.bz2 -/ruby-2.0.0-p247.tar.bz2 -/ruby-2.0.0-p353.tar.bz2 -/ruby-2.1.1.tar.bz2 -/ruby-2.1.2.tar.bz2 +/ruby-2.*.tar.bz2 diff --git a/ruby-r46485-libffi31.patch b/ruby-r46485-libffi31.patch new file mode 100644 index 0000000..79144a6 --- /dev/null +++ b/ruby-r46485-libffi31.patch @@ -0,0 +1,14 @@ +Index: ext/fiddle/extconf.rb +=================================================================== +--- ext/fiddle/extconf.rb (revision 46484) ++++ ext/fiddle/extconf.rb (revision 46485) +@@ -7,7 +7,8 @@ + pkg_config("libffi") + if ver = pkg_config("libffi", "modversion") + ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored. +- $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver.split('.') }}) ++ ver = (ver.split('.') + [0,0])[0,3] ++ $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }}) + end + + unless have_header('ffi.h') diff --git a/ruby.spec b/ruby.spec index 32635b4..9e529bb 100644 --- a/ruby.spec +++ b/ruby.spec @@ -27,7 +27,7 @@ %endif -%global release 22 +%global release 23 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -63,7 +63,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version} -Release: %{release_string}.2 +Release: %{release_string} Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain @@ -102,19 +102,22 @@ Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. -Patch3: ruby-2.1.0-always-use-i386.patch +Patch2: ruby-2.1.0-always-use-i386.patch # Fixes random WEBRick test failures. # https://bugs.ruby-lang.org/issues/6573. -Patch5: ruby-1.9.3.p195-fix-webrick-tests.patch +Patch3: ruby-1.9.3.p195-fix-webrick-tests.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://redmine.ruby-lang.org/issues/5617 -Patch8: ruby-2.1.0-custom-rubygems-location.patch +Patch4: ruby-2.1.0-custom-rubygems-location.patch # Make mkmf verbose by default -Patch12: ruby-1.9.3-mkmf-verbose.patch +Patch5: ruby-1.9.3-mkmf-verbose.patch # Adds support for '--with-prelude' configuration option. This allows to built # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 -Patch17: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# Fix build with libffi 3.1 +# https://bugs.ruby-lang.org/issues/9897 +Patch7: ruby-r46485-libffi31.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -370,11 +373,12 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch0 -p1 %patch1 -p1 +%patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch5 -p1 -%patch8 -p1 -%patch12 -p1 -%patch17 -p1 +%patch6 -p1 +%patch7 -p0 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -401,6 +405,7 @@ autoconf --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ --with-rubygemsdir='%{rubygems_dir}' \ --with-ruby-pc='%{name}.pc' \ + --with-tcltkversion=8.6 \ --disable-rpath \ --enable-shared \ --with-ruby-version='' \ @@ -866,6 +871,11 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Jun 24 2014 Peter Robinson 2.1.2-23 +- Fix FTBFS +- Specify tcl/tk 8.6 +- Add upstream patch to build with libffi 3.1 + * Sun Jun 08 2014 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 629648da07e180cf1591833d23b96dd25887d8fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 27 Jun 2014 12:49:55 +0200 Subject: [PATCH 393/529] Workaround OpenSSL::TestPKeyRSA#test_sign_verify_memory_leak timeouts on ARM. --- ruby.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby.spec b/ruby.spec index 9e529bb..db7f6ff 100644 --- a/ruby.spec +++ b/ruby.spec @@ -554,6 +554,10 @@ DISABLE_TESTS="" # test_call_double(DL::TestDL) fails on ARM HardFP # http://bugs.ruby-lang.org/issues/6592 DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" + +# Workaround OpenSSL::TestPKeyRSA#test_sign_verify_memory_leak timeouts on ARM. +# https://bugs.ruby-lang.org/issues/9984 +sed -i -e 's|20_000|10_000|g' test/openssl/test_pkey_rsa.rb %endif # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, From b9d9d0c37a5e02e69f19caf1204c868d6bc2fd48 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 00:28:26 +0000 Subject: [PATCH 394/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index db7f6ff..89bcc0d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -27,7 +27,7 @@ %endif -%global release 23 +%global release 24 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -875,6 +875,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Aug 18 2014 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Tue Jun 24 2014 Peter Robinson 2.1.2-23 - Fix FTBFS - Specify tcl/tk 8.6 From 8e2921fd5a3125b7ce2487bb449b2e6db40cc3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 25 Aug 2014 16:07:51 +0200 Subject: [PATCH 395/529] Use load macro introduced in RPM 4.12. --- load.inc | 30 ------------------------------ ruby.spec | 14 +++++++------- 2 files changed, 7 insertions(+), 37 deletions(-) delete mode 100644 load.inc diff --git a/load.inc b/load.inc deleted file mode 100644 index bf9c07e..0000000 --- a/load.inc +++ /dev/null @@ -1,30 +0,0 @@ -%{lua: - -function source_macros(file) - local macro = nil - - for line in io.lines(file) do - if not macro and line:match("^%%") then - macro = line:match("^%%(.*)$") - line = nil - end - - if macro then - if line and macro:match("^.-%s*\\%s*$") then - macro = macro .. '\n' .. line - end - - if not macro:match("^.-%s*\\%s*$") then - rpm.define(macro) - macro = nil - end - end - end -end - -} - -# Include the constants defined in macros files. Could be dropped as soon as -# RPM supports the %%load macro (RPM 4.12+ probably). -# http://lists.rpm.org/pipermail/rpm-maint/2014-February/003659.html -%define load() %{lua:source_macros(rpm.expand("%1"))} diff --git a/ruby.spec b/ruby.spec index 89bcc0d..a524fc7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -86,13 +86,10 @@ Source8: rubygems.attr Source9: rubygems.req Source10: rubygems.prov -# %%load function should be supported in RPM 4.12+. -# http://lists.rpm.org/pipermail/rpm-maint/2014-February/003659.html -Source100: load.inc -%include %{SOURCE100} - -%{load %{SOURCE4}} -%{load %{SOURCE5}} +# The load directive is supported since RPM 4.12, i.e. F21+. The build process +# fails on older Fedoras. +%{?load:%{SOURCE4}} +%{?load:%{SOURCE5}} # http://bugs.ruby-lang.org/issues/7807 Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -875,6 +872,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Aug 25 2014 V鱈t Ondruch - 2.1.2-24 +- Use load macro introduced in RPM 4.12. + * Mon Aug 18 2014 Fedora Release Engineering - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 1835dddc242bf73b9d4de1b5706eb23ff3402f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 25 Aug 2014 17:37:43 +0200 Subject: [PATCH 396/529] Drop the unused patch_level. --- ruby.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index a524fc7..40b9a6c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,7 +1,6 @@ %global major_version 2 %global minor_version 1 %global teeny_version 2 -%global patch_level 95 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -19,11 +18,6 @@ %if 0%{?milestone:1}%{?revision:1} != 0 %global development_release %{?milestone}%{?!milestone:%{?revision:r%{revision}}} %global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision:r%{revision}}} -%else -# Ruby will be using semver versioning scheme since Ruby 2.1.0. However, it is -# unclear ATM what name will be used when next bugfix version is released. -# http://bugs.ruby-lang.org/issues/8835 -#%%global ruby_archive %{ruby_archive}-p%{patch_level} %endif From 61fd310e63c3d5d74d0113cb26637f5c3cb9add4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 29 Oct 2014 15:22:34 +0100 Subject: [PATCH 397/529] Update to Ruby 2.1.4. --- ruby-r46485-libffi31.patch | 14 -------------- ruby.spec | 25 +++++++++++-------------- sources | 2 +- 3 files changed, 12 insertions(+), 29 deletions(-) delete mode 100644 ruby-r46485-libffi31.patch diff --git a/ruby-r46485-libffi31.patch b/ruby-r46485-libffi31.patch deleted file mode 100644 index 79144a6..0000000 --- a/ruby-r46485-libffi31.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: ext/fiddle/extconf.rb -=================================================================== ---- ext/fiddle/extconf.rb (revision 46484) -+++ ext/fiddle/extconf.rb (revision 46485) -@@ -7,7 +7,8 @@ - pkg_config("libffi") - if ver = pkg_config("libffi", "modversion") - ver = ver.gsub(/-rc\d+/, '') # If ver contains rc version, just ignored. -- $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver.split('.') }}) -+ ver = (ver.split('.') + [0,0])[0,3] -+ $defs.push(%{-DRUBY_LIBFFI_MODVERSION=#{ '%d%03d%03d' % ver }}) - end - - unless have_header('ffi.h') diff --git a/ruby.spec b/ruby.spec index 40b9a6c..f2cf2a7 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 1 -%global teeny_version 2 +%global teeny_version 4 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 24 +%global release 23 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -106,9 +106,6 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Fix build with libffi 3.1 -# https://bugs.ruby-lang.org/issues/9897 -Patch7: ruby-r46485-libffi31.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -369,7 +366,6 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p0 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -545,10 +541,6 @@ DISABLE_TESTS="" # test_call_double(DL::TestDL) fails on ARM HardFP # http://bugs.ruby-lang.org/issues/6592 DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" - -# Workaround OpenSSL::TestPKeyRSA#test_sign_verify_memory_leak timeouts on ARM. -# https://bugs.ruby-lang.org/issues/9984 -sed -i -e 's|20_000|10_000|g' test/openssl/test_pkey_rsa.rb %endif # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, @@ -568,9 +560,13 @@ sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb # https://bugs.ruby-lang.org/issues/9198 sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb -# Allow MD5 in OpenSSL. -# https://bugs.ruby-lang.org/issues/9154 -OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" +# Don't test wrap ciphers to prevent "OpenSSL::Cipher::CipherError: wrap mode +# not allowed" error. +# https://bugs.ruby-lang.org/issues/10229 +sed -i '/assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher))/i \ + next if /wrap/ =~ name' test/openssl/test_cipher.rb + +make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -866,7 +862,8 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Mon Aug 25 2014 V鱈t Ondruch - 2.1.2-24 +* Wed Oct 29 2014 V鱈t Ondruch - 2.1.4-23 +- Update to Ruby 2.1.4. - Use load macro introduced in RPM 4.12. * Mon Aug 18 2014 Fedora Release Engineering diff --git a/sources b/sources index 429bbe7..0edbf6f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ed9b8565bdeccb401d628ec8d54a0774 ruby-2.1.2.tar.bz2 +f4136e781d261e3cc20748005e1740b7 ruby-2.1.4.tar.bz2 From 2400b2d5741c6c45220a5678ce2943fd818ce98c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 14 Oct 2014 11:25:42 +0200 Subject: [PATCH 398/529] Include only vendor directories, not their content (rhbz#1114071). --- ruby.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index f2cf2a7..18aee30 100644 --- a/ruby.spec +++ b/ruby.spec @@ -612,8 +612,8 @@ make check TESTS="-v $DISABLE_TESTS" # local system administrator. %exclude %{ruby_sitelibdir} %exclude %{ruby_sitearchdir} -%{ruby_vendorlibdir} -%{ruby_vendorarchdir} +%dir %{ruby_vendorlibdir} +%dir %{ruby_vendorarchdir} # List all these files explicitly to prevent surprises # Platform independent libraries. @@ -864,6 +864,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Wed Oct 29 2014 V鱈t Ondruch - 2.1.4-23 - Update to Ruby 2.1.4. +- Include only vendor directories, not their content (rhbz#1114071). - Use load macro introduced in RPM 4.12. * Mon Aug 18 2014 Fedora Release Engineering From 4375d5ca30bd504cc01fef2239e430db2f5b23a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 30 Oct 2014 13:59:52 +0100 Subject: [PATCH 399/529] Fix "invalid regex" warning for non-rubygem packages (rhbz#1154067). --- ruby.spec | 1 + rubygems.attr | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 18aee30..e1f6dbf 100644 --- a/ruby.spec +++ b/ruby.spec @@ -865,6 +865,7 @@ make check TESTS="-v $DISABLE_TESTS" * Wed Oct 29 2014 V鱈t Ondruch - 2.1.4-23 - Update to Ruby 2.1.4. - Include only vendor directories, not their content (rhbz#1114071). +- Fix "invalid regex" warning for non-rubygem packages (rhbz#1154067). - Use load macro introduced in RPM 4.12. * Mon Aug 18 2014 Fedora Release Engineering diff --git a/rubygems.attr b/rubygems.attr index f711775..f033d43 100644 --- a/rubygems.attr +++ b/rubygems.attr @@ -1,3 +1,5 @@ %__rubygems_requires %{_rpmconfigdir}/rubygems.req %__rubygems_provides %{_rpmconfigdir}/rubygems.prov -%__rubygems_path ^%{gem_spec}$ +# In non-gem packages, the %%{gem_name} macro is not available and the macro +# stays unexpanded which leads to "invalid regex" error (rhbz#1154067). +%__rubygems_path ^%{?gem_name:%{gem_spec}}%{!?gem_name:this_should_never_match_anything}$ From 79beb34d809cb4d1331bde72f2e940124c5f1aa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 31 Oct 2014 08:59:55 +0100 Subject: [PATCH 400/529] Bump release to satisfy upgrade path. --- ruby.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index e1f6dbf..ec213ea 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 23 +%global release 24 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -862,7 +862,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Wed Oct 29 2014 V鱈t Ondruch - 2.1.4-23 +* Fri Oct 31 2014 V鱈t Ondruch - 2.1.4-24 - Update to Ruby 2.1.4. - Include only vendor directories, not their content (rhbz#1114071). - Fix "invalid regex" warning for non-rubygem packages (rhbz#1154067). From 1610d07dcd91940692d4dd5e0c58e59e0fdb2961 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 28 Nov 2014 17:02:39 +0100 Subject: [PATCH 401/529] Update to Ruby 2.1.5. --- ruby-1.9.3-mkmf-verbose.patch | 2 +- ...-additional-preludes-by-configuratio.patch | 2 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 6 +-- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ...0-Don-t-use-obsolete-SSLv3-for-tests.patch | 38 +++++++++++++++++++ ruby.spec | 15 +++++++- sources | 2 +- 9 files changed, 61 insertions(+), 12 deletions(-) create mode 100644 ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 66107c4..120ee37 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1828,7 +1828,7 @@ SRC +@@ -1829,7 +1829,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index e297a73..6a425ea 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -38,7 +38,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -3841,6 +3841,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -3914,6 +3914,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 90a97d7..4a4919c 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3071,6 +3071,11 @@ if test ${multiarch+set}; then +@@ -3143,6 +3143,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 37c6fa4..89f5890 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index 17ed3ed..5843651 100644 --- a/configure.in +++ b/configure.in -@@ -3645,8 +3645,6 @@ AS_CASE(["$target_os"], +@@ -3718,8 +3718,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -23,7 +23,7 @@ index 17ed3ed..5843651 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3676,6 +3674,7 @@ AC_ARG_WITH(ruby-version, +@@ -3749,6 +3747,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -31,7 +31,7 @@ index 17ed3ed..5843651 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -3692,30 +3691,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -3765,30 +3764,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" eval $ruby_version elif test -z "${ruby_version}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 88eff60..78e9697 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -3757,6 +3757,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -3830,6 +3830,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index e0e488b..55c7448 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -3731,6 +3731,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -3804,6 +3804,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3754,6 +3754,7 @@ AC_SUBST(sitearchdir)dnl +@@ -3827,6 +3831,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch b/ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch new file mode 100644 index 0000000..3ad6520 --- /dev/null +++ b/ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch @@ -0,0 +1,38 @@ +From 75ca3a364e2e35a53a385eab08bebdcb08baeace Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 21 Nov 2014 16:02:52 +0100 +Subject: [PATCH] Don't use obsolete SSLv3 for tests. + +SSLv23 should be the most liberal settings according to upstream +documentation: + +https://www.openssl.org/docs/ssl/SSL_CTX_new.html +--- + test/openssl/test_ssl_session.rb | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb +index 8066ef1..2f3e578 100644 +--- a/test/openssl/test_ssl_session.rb ++++ b/test/openssl/test_ssl_session.rb +@@ -273,7 +273,7 @@ __EOS__ + + def test_ctx_client_session_cb + called = {} +- ctx = OpenSSL::SSL::SSLContext.new("SSLv3") ++ ctx = OpenSSL::SSL::SSLContext.new + ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT + + ctx.session_new_cb = lambda { |ary| +@@ -345,7 +345,7 @@ __EOS__ + last_client_session = nil + 3.times do + sock = TCPSocket.new("127.0.0.1", port) +- ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new("SSLv3")) ++ ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new(:SSLv23_server)) + ssl.sync_close = true + ssl.session = last_client_session if last_client_session + ssl.connect +-- +1.9.3 + diff --git a/ruby.spec b/ruby.spec index ec213ea..7ca58fd 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 1 -%global teeny_version 4 +%global teeny_version 5 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 24 +%global release 25 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -106,6 +106,9 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# Test are broken due to SSLv3 disabled in Fedora. +# https://bugs.ruby-lang.org/issues/10046 +Patch7: ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -366,6 +369,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -566,6 +570,10 @@ sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exce sed -i '/assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher))/i \ next if /wrap/ =~ name' test/openssl/test_cipher.rb +# Test is broken due to SSLv3 disabled in Fedora. +# https://bugs.ruby-lang.org/issues/10046 +sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -862,6 +870,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Nov 20 2014 V鱈t Ondruch - 2.1.5-25 +- Update to Ruby 2.1.5. + * Fri Oct 31 2014 V鱈t Ondruch - 2.1.4-24 - Update to Ruby 2.1.4. - Include only vendor directories, not their content (rhbz#1114071). diff --git a/sources b/sources index 0edbf6f..2f388ee 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f4136e781d261e3cc20748005e1740b7 ruby-2.1.4.tar.bz2 +a7c3e5fec47eff23091b566e9e1dac1b ruby-2.1.5.tar.bz2 From de383e754884510ca50122b248f8fbbff496a7f2 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 26 Dec 2014 16:53:38 -0700 Subject: [PATCH 402/529] Disbable sse2 on i668 (bug #1101811) --- ruby-nosse2.patch | 41 +++++++++++++++++++++++++++++++++++++++++ ruby.spec | 9 ++++++++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 ruby-nosse2.patch diff --git a/ruby-nosse2.patch b/ruby-nosse2.patch new file mode 100644 index 0000000..9df25dd --- /dev/null +++ b/ruby-nosse2.patch @@ -0,0 +1,41 @@ +diff -up ruby-2.1.5/configure.in.nosse2 ruby-2.1.5/configure.in +--- ruby-2.1.5/configure.in.nosse2 2014-12-26 16:31:57.696889054 -0700 ++++ ruby-2.1.5/configure.in 2014-12-26 16:32:25.187718930 -0700 +@@ -860,22 +860,6 @@ if test "$GCC" = yes; then + for oflag in -fno-fast-math; do + RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)]) + done +- AS_CASE(["$target"], +- [*-darwin*], [ +- # doesn't seem necessary on Mac OS X +- ], +- [[i[4-6]86*|i386*mingw*]], [ +- RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [ +- RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse) +- ]) +- AS_CASE(["$XCFLAGS"], +- [[*-msse2*]], [ +- RUBY_TRY_CFLAGS(-mstackrealign, [ +- RUBY_APPEND_OPTION(XCFLAGS, -mstackrealign) +- ]) +- ]) +- ] +- ) + fi + + AC_ARG_WITH(opt-dir, +diff -up ruby-2.1.5/test/ruby/test_sprintf.rb.nosse2 ruby-2.1.5/test/ruby/test_sprintf.rb +--- ruby-2.1.5/test/ruby/test_sprintf.rb.nosse2 2014-09-03 09:25:51.000000000 -0600 ++++ ruby-2.1.5/test/ruby/test_sprintf.rb 2014-12-26 16:31:57.699889035 -0700 +@@ -194,8 +194,9 @@ class TestSprintf < Test::Unit::TestCase + sprintf("%20.0f", 36893488147419107329.0)) + assert_equal(" Inf", sprintf("% 0e", 1.0/0.0), "moved from btest/knownbug") + assert_equal(" -0.", sprintf("%#10.0f", -0.5), "[ruby-dev:42552]") +- assert_equal("0x1p+2", sprintf('%.0a', Float('0x1.fp+1')), "[ruby-dev:42551]") +- assert_equal("-0x1.0p+2", sprintf('%.1a', Float('-0x1.ffp+1')), "[ruby-dev:42551]") ++ # out of spec ++ #assert_equal("0x1p+2", sprintf('%.0a', Float('0x1.fp+1')), "[ruby-dev:42551]") ++ #assert_equal("-0x1.0p+2", sprintf('%.1a', Float('-0x1.ffp+1')), "[ruby-dev:42551]") + end + + def test_float_hex diff --git a/ruby.spec b/ruby.spec index 7ca58fd..9329c39 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 25 +%global release 26 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.2.2 @@ -109,6 +109,9 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Test are broken due to SSLv3 disabled in Fedora. # https://bugs.ruby-lang.org/issues/10046 Patch7: ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch +# Disable sse2, already applied upstream +# https://bugzilla.redhat.com/show_bug.cgi?id=1101811 +Patch8: ruby-nosse2.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -370,6 +373,7 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -870,6 +874,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Dec 26 2014 Orion Poplwski - 2.1.5-26 +- Disbable sse2 on i668 (bug #1101811) + * Thu Nov 20 2014 V鱈t Ondruch - 2.1.5-25 - Update to Ruby 2.1.5. From 9195984ef3a89b856569605333bce28c5454bd47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 15 Jan 2015 09:47:15 +0100 Subject: [PATCH 403/529] Upgrade to Ruby 2.2.0. - Explicitly list RubyGems directories to avoid accidentaly packaged content. - Split test-unit and power_assert gems into separate sub-packages. - Drop libdb dependency in favor of gdbm. --- ruby-1.9.3-mkmf-verbose.patch | 2 +- ruby-1.9.3.p195-fix-webrick-tests.patch | 25 -- ...-additional-preludes-by-configuratio.patch | 23 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 10 +- ruby-2.1.0-always-use-i386.patch | 4 +- ruby-2.1.0-custom-rubygems-location.patch | 24 +- ...0-Don-t-use-obsolete-SSLv3-for-tests.patch | 38 --- ruby.spec | 224 +++++++++--------- sources | 2 +- test_systemtap.rb | 9 + 11 files changed, 161 insertions(+), 202 deletions(-) delete mode 100644 ruby-1.9.3.p195-fix-webrick-tests.patch delete mode 100644 ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch create mode 100644 test_systemtap.rb diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 120ee37..13148ce 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1829,7 +1829,7 @@ SRC +@@ -1858,7 +1858,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-1.9.3.p195-fix-webrick-tests.patch b/ruby-1.9.3.p195-fix-webrick-tests.patch deleted file mode 100644 index 3b2d6e7..0000000 --- a/ruby-1.9.3.p195-fix-webrick-tests.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2db9ad4a090d0c82e30afa44c623e3c5c99f7a37 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Mon, 19 Nov 2012 14:37:28 +0100 -Subject: [PATCH] Fix WEBrick tests. - ---- - test/runner.rb | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/test/runner.rb b/test/runner.rb -index 94beb44..db4dfe9 100644 ---- a/test/runner.rb -+++ b/test/runner.rb -@@ -2,6 +2,8 @@ require 'rbconfig' - - require 'test/unit' - -+require_relative 'ruby/envutil' -+ - src_testdir = File.dirname(File.realpath(__FILE__)) - $LOAD_PATH << src_testdir - module Gem --- -1.8.3.1 - diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 6a425ea..b30ad4f 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -4,41 +4,42 @@ Date: Fri, 4 Oct 2013 22:13:11 +0200 Subject: [PATCH] Allow to specify addition preludes by configuration option. --- - Makefile.in | 1 + + Makefile.in | 2 ++ common.mk | 2 +- configure.in | 7 +++++++ - 3 files changed, 9 insertions(+), 1 deletion(-) + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 7e8ed82..7916993 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -114,6 +114,7 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ +@@ -114,6 +114,8 @@ XRUBY_LIBDIR = @XRUBY_LIBDIR@ + XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ - DEFAULT_PRELUDES = $(GEM_PRELUDE) +OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ - ++ #### End of system configuration section. #### + MAJOR= @MAJOR@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -109,7 +109,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) - +@@ -115,7 +115,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) + DEFAULT_PRELUDES = $(GEM_PRELUDE) -PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) +PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) - GEM_PRELUDE = $(srcdir)/gem_prelude.rb - PRELUDES = prelude.c miniprelude.c - GOLFPRELUDES = golf_prelude.c + GEM_PRELUDE = $(srcdir)/gem_prelude.rb + PRELUDES = {$(srcdir)}prelude.c {$(srcdir)}miniprelude.c + GOLFPRELUDES = {$(srcdir)}golf_prelude.c diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -3914,6 +3914,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4160,6 +4160,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 4a4919c..6863f07 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3143,6 +3143,11 @@ if test ${multiarch+set}; then +@@ -3379,6 +3379,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 89f5890..570d4d7 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index 17ed3ed..5843651 100644 --- a/configure.in +++ b/configure.in -@@ -3718,8 +3718,6 @@ AS_CASE(["$target_os"], +@@ -3966,8 +3966,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -23,7 +23,7 @@ index 17ed3ed..5843651 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3749,6 +3747,7 @@ AC_ARG_WITH(ruby-version, +@@ -3997,6 +3995,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -31,7 +31,7 @@ index 17ed3ed..5843651 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -3765,30 +3764,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -4013,30 +4012,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" eval $ruby_version elif test -z "${ruby_version}"; then @@ -39,7 +39,7 @@ index 17ed3ed..5843651 100644 + unset ruby_version_suffix + AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1) else - RUBY_LIB_VERSION="\"${ruby_version}\"" + RUBY_LIB_VERSION="${ruby_version}" fi AC_SUBST(RUBY_LIB_VERSION_STYLE) AC_SUBST(RUBY_LIB_VERSION) @@ -113,7 +113,7 @@ diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 07076d4..35e6c3c 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb -@@ -121,7 +121,7 @@ File.foreach "config.status" do |line| +@@ -123,7 +123,7 @@ File.foreach "config.status" do |line| val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump case name when /^prefix$/ diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 78e9697..210adb1 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -3830,6 +3830,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4078,6 +4078,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl @@ -19,7 +19,7 @@ index 553d4d0..03a4152 100644 + if test "${universal_binary-no}" = yes ; then arch="universal-${target_os}" - AC_CACHE_CHECK(whether __ARCHITECTURE__ is available, rb_cv_architecture_available, + if test "${rb_cv_architecture_available}" = yes; then -- 1.8.3.1 diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 55c7448..41de23f 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Allow to install RubyGems into custom location, outside of Ruby tree. --- - configure.in | 5 +++++ - loadpath.c | 4 ++++ - template/verconf.h.in | 3 +++ - tool/rbinstall.rb | 9 +++++++++ + configure.in | 5 +++++ + loadpath.c | 4 ++++ + template/verconf.h.tmpl | 3 +++ + tool/rbinstall.rb | 9 +++++++++ 4 files changed, 21 insertions(+) diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -3804,6 +3804,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4052,6 +4052,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -3827,6 +3831,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4075,6 +4079,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -49,10 +49,10 @@ index 623dc9d..74c5d9e 100644 RUBY_LIB "\0" #ifdef RUBY_THINARCH RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0" -diff --git a/template/verconf.h.in b/template/verconf.h.in +diff --git a/template/verconf.h.tmpl b/template/verconf.h.tmpl index 79c003e..34f2382 100644 ---- a/template/verconf.h.in -+++ b/template/verconf.h.in +--- a/template/verconf.h.tmpl ++++ b/template/verconf.h.tmpl @@ -34,6 +34,9 @@ % if C["RUBY_SEARCH_PATH"] #define RUBY_SEARCH_PATH "${RUBY_SEARCH_PATH}" @@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -324,6 +324,7 @@ sitelibdir = CONFIG["sitelibdir"] +@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"] sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -512,7 +513,15 @@ end +@@ -505,7 +506,15 @@ end install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[README* *.txt *.rdoc *.gemspec] @@ -90,7 +90,7 @@ index b47b6e1..0b99408 100755 + end end - install?(:local, :arch, :lib) do + install?(:local, :comm, :hdr, :'comm-hdr') do -- 1.8.3.1 diff --git a/ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch b/ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch deleted file mode 100644 index 3ad6520..0000000 --- a/ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 75ca3a364e2e35a53a385eab08bebdcb08baeace Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Fri, 21 Nov 2014 16:02:52 +0100 -Subject: [PATCH] Don't use obsolete SSLv3 for tests. - -SSLv23 should be the most liberal settings according to upstream -documentation: - -https://www.openssl.org/docs/ssl/SSL_CTX_new.html ---- - test/openssl/test_ssl_session.rb | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/test/openssl/test_ssl_session.rb b/test/openssl/test_ssl_session.rb -index 8066ef1..2f3e578 100644 ---- a/test/openssl/test_ssl_session.rb -+++ b/test/openssl/test_ssl_session.rb -@@ -273,7 +273,7 @@ __EOS__ - - def test_ctx_client_session_cb - called = {} -- ctx = OpenSSL::SSL::SSLContext.new("SSLv3") -+ ctx = OpenSSL::SSL::SSLContext.new - ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT - - ctx.session_new_cb = lambda { |ary| -@@ -345,7 +345,7 @@ __EOS__ - last_client_session = nil - 3.times do - sock = TCPSocket.new("127.0.0.1", port) -- ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new("SSLv3")) -+ ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new(:SSLv23_server)) - ssl.sync_close = true - ssl.session = last_client_session if last_client_session - ssl.connect --- -1.9.3 - diff --git a/ruby.spec b/ruby.spec index 9329c39..cfe4cc6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,16 +1,16 @@ %global major_version 2 -%global minor_version 1 -%global teeny_version 5 +%global minor_version 2 +%global teeny_version 0 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -#%%global milestone preview2 +#%%global milestone rc1 # Keep the revision enabled for pre-releases from SVN. -#%%global revision 44362 +#%%global revision 48936 %global ruby_archive %{name}-%{ruby_version} @@ -21,10 +21,10 @@ %endif -%global release 26 +%global release 1 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.2.2 +%global rubygems_version 2.4.5 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. @@ -34,13 +34,15 @@ # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version} -%global bigdecimal_version 1.2.4 -%global io_console_version 0.4.2 +%global bigdecimal_version 1.2.6 +%global io_console_version 0.4.3 %global json_version 1.8.1 -%global minitest_version 4.7.5 -%global psych_version 2.0.5 -%global rake_version 10.1.0 -%global rdoc_version 4.1.0 +%global minitest_version 5.4.3 +%global power_assert_version 0.2.2 +%global psych_version 2.0.8 +%global rake_version 10.4.2 +%global rdoc_version 4.2.0 +%global test_unit_version 3.0.8 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -62,7 +64,7 @@ Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, ... License: (Ruby or BSD) and Public Domain URL: http://ruby-lang.org/ -Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.bz2 +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz Source1: operating_system.rb # TODO: Try to push SystemTap support upstream. Source2: libruby.stp @@ -79,6 +81,8 @@ Source7: config.h Source8: rubygems.attr Source9: rubygems.req Source10: rubygems.prov +# SystemTap sanity test case. +Source11: test_systemtap.rb # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -94,11 +98,8 @@ Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. Patch2: ruby-2.1.0-always-use-i386.patch -# Fixes random WEBRick test failures. -# https://bugs.ruby-lang.org/issues/6573. -Patch3: ruby-1.9.3.p195-fix-webrick-tests.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. -# http://redmine.ruby-lang.org/issues/5617 +# http://bugs.ruby-lang.org/issues/5617 Patch4: ruby-2.1.0-custom-rubygems-location.patch # Make mkmf verbose by default Patch5: ruby-1.9.3-mkmf-verbose.patch @@ -106,12 +107,6 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# Test are broken due to SSLv3 disabled in Fedora. -# https://bugs.ruby-lang.org/issues/10046 -Patch7: ruby-2.2.0-Don-t-use-obsolete-SSLv3-for-tests.patch -# Disable sse2, already applied upstream -# https://bugzilla.redhat.com/show_bug.cgi?id=1101811 -Patch8: ruby-nosse2.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -123,7 +118,6 @@ Requires: rubygem(bigdecimal) >= %{bigdecimal_version} BuildRequires: autoconf BuildRequires: gdbm-devel -BuildRequires: libdb-devel BuildRequires: libffi-devel BuildRequires: openssl-devel BuildRequires: libyaml-devel @@ -175,6 +169,8 @@ Group: Development/Libraries License: Ruby or MIT Requires: ruby(release) Requires: rubygem(rdoc) >= %{rdoc_version} +# TODO: This seems to be optional now. +# https://github.com/rubygems/rubygems/commit/68da16dd7508c5c4010bfe32f99422568d3d582f Requires: rubygem(io-console) >= %{io_console_version} Requires: rubygem(psych) >= %{psych_version} Provides: gem = %{version}-%{release} @@ -334,6 +330,22 @@ minitest/pride shows pride in testing and adds coloring to your test output. +# The Summary/Description fields are rather poor. +# https://github.com/k-tsj/power_assert/issues/3 +%package -n rubygem-power_assert +Summary: Power Assert for Ruby +Version: %{power_assert_version} +Group: Development/Libraries +License: Ruby or BSD +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(power_assert) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-power_assert +Power Assert for Ruby. + + %package -n rubygem-psych Summary: A libyaml wrapper for Ruby Version: %{psych_version} @@ -349,8 +361,25 @@ libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting capabilities. In addition to wrapping libyaml, Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format. -# TODO: -# %%pacakge -n rubygem-test-unit + +# The Summary/Description fields are rather poor. +# https://github.com/test-unit/test-unit/issues/73 +%package -n rubygem-test-unit +Summary: Improved version of Test::Unit bundled in Ruby 1.8.x +Version: %{test_unit_version} +Group: Development/Libraries +# lib/test/unit/diff.rb is a double license of the Ruby license and PSF license. +# lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later. +License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPLv2+) +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(test-unit) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-test-unit +Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit +bundled in Ruby 1.8.x had not been improved but unbundled +Test::Unit (test-unit) is improved actively. %package tcltk @@ -365,15 +394,16 @@ Tcl/Tk interface for the object-oriented scripting language Ruby. %prep %setup -q -n %{ruby_archive} +# Remove bundled libraries to be sure they are not used. +rm -rf ext/psych/yaml +rm -rf ext/fiddle/libffi* + %patch0 -p1 %patch1 -p1 %patch2 -p1 -%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 -%patch8 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -407,6 +437,10 @@ autoconf --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ +# Avoid regeneration of prelude.c due to patch6 applied to common.mk. +# https://bugs.ruby-lang.org/issues/10554 +touch prelude.c + # Q= makes the build output more verbose and allows to check Fedora # compiler options. make %{?_smp_mflags} COPY="cp -p" Q= @@ -432,12 +466,14 @@ for cert in \ Class3PublicPrimaryCertificationAuthority.pem \ DigiCertHighAssuranceEVRootCA.pem \ EntrustnetSecureServerCertificationAuthority.pem \ - GeoTrustGlobalCA.pem + GeoTrustGlobalCA.pem \ + AddTrustExternalCARoot.pem \ + AddTrustExternalCARoot-2048.pem do rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert done -# Move macros file insto proper place and replace the %%{name} macro, since it +# Move macros file into proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d install -m 644 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby @@ -496,22 +532,14 @@ mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_vers mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/ mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications -mkdir -p %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib -mv %{buildroot}%{ruby_libdir}/minitest %{buildroot}%{gem_dir}/gems/minitest-%{minitest_version}/lib -mv %{buildroot}%{gem_dir}/specifications/default/minitest-%{minitest_version}.gemspec %{buildroot}%{gem_dir}/specifications - mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version} mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/ mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications -# The links should replace directory, which RPM cannot handle and it is causing -# issues during upgrade from F18 to F19. As a workaround the links are placed -# into vendor direcories. This could be changed back as soon as F18 is EOLed. -# https://bugzilla.redhat.com/show_bug.cgi?id=988490 -ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_vendorlibdir}/psych -ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_vendorlibdir}/psych.rb -ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_vendorarchdir}/psych.so +ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir}/psych +ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb +ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_libarchdir}/psych.so # Adjust the gemspec files so that the gems will load properly sed -i '/^end$/ i\ @@ -532,9 +560,6 @@ sed -i '/^end$/ i\ s.require_paths = ["lib"]\ s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec -sed -i '/^end$/ i\ - s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec - # Install a tapset and fix up the path to the library. mkdir -p %{buildroot}%{tapset_dir} sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ @@ -543,31 +568,16 @@ sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp %check -DISABLE_TESTS="" +# Sanity check that SystemTap (dtrace) was detected. +make runruby TESTRUN_SCRIPT=%{SOURCE11} -%ifarch armv7l armv7hl armv7hnl -# test_call_double(DL::TestDL) fails on ARM HardFP -# http://bugs.ruby-lang.org/issues/6592 -DISABLE_TESTS="-x test_dl2.rb $DISABLE_TESTS" -%endif +DISABLE_TESTS="" # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). touch abrt.rb -# TestSignal#test_hup_me hangs up the test suite. -# http://bugs.ruby-lang.org/issues/8997 -sed -i '/def test_hup_me/,/end if Process.respond_to/ s/^/#/' test/ruby/test_signal.rb - -# Fix "Could not find 'minitest'" error. -# http://bugs.ruby-lang.org/issues/9259 -sed -i "/^ gem 'minitest', '~> 4.0'/ s/^/#/" lib/rubygems/test_case.rb - -# Segmentation fault. -# https://bugs.ruby-lang.org/issues/9198 -sed -i '/^ def test_machine_stackoverflow/,/^ end/ s/^/#/' test/ruby/test_exception.rb - # Don't test wrap ciphers to prevent "OpenSSL::Cipher::CipherError: wrap mode # not allowed" error. # https://bugs.ruby-lang.org/issues/10229 @@ -576,6 +586,7 @@ sed -i '/assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher) # Test is broken due to SSLv3 disabled in Fedora. # https://bugs.ruby-lang.org/issues/10046 +sed -i '/def test_ctx_client_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb make check TESTS="-v $DISABLE_TESTS" @@ -585,13 +596,13 @@ make check TESTS="-v $DISABLE_TESTS" %postun libs -p /sbin/ldconfig %files +%doc BSDL %doc COPYING %lang(ja) %doc COPYING.ja %doc GPL %doc LEGAL %{_bindir}/erb %{_bindir}/%{name}%{?with_rubypick:-mri} -%{_bindir}/testrb %{_mandir}/man1/erb* %{_mandir}/man1/ruby* @@ -599,7 +610,9 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{_libdir}/libruby-static.a %files devel -%doc COPYING* +%doc BSDL +%doc COPYING +%lang(ja) %doc COPYING.ja %doc GPL %doc LEGAL %doc README.EXT @@ -616,8 +629,8 @@ make check TESTS="-v $DISABLE_TESTS" %lang(ja) %doc COPYING.ja %doc GPL %doc LEGAL -%doc README -%lang(ja) %doc README.ja +%doc README.md +%lang(ja) %doc README.ja.md %doc NEWS %doc doc/NEWS-* # Exclude /usr/local directory since it is supposed to be managed by @@ -635,10 +648,9 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{ruby_libdir}/irb.rb %exclude %{ruby_libdir}/tcltk.rb %exclude %{ruby_libdir}/tk*.rb +%exclude %{ruby_libdir}/psych.rb %{ruby_libdir}/cgi -%{ruby_libdir}/date %{ruby_libdir}/digest -%{ruby_libdir}/dl %{ruby_libdir}/drb %{ruby_libdir}/fiddle %exclude %{ruby_libdir}/irb @@ -654,9 +666,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/rss %{ruby_libdir}/shell %{ruby_libdir}/syslog -%{ruby_libdir}/test %exclude %{ruby_libdir}/tk %exclude %{ruby_libdir}/tkextlib +%{ruby_libdir}/unicode_normalize %{ruby_libdir}/uri %{ruby_libdir}/webrick %{ruby_libdir}/xmlrpc @@ -676,9 +688,6 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/digest/rmd160.so %{ruby_libarchdir}/digest/sha1.so %{ruby_libarchdir}/digest/sha2.so -%dir %{ruby_libarchdir}/dl -%{ruby_libarchdir}/dl.so -%{ruby_libarchdir}/dl/callback.so %dir %{ruby_libarchdir}/enc %{ruby_libarchdir}/enc/big5.so %{ruby_libarchdir}/enc/cp949.so @@ -768,37 +777,24 @@ make check TESTS="-v $DISABLE_TESTS" %{tapset_root} -# TODO rubygems 2.0.0 does not create test-unit gemspec -# TODO for now put this in ruby-libs rpm -# TODO check if the following can be removed after -# TODO test-unit rebuild -%dir %{gem_dir} -%dir %{gem_dir}/specifications -%dir %{gem_dir}/specifications/default -%{gem_dir}/specifications/default/test-unit-*.gemspec - %files -n rubygems %{_bindir}/gem %{rubygems_dir} -%{gem_dir} -%exclude %{gem_dir}/gems/* -%{_exec_prefix}/lib*/gems -%exclude %{_exec_prefix}/lib*/gems/%{name}/bigdecimal-%{bigdecimal_version} -%exclude %{_exec_prefix}/lib*/gems/%{name}/io-console-%{io_console_version} -%exclude %{_exec_prefix}/lib*/gems/%{name}/json-%{json_version} -%exclude %{_exec_prefix}/lib*/gems/%{name}/psych-%{psych_version} -%exclude %{gem_dir}/gems/rake-%{rake_version} -%exclude %{gem_dir}/gems/rdoc-%{rdoc_version} -%exclude %{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec -%exclude %{gem_dir}/specifications/io-console-%{io_console_version}.gemspec -%exclude %{gem_dir}/specifications/json-%{json_version}.gemspec -%exclude %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec -%exclude %{gem_dir}/specifications/rake-%{rake_version}.gemspec -%exclude %{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec -%exclude %{gem_dir}/specifications/psych-%{psych_version}.gemspec -# TODO rubygems 2.0.0 does not create test-unit gemspec -# TODO where to put test-unit-*.gemspec?? -%exclude %{gem_dir}/specifications/default/test-unit-*.gemspec + +# Explicitly include only RubyGems directory strucure to avoid accidentally +# packaged content. +%dir %{gem_dir} +%dir %{gem_dir}/build_info +%dir %{gem_dir}/cache +%dir %{gem_dir}/doc +%dir %{gem_dir}/extensions +%dir %{gem_dir}/gems +%dir %{gem_dir}/specifications +%dir %{gem_dir}/specifications/default +%dir %{_exec_prefix}/lib*/gems +%dir %{_exec_prefix}/lib*/gems/ruby + +%exclude %{gem_dir}/cache/* %files -n rubygems-devel %{_rpmconfigdir}/macros.d/macros.rubygems @@ -826,8 +822,8 @@ make check TESTS="-v $DISABLE_TESTS" %{_mandir}/man1/ri* %files doc -%doc README -%lang(ja) %doc README.ja +%doc README.md +%lang(ja) %doc README.ja.md %doc ChangeLog %doc doc/ChangeLog-* %doc ruby-exercise.stp @@ -854,16 +850,26 @@ make check TESTS="-v $DISABLE_TESTS" %files -n rubygem-minitest %{gem_dir}/gems/minitest-%{minitest_version} +%exclude %{gem_dir}/gems/minitest-%{minitest_version}/.* %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec +%files -n rubygem-power_assert +%{gem_dir}/gems/power_assert-%{power_assert_version} +%exclude %{gem_dir}/gems/power_assert-%{power_assert_version}/.* +%{gem_dir}/specifications/power_assert-%{power_assert_version}.gemspec + %files -n rubygem-psych -%{ruby_vendorlibdir}/psych -%{ruby_vendorlibdir}/psych.rb -%{ruby_vendorarchdir}/psych.so +%{ruby_libdir}/psych +%{ruby_libdir}/psych.rb +%{ruby_libarchdir}/psych.so %{_libdir}/gems/%{name}/psych-%{psych_version} %{gem_dir}/gems/psych-%{psych_version} %{gem_dir}/specifications/psych-%{psych_version}.gemspec +%files -n rubygem-test-unit +%{gem_dir}/gems/test-unit-%{test_unit_version} +%{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec + %files tcltk %{ruby_libdir}/*-tk.rb %{ruby_libdir}/tcltk.rb @@ -874,6 +880,12 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Jan 02 2015 V鱈t Ondruch - 2.2.0-1 +- Upgrade to Ruby 2.2.0. +- Explicitly list RubyGems directories to avoid accidentaly packaged content. +- Split test-unit and power_assert gems into separate sub-packages. +- Drop libdb dependency in favor of gdbm. + * Fri Dec 26 2014 Orion Poplwski - 2.1.5-26 - Disbable sse2 on i668 (bug #1101811) diff --git a/sources b/sources index 2f388ee..3d0ea17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a7c3e5fec47eff23091b566e9e1dac1b ruby-2.1.5.tar.bz2 +54b43c6c6c9dd4c4b08ceb03ad0ded7a ruby-2.2.0.tar.xz diff --git a/test_systemtap.rb b/test_systemtap.rb new file mode 100644 index 0000000..aa8df4e --- /dev/null +++ b/test_systemtap.rb @@ -0,0 +1,9 @@ +require 'rbconfig' + +if RbConfig::CONFIG.select {|k, v| v =~ /dtrace/}.size == 1 + exit true +else + puts 'ERROR: SystemTap (dtrace) support was not detected.' + + exit false +end From 11e59a1355e68bf6dfeeb347ab33a42f1de384ef Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Thu, 15 Jan 2015 20:27:34 +0900 Subject: [PATCH 404/529] Bump release to avoid EVR issue on rubygem-test-unit --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index cfe4cc6..d27d0d4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 1 +%global release 3 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -880,6 +880,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Jan 15 2015 Mamoru TASAKA - 2.2.0-3 +- Bump release to avoid EVR issue on rubygem-test-unit + * Fri Jan 02 2015 V鱈t Ondruch - 2.2.0-1 - Upgrade to Ruby 2.2.0. - Explicitly list RubyGems directories to avoid accidentaly packaged content. From 8dd648e75408479f6af1bb1c4c22919d45031ca1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 29 Jan 2015 09:11:51 +0100 Subject: [PATCH 405/529] Add missing rubygem-test-unit dependency on rubygem-power_assert. --- .gitignore | 1 + ruby.spec | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9c1eabd..8df0b48 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /ruby-2.*.tar.bz2 +/ruby-2.2.0.tar.xz diff --git a/ruby.spec b/ruby.spec index d27d0d4..2783914 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 3 +%global release 4 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -373,6 +373,7 @@ Group: Development/Libraries License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPLv2+) Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} +Requires: rubygem(power_assert) Provides: rubygem(test-unit) = %{version}-%{release} BuildArch: noarch @@ -880,6 +881,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Jan 29 2015 V鱈t Ondruch - 2.2.0-4 +- Add missing rubygem-test-unit dependency on rubygem-power_assert. + * Thu Jan 15 2015 Mamoru TASAKA - 2.2.0-3 - Bump release to avoid EVR issue on rubygem-test-unit From c5abc51c7c15c610d415d76cc765682c4a14d415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 29 Jan 2015 09:12:45 +0100 Subject: [PATCH 406/529] Remove useless nosse2 patch. --- ruby-nosse2.patch | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 ruby-nosse2.patch diff --git a/ruby-nosse2.patch b/ruby-nosse2.patch deleted file mode 100644 index 9df25dd..0000000 --- a/ruby-nosse2.patch +++ /dev/null @@ -1,41 +0,0 @@ -diff -up ruby-2.1.5/configure.in.nosse2 ruby-2.1.5/configure.in ---- ruby-2.1.5/configure.in.nosse2 2014-12-26 16:31:57.696889054 -0700 -+++ ruby-2.1.5/configure.in 2014-12-26 16:32:25.187718930 -0700 -@@ -860,22 +860,6 @@ if test "$GCC" = yes; then - for oflag in -fno-fast-math; do - RUBY_TRY_CFLAGS($oflag, [RUBY_APPEND_OPTION(optflags, $oflag)]) - done -- AS_CASE(["$target"], -- [*-darwin*], [ -- # doesn't seem necessary on Mac OS X -- ], -- [[i[4-6]86*|i386*mingw*]], [ -- RUBY_TRY_CFLAGS(-msse2 -mfpmath=sse, [ -- RUBY_APPEND_OPTION(XCFLAGS, -msse2 -mfpmath=sse) -- ]) -- AS_CASE(["$XCFLAGS"], -- [[*-msse2*]], [ -- RUBY_TRY_CFLAGS(-mstackrealign, [ -- RUBY_APPEND_OPTION(XCFLAGS, -mstackrealign) -- ]) -- ]) -- ] -- ) - fi - - AC_ARG_WITH(opt-dir, -diff -up ruby-2.1.5/test/ruby/test_sprintf.rb.nosse2 ruby-2.1.5/test/ruby/test_sprintf.rb ---- ruby-2.1.5/test/ruby/test_sprintf.rb.nosse2 2014-09-03 09:25:51.000000000 -0600 -+++ ruby-2.1.5/test/ruby/test_sprintf.rb 2014-12-26 16:31:57.699889035 -0700 -@@ -194,8 +194,9 @@ class TestSprintf < Test::Unit::TestCase - sprintf("%20.0f", 36893488147419107329.0)) - assert_equal(" Inf", sprintf("% 0e", 1.0/0.0), "moved from btest/knownbug") - assert_equal(" -0.", sprintf("%#10.0f", -0.5), "[ruby-dev:42552]") -- assert_equal("0x1p+2", sprintf('%.0a', Float('0x1.fp+1')), "[ruby-dev:42551]") -- assert_equal("-0x1.0p+2", sprintf('%.1a', Float('-0x1.ffp+1')), "[ruby-dev:42551]") -+ # out of spec -+ #assert_equal("0x1p+2", sprintf('%.0a', Float('0x1.fp+1')), "[ruby-dev:42551]") -+ #assert_equal("-0x1.0p+2", sprintf('%.1a', Float('-0x1.ffp+1')), "[ruby-dev:42551]") - end - - def test_float_hex From 76bbf0976dbb90eb22dc6590cee81462844d4e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 3 Feb 2015 10:30:45 +0100 Subject: [PATCH 407/529] ConfigMap was deprecated in favor or RbConfig. https://github.com/rubygems/rubygems/commit/1d2feefde46c774947b4e6e677852b2abd4bc2a9 --- operating_system.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/operating_system.rb b/operating_system.rb index 079564f..3a21b0b 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -27,8 +27,8 @@ module Gem def default_locations @default_locations ||= { - :system => previous_but_one_dir_to(ConfigMap[:vendordir], ConfigMap[:RUBY_INSTALL_NAME]), - :local => previous_but_one_dir_to(ConfigMap[:sitedir], ConfigMap[:RUBY_INSTALL_NAME]) + :system => previous_but_one_dir_to(RbConfig::CONFIG['vendordir'], RbConfig::CONFIG['RUBY_INSTALL_NAME']), + :local => previous_but_one_dir_to(RbConfig::CONFIG['sitedir'], RbConfig::CONFIG['RUBY_INSTALL_NAME']) } end @@ -39,15 +39,15 @@ module Gem def default_dirs @libdir ||= case RUBY_PLATFORM when 'java' - ConfigMap[:datadir] + RbConfig::CONFIG['datadir'] else - ConfigMap[:libdir] + RbConfig::CONFIG['libdir'] end @default_dirs ||= Hash[default_locations.collect do |destination, path| [destination, { - :bin_dir => File.join(path, ConfigMap[:bindir].split(File::SEPARATOR).last), - :gem_dir => File.join(path, ConfigMap[:datadir].split(File::SEPARATOR).last, 'gems'), + :bin_dir => File.join(path, RbConfig::CONFIG['bindir'].split(File::SEPARATOR).last), + :gem_dir => File.join(path, RbConfig::CONFIG['datadir'].split(File::SEPARATOR).last, 'gems'), :ext_dir => File.join(path, @libdir.split(File::SEPARATOR).last, 'gems') }] end] From 329ba54c7ec5c5332f861d582fa6534db98c16d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 3 Feb 2015 13:33:29 +0100 Subject: [PATCH 408/529] Make operating_system.rb more robust. This avoids issues with incomplete rbconfig.rb such as: https://bugs.ruby-lang.org/issues/10822 --- operating_system.rb | 24 +++++++++++++++++------- ruby.spec | 5 ++++- 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/operating_system.rb b/operating_system.rb index 3a21b0b..29f223e 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -6,6 +6,8 @@ module Gem # E.g. for '/usr/share/ruby', 'ruby', it returns '/usr' def previous_but_one_dir_to(path, dir) + return unless path + split_path = path.split(File::SEPARATOR) File.join(split_path.take_while { |one_dir| one_dir !~ /^#{dir}$/ }[0..-2]) end @@ -44,13 +46,21 @@ module Gem RbConfig::CONFIG['libdir'] end - @default_dirs ||= Hash[default_locations.collect do |destination, path| - [destination, { - :bin_dir => File.join(path, RbConfig::CONFIG['bindir'].split(File::SEPARATOR).last), - :gem_dir => File.join(path, RbConfig::CONFIG['datadir'].split(File::SEPARATOR).last, 'gems'), - :ext_dir => File.join(path, @libdir.split(File::SEPARATOR).last, 'gems') - }] - end] + @default_dirs ||= Hash.new do |hash, key| + hash[key] = if path = default_locations[key] + { + :bin_dir => File.join(path, RbConfig::CONFIG['bindir'].split(File::SEPARATOR).last), + :gem_dir => File.join(path, RbConfig::CONFIG['datadir'].split(File::SEPARATOR).last, 'gems'), + :ext_dir => File.join(path, @libdir.split(File::SEPARATOR).last, 'gems') + } + else + { + :bin_dir => '', + :gem_dir => '', + :ext_dir => '' + } + end + end end ## diff --git a/ruby.spec b/ruby.spec index 2783914..371d645 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 4 +%global release 5 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -881,6 +881,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Feb 03 2015 V鱈t Ondruch - 2.2.0-5 +- Make operating_system.rb more robust. + * Thu Jan 29 2015 V鱈t Ondruch - 2.2.0-4 - Add missing rubygem-test-unit dependency on rubygem-power_assert. From c8dee5c194a8804aa4c46ecb420531c8fbee6c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 3 Feb 2015 16:19:49 +0100 Subject: [PATCH 409/529] Add RubyGems stub headers for bundled gems. --- ruby.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ruby.spec b/ruby.spec index 371d645..726c45e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -561,6 +561,16 @@ sed -i '/^end$/ i\ s.require_paths = ["lib"]\ s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec +# Push the .gemspecs through the RubyGems to let them write the stub headers. +# This speeds up loading of libraries and avoids warnings in Spring: +# https://github.com/rubygems/rubygems/pull/694 +for s in rake-%{rake_version}.gemspec rdoc-%{rdoc_version}.gemspec json-%{json_version}.gemspec; do + s="%{buildroot}%{gem_dir}/specifications/$s" + make runruby TESTRUN_SCRIPT="-rubygems \ + -e \"spec = Gem::Specification.load(%{$s})\" \ + -e \"File.write %{$s}, spec.to_ruby\"" +done + # Install a tapset and fix up the path to the library. mkdir -p %{buildroot}%{tapset_dir} sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ @@ -883,6 +893,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Tue Feb 03 2015 V鱈t Ondruch - 2.2.0-5 - Make operating_system.rb more robust. +- Add RubyGems stub headers for bundled gems. * Thu Jan 29 2015 V鱈t Ondruch - 2.2.0-4 - Add missing rubygem-test-unit dependency on rubygem-power_assert. From 351bd6cd021ebc786a163ec0812b86da5fc9d0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 4 Feb 2015 13:53:46 +0100 Subject: [PATCH 410/529] Initialize all load paths in operating_system.rb --- operating_system.rb | 8 ++++++-- ruby.spec | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/operating_system.rb b/operating_system.rb index 29f223e..ed653fd 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -46,8 +46,10 @@ module Gem RbConfig::CONFIG['libdir'] end - @default_dirs ||= Hash.new do |hash, key| - hash[key] = if path = default_locations[key] + @default_dirs ||= default_locations.inject(Hash.new) do |hash, location| + destination, path = location + + hash[destination] = if path { :bin_dir => File.join(path, RbConfig::CONFIG['bindir'].split(File::SEPARATOR).last), :gem_dir => File.join(path, RbConfig::CONFIG['datadir'].split(File::SEPARATOR).last, 'gems'), @@ -60,6 +62,8 @@ module Gem :ext_dir => '' } end + + hash end end diff --git a/ruby.spec b/ruby.spec index 726c45e..cbe32ba 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 5 +%global release 6 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -891,6 +891,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Feb 04 2015 V鱈t Ondruch - 2.2.0-6 +- Initialize all load paths in operating_system.rb. + * Tue Feb 03 2015 V鱈t Ondruch - 2.2.0-5 - Make operating_system.rb more robust. - Add RubyGems stub headers for bundled gems. From 46f541b5e60d86a3a9a1063b2f4c984ad7150b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 5 Feb 2015 17:25:22 +0100 Subject: [PATCH 411/529] Fix directory ownership. --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index cbe32ba..b4e2505 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 6 +%global release 7 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -772,6 +772,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/pty.so %dir %{ruby_libarchdir}/racc %{ruby_libarchdir}/racc/cparse.so +%dir %{ruby_libarchdir}/rbconfig %{ruby_libarchdir}/rbconfig.rb %{ruby_libarchdir}/rbconfig/sizeof.so %{ruby_libarchdir}/readline.so @@ -891,6 +892,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Feb 05 2015 V鱈t Ondruch - 2.2.0-7 +- Fix directory ownership. + * Wed Feb 04 2015 V鱈t Ondruch - 2.2.0-6 - Initialize all load paths in operating_system.rb. From 203ef6c1f774050e04c4ed53d9898838676e5c7d Mon Sep 17 00:00:00 2001 From: Till Maas Date: Sat, 21 Feb 2015 22:25:31 +0100 Subject: [PATCH 412/529] Rebuilt for Fedora 23 Change https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index b4e2505..067c837 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 7 +%global release 8 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -892,6 +892,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Sat Feb 21 2015 Till Maas - 2.2.0-8 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + * Thu Feb 05 2015 V鱈t Ondruch - 2.2.0-7 - Fix directory ownership. From 1af12992cf306213c7369fe0f4a170343a4cff61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 4 Mar 2015 11:49:19 +0100 Subject: [PATCH 413/529] Update to Ruby 2.2.1. --- .gitignore | 1 + ruby.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 8df0b48..c9945dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /ruby-2.*.tar.bz2 /ruby-2.2.0.tar.xz +/ruby-2.2.1.tar.xz diff --git a/ruby.spec b/ruby.spec index 067c837..fe486ad 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 2 -%global teeny_version 0 +%global teeny_version 1 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 8 +%global release 9 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -892,6 +892,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Mar 04 2015 V鱈t Ondruch - 2.2.1-9 +- Update to Ruby 2.2.1. + * Sat Feb 21 2015 Till Maas - 2.2.0-8 - Rebuilt for Fedora 23 Change https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code diff --git a/sources b/sources index 3d0ea17..c9ad145 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -54b43c6c6c9dd4c4b08ceb03ad0ded7a ruby-2.2.0.tar.xz +f7570579539faaa734c02e2857370298 ruby-2.2.1.tar.xz From 3db4917d37188faa60532d9ab447732d849670ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 4 Mar 2015 15:31:35 +0100 Subject: [PATCH 414/529] Enable some tests fixe in upstream. --- ruby.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ruby.spec b/ruby.spec index fe486ad..df82cbb 100644 --- a/ruby.spec +++ b/ruby.spec @@ -589,12 +589,6 @@ DISABLE_TESTS="" # the test suite). touch abrt.rb -# Don't test wrap ciphers to prevent "OpenSSL::Cipher::CipherError: wrap mode -# not allowed" error. -# https://bugs.ruby-lang.org/issues/10229 -sed -i '/assert(OpenSSL::Cipher::Cipher.new(name).is_a?(OpenSSL::Cipher::Cipher))/i \ - next if /wrap/ =~ name' test/openssl/test_cipher.rb - # Test is broken due to SSLv3 disabled in Fedora. # https://bugs.ruby-lang.org/issues/10046 sed -i '/def test_ctx_client_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb From 4a07d55953ab91ee25d434c5c9f3deea5df27e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 9 Mar 2015 17:21:07 +0100 Subject: [PATCH 415/529] License clarifications. --- ruby.spec | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index df82cbb..73caacc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -61,8 +61,11 @@ Name: ruby Version: %{ruby_version} Release: %{release_string} Group: Development/Languages -# Public Domain for example for: include/ruby/st.h, strftime.c, ... -License: (Ruby or BSD) and Public Domain +# Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ... +# MIT and CCO: ccan/* +# zlib: ext/digest/md5/md5.*, ext/nkf/nkf-utf8/nkf.c +# UCD: some of enc/trans/**/*.src +License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD URL: http://ruby-lang.org/ Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz Source1: operating_system.rb @@ -228,7 +231,8 @@ from the terminal. Summary: A tool to generate HTML and command-line documentation for Ruby projects Version: %{rdoc_version} Group: Development/Libraries -License: GPLv2 and Ruby and MIT +# SIL: lib/rdoc/generator/template/darkfish/css/fonts.css +License: GPLv2 and Ruby and MIT and SIL Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} @@ -293,7 +297,8 @@ provide higher layer features, such like curses and readline. Summary: This is a JSON implementation as a Ruby extension in C Version: %{json_version} Group: Development/Libraries -License: Ruby or GPLv2 +# UCD: ext/json/generator/generator.c +License: (Ruby or GPLv2) and UCD Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(json) = %{version}-%{release} From 4612226c7e342ee5c10f1f9350272be330146a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 11 Mar 2015 13:00:26 +0100 Subject: [PATCH 416/529] Clarify Rake's license. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 73caacc..dbda926 100644 --- a/ruby.spec +++ b/ruby.spec @@ -201,7 +201,7 @@ Macros and development tools for packaging RubyGems. Summary: Ruby based make-like utility Version: %{rake_version} Group: Development/Libraries -License: Ruby or MIT +License: MIT Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rake = %{version}-%{release} From b92051c2fd208a671d6c40d932c8410c940ef8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 23 Mar 2015 11:01:10 +0100 Subject: [PATCH 417/529] Fix libruby.so versions in SystemTap scripts (rhbz#1202232). --- ruby.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index dbda926..15ccae3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 9 +%global release 10 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -578,10 +578,10 @@ done # Install a tapset and fix up the path to the library. mkdir -p %{buildroot}%{tapset_dir} -sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{ruby_version}|" \ - %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp +sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \ + %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp # Escape '*/' in comment. -sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{ruby_version}.stp +sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp %check # Sanity check that SystemTap (dtrace) was detected. @@ -891,6 +891,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Mar 20 2015 V鱈t Ondruch - 2.2.1-10 +- Fix libruby.so versions in SystemTap scripts (rhbz#1202232). + * Wed Mar 04 2015 V鱈t Ondruch - 2.2.1-9 - Update to Ruby 2.2.1. From a0a4c7571b944e7f0277eefdd0cc9c48e0a92c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 24 Mar 2015 08:42:35 +0100 Subject: [PATCH 418/529] Workaround issues with TestIO#test_seek. --- ruby.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby.spec b/ruby.spec index 15ccae3..d2765d9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -599,6 +599,10 @@ touch abrt.rb sed -i '/def test_ctx_client_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb +# can_seek_data does not work correctly in chroot for Kernel 3.19+. +# https://bugs.ruby-lang.org/issues/10998 +sed -i '/break unless can_seek_data(f)/ s/^/#/' test/ruby/test_io.rb + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig From b9da2e689a47e432a4272b43c849a9a818965bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 24 Mar 2015 14:26:56 +0100 Subject: [PATCH 419/529] Apply upstream fix to TestIO#test_seek tests. --- ruby-2.2.1-use-statfs.patch | 158 ++++++++++++++++++++++++++++++++++++ ruby.spec | 8 +- 2 files changed, 162 insertions(+), 4 deletions(-) create mode 100644 ruby-2.2.1-use-statfs.patch diff --git a/ruby-2.2.1-use-statfs.patch b/ruby-2.2.1-use-statfs.patch new file mode 100644 index 0000000..842eb0e --- /dev/null +++ b/ruby-2.2.1-use-statfs.patch @@ -0,0 +1,158 @@ +From acae106c7c8feab92a52982976b147f1100207a5 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Tue, 24 Mar 2015 08:30:15 +0000 +Subject: [PATCH] fs.c: use statfs/statvfs + +* ext/-test-/file/fs.c (get_fsname): return filesystem name by + statfs/statvfs. [ruby-core:68624] [Bug #10998] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 5 +++ + ext/-test-/file/extconf.rb | 14 ++++++++ + ext/-test-/file/fs.c | 85 +++++++++++++++++++++++++--------------------- + 3 files changed, 66 insertions(+), 38 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index a2f2f97..d7e11af 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,8 @@ ++Tue Mar 24 17:30:12 2015 Nobuyoshi Nakada ++ ++ * ext/-test-/file/fs.c (get_fsname): return filesystem name by ++ statfs/statvfs. [ruby-core:68624] [Bug #10998] ++ + Thu Feb 26 15:48:41 2015 NAKAMURA Usaku + + * ext/win32/Win32API.rb (initialize): accept both a string and an array +diff --git a/ext/-test-/file/extconf.rb b/ext/-test-/file/extconf.rb +index 4e134dd..be4a2fb 100644 +--- a/ext/-test-/file/extconf.rb ++++ b/ext/-test-/file/extconf.rb +@@ -1,4 +1,18 @@ + $INCFLAGS << " -I$(topdir) -I$(top_srcdir)" ++ ++headers = %w[sys/param.h sys/mount.h sys/vfs.h].select {|h| have_header(h)} ++if have_type("struct statfs", headers) ++ have_struct_member("struct statfs", "f_fstypename", headers) ++ have_struct_member("struct statfs", "f_type", headers) ++end ++ ++headers = %w[sys/statvfs.h] ++if have_type("struct statvfs", headers) ++ have_struct_member("struct statvfs", "f_fstypename", headers) ++ have_struct_member("struct statvfs", "f_basetype", headers) ++ have_struct_member("struct statvfs", "f_type", headers) ++end ++ + $srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")] + inits = $srcs.map {|s| File.basename(s, ".*")} + inits.delete("init") +diff --git a/ext/-test-/file/fs.c b/ext/-test-/file/fs.c +index 4a41bf3..94d96d3 100644 +--- a/ext/-test-/file/fs.c ++++ b/ext/-test-/file/fs.c +@@ -1,55 +1,64 @@ + #include "ruby/ruby.h" + #include "ruby/io.h" + +-#ifdef __linux__ +-# define HAVE_GETMNTENT ++#ifdef HAVE_SYS_MOUNT_H ++#include ++#endif ++#ifdef HAVE_SYS_VFS_H ++#include + #endif + +-#ifdef HAVE_GETMNTENT +-# include +-# include ++#if defined HAVE_STRUCT_STATFS_F_FSTYPENAME ++typedef struct statfs statfs_t; ++# define STATFS(f, s) statfs((f), (s)) ++# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 ++#elif defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME) /* NetBSD */ ++typedef struct statvfs statfs_t; ++# define STATFS(f, s) statvfs((f), (s)) ++# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 ++#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, HP-UX, Solaris */ ++typedef struct statvfs statfs_t; ++# define STATFS(f, s) statvfs((f), (s)) ++# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 ++# define f_fstypename f_basetype ++#elif defined HAVE_STRUCT_STATFS_F_TYPE ++typedef struct statfs statfs_t; ++# define STATFS(f, s) statfs((f), (s)) ++#elif defined HAVE_STRUCT_STATVFS_F_TYPE ++typedef struct statvfs statfs_t; ++# define STATFS(f, s) statvfs((f), (s)) + #endif + + VALUE + get_fsname(VALUE self, VALUE str) + { +-#ifdef HAVE_GETMNTENT +- const char *path; +- struct mntent mntbuf; +- static const int buflen = 4096; +- char *buf = alloca(buflen); +- int len = 0; +- FILE *fp; +-#define FSNAME_LEN 100 +- char name[FSNAME_LEN] = ""; ++#ifdef STATFS ++ statfs_t st; ++# define CSTR(s) rb_str_new_cstr(s) + + FilePathValue(str); +- path = RSTRING_PTR(str); +- fp = setmntent("/etc/mtab", "r"); +- if (!fp) rb_sys_fail("setmntent(/etb/mtab)");; +- +- while (getmntent_r(fp, &mntbuf, buf, buflen)) { +- int i; +- char *mnt_dir = mntbuf.mnt_dir; +- for (i=0; mnt_dir[i]; i++) { +- if (mnt_dir[i] != path[i]) { +- goto next_entry; +- } +- } +- if (i >= len) { +- len = i; +- strlcpy(name, mntbuf.mnt_type, FSNAME_LEN); +- } +-next_entry: +- ; ++ str = rb_str_encode_ospath(str); ++ if (STATFS(StringValueCStr(str), &st) == -1) { ++ rb_sys_fail_str(str); ++ } ++# ifdef HAVE_STRUCT_STATFS_T_F_FSTYPENAME ++ if (st.f_fstypename[0]) ++ return CSTR(st.f_fstypename); ++# endif ++ switch (st.f_type) { ++ case 0x9123683E: /* BTRFS_SUPER_MAGIC */ ++ return CSTR("btrfs"); ++ case 0x7461636f: /* OCFS2_SUPER_MAGIC */ ++ return CSTR("ocfs"); ++ case 0xEF53: /* EXT2_SUPER_MAGIC EXT3_SUPER_MAGIC EXT4_SUPER_MAGIC */ ++ return CSTR("ext4"); ++ case 0x58465342: /* XFS_SUPER_MAGIC */ ++ return CSTR("xfs"); ++ case 0x01021994: /* TMPFS_MAGIC */ ++ return CSTR("tmpfs"); + } +- endmntent(fp); +- +- if (!len) rb_sys_fail("no matching entry");; +- return rb_str_new_cstr(name); +-#else +- return Qnil; + #endif ++ return Qnil; + } + + void diff --git a/ruby.spec b/ruby.spec index d2765d9..b72f53d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -110,6 +110,9 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# can_seek_data does not work correctly in chroot for Kernel 3.19+. +# https://bugs.ruby-lang.org/issues/10998 +Patch7: ruby-2.2.1-use-statfs.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -410,6 +413,7 @@ rm -rf ext/fiddle/libffi* %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -599,10 +603,6 @@ touch abrt.rb sed -i '/def test_ctx_client_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb -# can_seek_data does not work correctly in chroot for Kernel 3.19+. -# https://bugs.ruby-lang.org/issues/10998 -sed -i '/break unless can_seek_data(f)/ s/^/#/' test/ruby/test_io.rb - make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig From 05eb8b6a78d323e98f80dfd0c06bf80d03d9a2b1 Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Tue, 14 Apr 2015 09:51:46 +0200 Subject: [PATCH 420/529] Update to Ruby 2.2.2 --- .gitignore | 1 + ruby-2.2.1-use-statfs.patch | 25 ++++--------------------- ruby.spec | 7 +++++-- sources | 2 +- 4 files changed, 11 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index c9945dc..4b77c7b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /ruby-2.*.tar.bz2 /ruby-2.2.0.tar.xz /ruby-2.2.1.tar.xz +/ruby-2.2.2.tar.xz diff --git a/ruby-2.2.1-use-statfs.patch b/ruby-2.2.1-use-statfs.patch index 842eb0e..168e5d7 100644 --- a/ruby-2.2.1-use-statfs.patch +++ b/ruby-2.2.1-use-statfs.patch @@ -1,31 +1,14 @@ -From acae106c7c8feab92a52982976b147f1100207a5 Mon Sep 17 00:00:00 2001 -From: nobu -Date: Tue, 24 Mar 2015 08:30:15 +0000 -Subject: [PATCH] fs.c: use statfs/statvfs - -* ext/-test-/file/fs.c (get_fsname): return filesystem name by - statfs/statvfs. [ruby-core:68624] [Bug #10998] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 5 +++ - ext/-test-/file/extconf.rb | 14 ++++++++ - ext/-test-/file/fs.c | 85 +++++++++++++++++++++++++--------------------- - 3 files changed, 66 insertions(+), 38 deletions(-) - diff --git a/ChangeLog b/ChangeLog -index a2f2f97..d7e11af 100644 +index 909c092..9f09144 100644 --- a/ChangeLog +++ b/ChangeLog -@@ -1,3 +1,8 @@ +@@ -70,1 +70,6 @@ +Tue Mar 24 17:30:12 2015 Nobuyoshi Nakada + -+ * ext/-test-/file/fs.c (get_fsname): return filesystem name by -+ statfs/statvfs. [ruby-core:68624] [Bug #10998] ++ * ext/-test-/file/fs.c (get_fsname): return filesystem name by ++ statfs/statvfs. [ruby-core:68624] [Bug #10998] + Thu Feb 26 15:48:41 2015 NAKAMURA Usaku - - * ext/win32/Win32API.rb (initialize): accept both a string and an array diff --git a/ext/-test-/file/extconf.rb b/ext/-test-/file/extconf.rb index 4e134dd..be4a2fb 100644 --- a/ext/-test-/file/extconf.rb diff --git a/ruby.spec b/ruby.spec index b72f53d..275b7e8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 2 -%global teeny_version 1 +%global teeny_version 2 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 10 +%global release 1 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -895,6 +895,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Apr 14 2015 Josef Stribny - 2.2.2-1 +- Update to Ruby 2.2.2 + * Fri Mar 20 2015 V鱈t Ondruch - 2.2.1-10 - Fix libruby.so versions in SystemTap scripts (rhbz#1202232). diff --git a/sources b/sources index c9ad145..d24389c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f7570579539faaa734c02e2857370298 ruby-2.2.1.tar.xz +dbce9b9d79d90f213ba8d448b0b6ed86 ruby-2.2.2.tar.xz From 55367be78b062b35180fbe48a3ac4d6dd50a1072 Mon Sep 17 00:00:00 2001 From: Josef Stribny Date: Tue, 14 Apr 2015 12:13:39 +0200 Subject: [PATCH 421/529] Bump release because of gems --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 275b7e8..ca60bb3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 1 +%global release 11 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -895,6 +895,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Apr 14 2015 Josef Stribny - 2.2.2-11 +- Bump release because of gems + * Tue Apr 14 2015 Josef Stribny - 2.2.2-1 - Update to Ruby 2.2.2 From e3316c21a0b7d9fd645b7660b820783bf53f274e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 4 May 2015 17:06:56 +0200 Subject: [PATCH 422/529] Fix upgrade path. rubygem-io-console's version was recently bumped in F21 due to update of Ruby to version 2.1.6 and it makes the higher release to win. --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index ca60bb3..9aa5831 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 11 +%global release 40 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -895,6 +895,10 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon May 04 2015 V鱈t Ondruch - 2.2.2-40 +- Fix upgrade path (rubygem-io-console's version was recently bumped in F21 + and makes the higher release to win). + * Tue Apr 14 2015 Josef Stribny - 2.2.2-11 - Bump release because of gems From 4e3eb750378a8b6316c7766a1bb13649ffcd832c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 11 May 2015 12:18:15 +0200 Subject: [PATCH 423/529] Tcl/Tk switch is not needed anymore. --- ruby.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 9aa5831..ffca221 100644 --- a/ruby.spec +++ b/ruby.spec @@ -440,7 +440,6 @@ autoconf --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ --with-rubygemsdir='%{rubygems_dir}' \ --with-ruby-pc='%{name}.pc' \ - --with-tcltkversion=8.6 \ --disable-rpath \ --enable-shared \ --with-ruby-version='' \ From 3e4eba90703d793dc761c42aea9a324feffa299e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 10 Jun 2015 15:20:27 +0200 Subject: [PATCH 424/529] Fix the git BR following the git package split. --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index ffca221..9dfc587 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 40 +%global release 41 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -133,7 +133,7 @@ BuildRequires: tk-devel BuildRequires: procps BuildRequires: %{_bindir}/dtrace # RubyGems test suite optional dependencies. -BuildRequires: %{_bindir}/git +BuildRequires: git BuildRequires: %{_bindir}/cmake # This package provides %%{_bindir}/ruby-mri therefore it is marked by this @@ -894,6 +894,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Jun 10 2015 V鱈t Ondruch - 2.2.2-41 +- Fix the git BR following the git package split. + * Mon May 04 2015 V鱈t Ondruch - 2.2.2-40 - Fix upgrade path (rubygem-io-console's version was recently bumped in F21 and makes the higher release to win). From 3131d89fdee1030a9ca4d125e9c56cc56db48ba3 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 18 Jun 2015 22:37:48 +0000 Subject: [PATCH 425/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 9dfc587..68921e9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 41 +%global release 42 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -894,6 +894,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Jun 18 2015 Fedora Release Engineering - 2.2.2-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Wed Jun 10 2015 V鱈t Ondruch - 2.2.2-41 - Fix the git BR following the git package split. From d954989b453e9a1e33d931a0074fa805c1f7dea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 23 Jun 2015 13:08:50 +0200 Subject: [PATCH 426/529] Fix for "dh key too small" error of OpenSSL 1.0.2+. --- ..._remote_fetcher.rb-get-rid-of-errors.patch | 30 +++++++++++++++++++ ruby.spec | 10 ++++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch diff --git a/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch b/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch new file mode 100644 index 0000000..0427b05 --- /dev/null +++ b/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch @@ -0,0 +1,30 @@ +From 6398515adfc86813686605019a3e22d49cd95517 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Fri, 19 Jun 2015 06:04:00 +0000 +Subject: [PATCH] test_gem_remote_fetcher.rb: get rid of errors + +* test/rubygems/test_gem_remote_fetcher.rb (start_ssl_server): + temporary measure for "dh key too small" error of OpenSSL + 1.0.2c+. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/rubygems/test_gem_remote_fetcher.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb +index 6b29e18..63dd8fe 100644 +--- a/test/rubygems/test_gem_remote_fetcher.rb ++++ b/test/rubygems/test_gem_remote_fetcher.rb +@@ -898,7 +898,7 @@ gems: + server.mount_proc("/insecure_redirect") { |req, res| + res.set_redirect(WEBrick::HTTPStatus::MovedPermanently, req.query['to']) + } +- server.ssl_context.tmp_dh_callback = proc { OpenSSL::PKey::DH.new 128 } ++ server.ssl_context.tmp_dh_callback = proc {|_, _, k| OpenSSL::PKey::DH.new(k) } + t = Thread.new do + begin + server.start +-- +2.4.3 + diff --git a/ruby.spec b/ruby.spec index 68921e9..00cc467 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 42 +%global release 43 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -113,6 +113,10 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # can_seek_data does not work correctly in chroot for Kernel 3.19+. # https://bugs.ruby-lang.org/issues/10998 Patch7: ruby-2.2.1-use-statfs.patch +# Fix "dh key too small" error of OpenSSL 1.0.2c+. +# https://github.com/rubygems/rubygems/issues/1289 +# https://github.com/ruby/ruby/commit/6398515adfc86813686605019a3e22d49cd95517 +Patch8: ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -414,6 +418,7 @@ rm -rf ext/fiddle/libffi* %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -894,6 +899,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Jun 23 2015 V鱈t Ondruch - 2.2.2-43 +- Fix for "dh key too small" error of OpenSSL 1.0.2+. + * Thu Jun 18 2015 Fedora Release Engineering - 2.2.2-42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 693a96cb402ee7c698cd1bffa50d54e8660bf920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 23 Jul 2015 14:09:03 +0200 Subject: [PATCH 427/529] Fix test broken by disabled SSLv3 in OpenSSL. --- ...3-in-test-as-it-is-insecure-and-may-.patch | 25 +++++++++++++++++++ ...-when-testing-SSL-session-cache-call.patch | 23 +++++++++++++++++ ...2.3.0-fix-test-ctx-client-session-cb.patch | 13 ++++++++++ ruby.spec | 13 ++++++---- 4 files changed, 69 insertions(+), 5 deletions(-) create mode 100644 ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch create mode 100644 ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch create mode 100644 ruby-2.3.0-fix-test-ctx-client-session-cb.patch diff --git a/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch b/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch new file mode 100644 index 0000000..efd947f --- /dev/null +++ b/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch @@ -0,0 +1,25 @@ +From b9fa5fc9a14e6c889c9a0fa9c9386b2018f2314c Mon Sep 17 00:00:00 2001 +From: Jeremy Evans +Date: Fri, 17 Jul 2015 11:25:09 -0600 +Subject: [PATCH 4/8] Don't force SSLv3 in test, as it is insecure and may not + be supported + +LibreSSL disables SSLv3 by default, and there's no reason this code +should require SSLv3. + +diff --git test/openssl/test_ssl_session.rb test/openssl/test_ssl_session.rb +index 0c384c7..d4713d9 100644 +--- test/openssl/test_ssl_session.rb ++++ test/openssl/test_ssl_session.rb +@@ -355,7 +355,7 @@ __EOS__ + 3.times do + sock = TCPSocket.new("127.0.0.1", port) + begin +- ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new("SSLv3")) ++ ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new) + ssl.sync_close = true + ssl.session = last_client_session if last_client_session + ssl.connect +-- +2.4.5 + diff --git a/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch b/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch new file mode 100644 index 0000000..d5e90ae --- /dev/null +++ b/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch @@ -0,0 +1,23 @@ +From fb08c34eee2c883a01ab0dda2a2e34a290516a2a Mon Sep 17 00:00:00 2001 +From: Jeremy Evans +Date: Fri, 17 Jul 2015 11:31:45 -0600 +Subject: [PATCH 5/8] Use OP_NO_TICKET when testing SSL session cache callbacks + +This fixes the test when using LibreSSL and possibly some +configurations of OpenSSL. + +diff --git test/openssl/test_ssl_session.rb test/openssl/test_ssl_session.rb +index d4713d9..58fa20b 100644 +--- test/openssl/test_ssl_session.rb ++++ test/openssl/test_ssl_session.rb +@@ -316,6 +316,7 @@ __EOS__ + + ctx_proc = Proc.new { |ctx, ssl| + ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_SERVER ++ ctx.options = OpenSSL::SSL::OP_NO_TICKET + last_server_session = nil + + # get_cb is called whenever a client proposed to resume a session but +-- +2.4.5 + diff --git a/ruby-2.3.0-fix-test-ctx-client-session-cb.patch b/ruby-2.3.0-fix-test-ctx-client-session-cb.patch new file mode 100644 index 0000000..0757a52 --- /dev/null +++ b/ruby-2.3.0-fix-test-ctx-client-session-cb.patch @@ -0,0 +1,13 @@ +Index: test/openssl/test_ssl_session.rb +=================================================================== +--- test/openssl/test_ssl_session.rb (revision 49098) ++++ test/openssl/test_ssl_session.rb (revision 49099) +@@ -278,7 +278,7 @@ + + def test_ctx_client_session_cb + called = {} +- ctx = OpenSSL::SSL::SSLContext.new("SSLv3") ++ ctx = OpenSSL::SSL::SSLContext.new + ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT + + ctx.session_new_cb = lambda { |ary| diff --git a/ruby.spec b/ruby.spec index 00cc467..2dec272 100644 --- a/ruby.spec +++ b/ruby.spec @@ -117,6 +117,11 @@ Patch7: ruby-2.2.1-use-statfs.patch # https://github.com/rubygems/rubygems/issues/1289 # https://github.com/ruby/ruby/commit/6398515adfc86813686605019a3e22d49cd95517 Patch8: ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch +# Don't use SSLv3 for tests. +# https://bugs.ruby-lang.org/issues/10046 +Patch9: ruby-2.3.0-fix-test-ctx-client-session-cb.patch +Patch10: ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch +Patch11: ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -419,6 +424,9 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 +%patch10 +%patch11 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -602,11 +610,6 @@ DISABLE_TESTS="" # the test suite). touch abrt.rb -# Test is broken due to SSLv3 disabled in Fedora. -# https://bugs.ruby-lang.org/issues/10046 -sed -i '/def test_ctx_client_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb -sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb - make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig From b945bce4cbb1015cfbf8b2ea51e48e452ecf674e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 1 Sep 2015 14:24:51 +0200 Subject: [PATCH 428/529] Update to Ruby 2.2.3. --- .gitignore | 1 + ruby-1.9.3-mkmf-verbose.patch | 2 +- ...-additional-preludes-by-configuratio.patch | 4 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 6 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ruby-2.2.1-use-statfs.patch | 141 ------------------ ..._remote_fetcher.rb-get-rid-of-errors.patch | 30 ---- ruby.spec | 16 +- sources | 2 +- 11 files changed, 17 insertions(+), 193 deletions(-) delete mode 100644 ruby-2.2.1-use-statfs.patch delete mode 100644 ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch diff --git a/.gitignore b/.gitignore index 4b77c7b..db108f0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /ruby-2.2.0.tar.xz /ruby-2.2.1.tar.xz /ruby-2.2.2.tar.xz +/ruby-2.2.3.tar.xz diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 13148ce..0f2a742 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1858,7 +1858,7 @@ SRC +@@ -1859,7 +1859,7 @@ SRC SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index b30ad4f..6eb6122 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -26,7 +26,7 @@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -115,7 +115,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) +@@ -117,7 +117,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) DEFAULT_PRELUDES = $(GEM_PRELUDE) @@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -4160,6 +4160,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4169,6 +4169,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 6863f07..b54f8e0 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3379,6 +3379,11 @@ if test ${multiarch+set}; then +@@ -3385,6 +3385,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 570d4d7..b401158 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index 17ed3ed..5843651 100644 --- a/configure.in +++ b/configure.in -@@ -3966,8 +3966,6 @@ AS_CASE(["$target_os"], +@@ -3975,8 +3975,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -23,7 +23,7 @@ index 17ed3ed..5843651 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, -@@ -3997,6 +3995,7 @@ AC_ARG_WITH(ruby-version, +@@ -4006,6 +4004,7 @@ AC_ARG_WITH(ruby-version, [ruby_version=full]) unset RUBY_LIB_VERSION unset RUBY_LIB_VERSION_STYLE @@ -31,7 +31,7 @@ index 17ed3ed..5843651 100644 AS_CASE(["$ruby_version"], [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -4013,30 +4012,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then +@@ -4022,30 +4021,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" eval $ruby_version elif test -z "${ruby_version}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 210adb1..f8e61f5 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -4078,6 +4078,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4087,6 +4087,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 41de23f..c21c858 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -4052,6 +4052,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4061,6 +4061,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4075,6 +4079,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4084,6 +4088,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.2.1-use-statfs.patch b/ruby-2.2.1-use-statfs.patch deleted file mode 100644 index 168e5d7..0000000 --- a/ruby-2.2.1-use-statfs.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff --git a/ChangeLog b/ChangeLog -index 909c092..9f09144 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -70,1 +70,6 @@ -+Tue Mar 24 17:30:12 2015 Nobuyoshi Nakada -+ -+ * ext/-test-/file/fs.c (get_fsname): return filesystem name by -+ statfs/statvfs. [ruby-core:68624] [Bug #10998] -+ - Thu Feb 26 15:48:41 2015 NAKAMURA Usaku -diff --git a/ext/-test-/file/extconf.rb b/ext/-test-/file/extconf.rb -index 4e134dd..be4a2fb 100644 ---- a/ext/-test-/file/extconf.rb -+++ b/ext/-test-/file/extconf.rb -@@ -1,4 +1,18 @@ - $INCFLAGS << " -I$(topdir) -I$(top_srcdir)" -+ -+headers = %w[sys/param.h sys/mount.h sys/vfs.h].select {|h| have_header(h)} -+if have_type("struct statfs", headers) -+ have_struct_member("struct statfs", "f_fstypename", headers) -+ have_struct_member("struct statfs", "f_type", headers) -+end -+ -+headers = %w[sys/statvfs.h] -+if have_type("struct statvfs", headers) -+ have_struct_member("struct statvfs", "f_fstypename", headers) -+ have_struct_member("struct statvfs", "f_basetype", headers) -+ have_struct_member("struct statvfs", "f_type", headers) -+end -+ - $srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")] - inits = $srcs.map {|s| File.basename(s, ".*")} - inits.delete("init") -diff --git a/ext/-test-/file/fs.c b/ext/-test-/file/fs.c -index 4a41bf3..94d96d3 100644 ---- a/ext/-test-/file/fs.c -+++ b/ext/-test-/file/fs.c -@@ -1,55 +1,64 @@ - #include "ruby/ruby.h" - #include "ruby/io.h" - --#ifdef __linux__ --# define HAVE_GETMNTENT -+#ifdef HAVE_SYS_MOUNT_H -+#include -+#endif -+#ifdef HAVE_SYS_VFS_H -+#include - #endif - --#ifdef HAVE_GETMNTENT --# include --# include -+#if defined HAVE_STRUCT_STATFS_F_FSTYPENAME -+typedef struct statfs statfs_t; -+# define STATFS(f, s) statfs((f), (s)) -+# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 -+#elif defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME) /* NetBSD */ -+typedef struct statvfs statfs_t; -+# define STATFS(f, s) statvfs((f), (s)) -+# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 -+#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, HP-UX, Solaris */ -+typedef struct statvfs statfs_t; -+# define STATFS(f, s) statvfs((f), (s)) -+# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1 -+# define f_fstypename f_basetype -+#elif defined HAVE_STRUCT_STATFS_F_TYPE -+typedef struct statfs statfs_t; -+# define STATFS(f, s) statfs((f), (s)) -+#elif defined HAVE_STRUCT_STATVFS_F_TYPE -+typedef struct statvfs statfs_t; -+# define STATFS(f, s) statvfs((f), (s)) - #endif - - VALUE - get_fsname(VALUE self, VALUE str) - { --#ifdef HAVE_GETMNTENT -- const char *path; -- struct mntent mntbuf; -- static const int buflen = 4096; -- char *buf = alloca(buflen); -- int len = 0; -- FILE *fp; --#define FSNAME_LEN 100 -- char name[FSNAME_LEN] = ""; -+#ifdef STATFS -+ statfs_t st; -+# define CSTR(s) rb_str_new_cstr(s) - - FilePathValue(str); -- path = RSTRING_PTR(str); -- fp = setmntent("/etc/mtab", "r"); -- if (!fp) rb_sys_fail("setmntent(/etb/mtab)");; -- -- while (getmntent_r(fp, &mntbuf, buf, buflen)) { -- int i; -- char *mnt_dir = mntbuf.mnt_dir; -- for (i=0; mnt_dir[i]; i++) { -- if (mnt_dir[i] != path[i]) { -- goto next_entry; -- } -- } -- if (i >= len) { -- len = i; -- strlcpy(name, mntbuf.mnt_type, FSNAME_LEN); -- } --next_entry: -- ; -+ str = rb_str_encode_ospath(str); -+ if (STATFS(StringValueCStr(str), &st) == -1) { -+ rb_sys_fail_str(str); -+ } -+# ifdef HAVE_STRUCT_STATFS_T_F_FSTYPENAME -+ if (st.f_fstypename[0]) -+ return CSTR(st.f_fstypename); -+# endif -+ switch (st.f_type) { -+ case 0x9123683E: /* BTRFS_SUPER_MAGIC */ -+ return CSTR("btrfs"); -+ case 0x7461636f: /* OCFS2_SUPER_MAGIC */ -+ return CSTR("ocfs"); -+ case 0xEF53: /* EXT2_SUPER_MAGIC EXT3_SUPER_MAGIC EXT4_SUPER_MAGIC */ -+ return CSTR("ext4"); -+ case 0x58465342: /* XFS_SUPER_MAGIC */ -+ return CSTR("xfs"); -+ case 0x01021994: /* TMPFS_MAGIC */ -+ return CSTR("tmpfs"); - } -- endmntent(fp); -- -- if (!len) rb_sys_fail("no matching entry");; -- return rb_str_new_cstr(name); --#else -- return Qnil; - #endif -+ return Qnil; - } - - void diff --git a/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch b/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch deleted file mode 100644 index 0427b05..0000000 --- a/ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6398515adfc86813686605019a3e22d49cd95517 Mon Sep 17 00:00:00 2001 -From: nobu -Date: Fri, 19 Jun 2015 06:04:00 +0000 -Subject: [PATCH] test_gem_remote_fetcher.rb: get rid of errors - -* test/rubygems/test_gem_remote_fetcher.rb (start_ssl_server): - temporary measure for "dh key too small" error of OpenSSL - 1.0.2c+. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/rubygems/test_gem_remote_fetcher.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb -index 6b29e18..63dd8fe 100644 ---- a/test/rubygems/test_gem_remote_fetcher.rb -+++ b/test/rubygems/test_gem_remote_fetcher.rb -@@ -898,7 +898,7 @@ gems: - server.mount_proc("/insecure_redirect") { |req, res| - res.set_redirect(WEBrick::HTTPStatus::MovedPermanently, req.query['to']) - } -- server.ssl_context.tmp_dh_callback = proc { OpenSSL::PKey::DH.new 128 } -+ server.ssl_context.tmp_dh_callback = proc {|_, _, k| OpenSSL::PKey::DH.new(k) } - t = Thread.new do - begin - server.start --- -2.4.3 - diff --git a/ruby.spec b/ruby.spec index 2dec272..4b2be96 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 2 -%global teeny_version 2 +%global teeny_version 3 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 43 +%global release 44 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5 @@ -110,13 +110,6 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch -# can_seek_data does not work correctly in chroot for Kernel 3.19+. -# https://bugs.ruby-lang.org/issues/10998 -Patch7: ruby-2.2.1-use-statfs.patch -# Fix "dh key too small" error of OpenSSL 1.0.2c+. -# https://github.com/rubygems/rubygems/issues/1289 -# https://github.com/ruby/ruby/commit/6398515adfc86813686605019a3e22d49cd95517 -Patch8: ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch # Don't use SSLv3 for tests. # https://bugs.ruby-lang.org/issues/10046 Patch9: ruby-2.3.0-fix-test-ctx-client-session-cb.patch @@ -422,8 +415,6 @@ rm -rf ext/fiddle/libffi* %patch4 -p1 %patch5 -p1 %patch6 -p1 -%patch7 -p1 -%patch8 -p1 %patch9 %patch10 %patch11 @@ -902,6 +893,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Sep 01 2015 V鱈t Ondruch - 2.2.3-44 +- Update to Ruby 2.2.3. + * Tue Jun 23 2015 V鱈t Ondruch - 2.2.2-43 - Fix for "dh key too small" error of OpenSSL 1.0.2+. diff --git a/sources b/sources index d24389c..dbae8f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dbce9b9d79d90f213ba8d448b0b6ed86 ruby-2.2.2.tar.xz +2a8bc1f46aba8938add70f742e8af1ff ruby-2.2.3.tar.xz From 8e1e241814f2920089ec6850ddafa368af49f013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 2 Sep 2015 15:47:20 +0200 Subject: [PATCH 429/529] Fix RubyGems version. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 4b2be96..5d21789 100644 --- a/ruby.spec +++ b/ruby.spec @@ -24,7 +24,7 @@ %global release 44 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.4.5 +%global rubygems_version 2.4.5.1 # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. From bd75b0a7fe5f050c28474b829827f4e8d9da1e45 Mon Sep 17 00:00:00 2001 From: Michal Toman Date: Fri, 4 Sep 2015 14:23:36 +0200 Subject: [PATCH 430/529] Add support for MIPS architecture to config.h --- config.h | 8 ++++++++ ruby.spec | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/config.h b/config.h index b34e398..39e4a5c 100644 --- a/config.h +++ b/config.h @@ -44,6 +44,14 @@ #include "ruby/config-sparc.h" #elif defined(__aarch64__) #include "ruby/config-aarch64.h" +#elif defined(__mips64) && defined(__MIPSEL__) +#include "ruby/config-mips64el.h" +#elif defined(__mips64) +#include "ruby/config-mips64.h" +#elif defined(__mips) && defined(__MIPSEL__) +#include "ruby/config-mipsel.h" +#elif defined(__mips) +#include "ruby/config-mips.h" #else #error "The ruby-devel package is not usable with the architecture." #endif diff --git a/ruby.spec b/ruby.spec index 5d21789..4eeaac3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 44 +%global release 45 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -893,6 +893,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Sep 04 2015 Michal Toman - 2.2.3-45 +- Add support for MIPS architecture to config.h + * Tue Sep 01 2015 V鱈t Ondruch - 2.2.3-44 - Update to Ruby 2.2.3. From c0513dfb8c81a228619c6142195c5117aa0d1228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 10 Dec 2015 15:30:53 +0100 Subject: [PATCH 431/529] Fix ABRT hook autoloading. --- ...2.3-Generate-preludes-using-miniruby.patch | 28 +++++++++++++++++++ ruby.spec | 13 +++++---- 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 ruby-2.2.3-Generate-preludes-using-miniruby.patch diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch new file mode 100644 index 0000000..81b7c5b --- /dev/null +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -0,0 +1,28 @@ +From 9fedac991e717f0103d092275ac301e58c5cf010 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 2 Dec 2014 10:56:58 +0100 +Subject: [PATCH] Generate preludes using miniruby. + +--- + common.mk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common.mk b/common.mk +index 76f1621..b0f6e28 100644 +--- a/common.mk ++++ b/common.mk +@@ -782,9 +782,9 @@ $(PRELUDE_C): $(COMPILE_PRELUDE) \ + $(PRELUDE_C): $(COMPILE_PRELUDE) \ + {$(srcdir)}lib/rubygems/defaults.rb \ + {$(srcdir)}lib/rubygems/core_ext/kernel_gem.rb \ +- $(PRELUDE_SCRIPTS) $(LIB_SRCS) ++ $(PRELUDE_SCRIPTS) $(PREP) $(LIB_SRCS) + $(ECHO) generating $@ +- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ ++ $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ + $(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS) + + {$(VPATH)}golf_prelude.c: $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb +-- +2.1.0 + diff --git a/ruby.spec b/ruby.spec index 4eeaac3..6eabb43 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 45 +%global release 46 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -110,6 +110,9 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch # in support for ABRT. # http://bugs.ruby-lang.org/issues/8566 Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# Use miniruby to regenerate prelude.c. +# https://bugs.ruby-lang.org/issues/10554 +Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # Don't use SSLv3 for tests. # https://bugs.ruby-lang.org/issues/10046 Patch9: ruby-2.3.0-fix-test-ctx-client-session-cb.patch @@ -415,6 +418,7 @@ rm -rf ext/fiddle/libffi* %patch4 -p1 %patch5 -p1 %patch6 -p1 +%patch7 -p1 %patch9 %patch10 %patch11 @@ -450,10 +454,6 @@ autoconf --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ -# Avoid regeneration of prelude.c due to patch6 applied to common.mk. -# https://bugs.ruby-lang.org/issues/10554 -touch prelude.c - # Q= makes the build output more verbose and allows to check Fedora # compiler options. make %{?_smp_mflags} COPY="cp -p" Q= @@ -893,6 +893,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Thu Dec 10 2015 V鱈t Ondruch - 2.2.3-46 +- Fix ABRT hook autoloading. + * Fri Sep 04 2015 Michal Toman - 2.2.3-45 - Add support for MIPS architecture to config.h From e4e06c7ce8495db764ae6aec9a5407c0f524fda8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 11 Dec 2015 10:56:00 +0100 Subject: [PATCH 432/529] Ensure that abrt hook is used. --- ruby.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruby.spec b/ruby.spec index 6eabb43..697cd47 100644 --- a/ruby.spec +++ b/ruby.spec @@ -594,6 +594,9 @@ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{m # Sanity check that SystemTap (dtrace) was detected. make runruby TESTRUN_SCRIPT=%{SOURCE11} +# Check if abrt hook is required. +LD_LIBRARY_PATH=. RUBYOPT=-I.:lib:.ext/x86_64-linux/ ./ruby -d -e '' |& grep abrt + DISABLE_TESTS="" # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, From b3ffc2fef657bfea6c48fd6cc78a0658be946428 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Sun, 13 Dec 2015 19:36:58 +0100 Subject: [PATCH 433/529] Move the ABRT hook test into separate file. --- ruby.spec | 18 ++++++++++-------- test_abrt.rb | 7 +++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 test_abrt.rb diff --git a/ruby.spec b/ruby.spec index 697cd47..7c561a8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -86,6 +86,8 @@ Source9: rubygems.req Source10: rubygems.prov # SystemTap sanity test case. Source11: test_systemtap.rb +# ABRT hoook test case. +Source12: test_abrt.rb # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -591,19 +593,19 @@ sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \ sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp %check -# Sanity check that SystemTap (dtrace) was detected. -make runruby TESTRUN_SCRIPT=%{SOURCE11} - -# Check if abrt hook is required. -LD_LIBRARY_PATH=. RUBYOPT=-I.:lib:.ext/x86_64-linux/ ./ruby -d -e '' |& grep abrt - -DISABLE_TESTS="" - # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). touch abrt.rb +# Sanity check that SystemTap (dtrace) was detected. +make runruby TESTRUN_SCRIPT=%{SOURCE11} + +# Check if abrt hook is required. +make runruby TESTRUN_SCRIPT=%{SOURCE12} + +DISABLE_TESTS="" + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig diff --git a/test_abrt.rb b/test_abrt.rb new file mode 100644 index 0000000..6d110ba --- /dev/null +++ b/test_abrt.rb @@ -0,0 +1,7 @@ +if !!$LOADED_FEATURES.detect { |f| f =~ /abrt\.rb/ } + exit true +else + puts 'ERROR: ABRT hook was not loaded.' + + exit false +end From e46753608115f8c1c3b4174ae46f29ac16dd2340 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 21 Dec 2015 13:07:52 +0100 Subject: [PATCH 434/529] Update to Ruby 2.2.4. --- .gitignore | 1 + ...3-in-test-as-it-is-insecure-and-may-.patch | 25 ------------------- ...-when-testing-SSL-session-cache-call.patch | 23 ----------------- ...2.3.0-fix-test-ctx-client-session-cb.patch | 13 ---------- ruby.spec | 15 ++++------- sources | 2 +- 6 files changed, 7 insertions(+), 72 deletions(-) delete mode 100644 ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch delete mode 100644 ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch delete mode 100644 ruby-2.3.0-fix-test-ctx-client-session-cb.patch diff --git a/.gitignore b/.gitignore index db108f0..81f7fc1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /ruby-2.2.1.tar.xz /ruby-2.2.2.tar.xz /ruby-2.2.3.tar.xz +/ruby-2.2.4.tar.xz diff --git a/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch b/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch deleted file mode 100644 index efd947f..0000000 --- a/ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b9fa5fc9a14e6c889c9a0fa9c9386b2018f2314c Mon Sep 17 00:00:00 2001 -From: Jeremy Evans -Date: Fri, 17 Jul 2015 11:25:09 -0600 -Subject: [PATCH 4/8] Don't force SSLv3 in test, as it is insecure and may not - be supported - -LibreSSL disables SSLv3 by default, and there's no reason this code -should require SSLv3. - -diff --git test/openssl/test_ssl_session.rb test/openssl/test_ssl_session.rb -index 0c384c7..d4713d9 100644 ---- test/openssl/test_ssl_session.rb -+++ test/openssl/test_ssl_session.rb -@@ -355,7 +355,7 @@ __EOS__ - 3.times do - sock = TCPSocket.new("127.0.0.1", port) - begin -- ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new("SSLv3")) -+ ssl = OpenSSL::SSL::SSLSocket.new(sock, OpenSSL::SSL::SSLContext.new) - ssl.sync_close = true - ssl.session = last_client_session if last_client_session - ssl.connect --- -2.4.5 - diff --git a/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch b/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch deleted file mode 100644 index d5e90ae..0000000 --- a/ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch +++ /dev/null @@ -1,23 +0,0 @@ -From fb08c34eee2c883a01ab0dda2a2e34a290516a2a Mon Sep 17 00:00:00 2001 -From: Jeremy Evans -Date: Fri, 17 Jul 2015 11:31:45 -0600 -Subject: [PATCH 5/8] Use OP_NO_TICKET when testing SSL session cache callbacks - -This fixes the test when using LibreSSL and possibly some -configurations of OpenSSL. - -diff --git test/openssl/test_ssl_session.rb test/openssl/test_ssl_session.rb -index d4713d9..58fa20b 100644 ---- test/openssl/test_ssl_session.rb -+++ test/openssl/test_ssl_session.rb -@@ -316,6 +316,7 @@ __EOS__ - - ctx_proc = Proc.new { |ctx, ssl| - ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_SERVER -+ ctx.options = OpenSSL::SSL::OP_NO_TICKET - last_server_session = nil - - # get_cb is called whenever a client proposed to resume a session but --- -2.4.5 - diff --git a/ruby-2.3.0-fix-test-ctx-client-session-cb.patch b/ruby-2.3.0-fix-test-ctx-client-session-cb.patch deleted file mode 100644 index 0757a52..0000000 --- a/ruby-2.3.0-fix-test-ctx-client-session-cb.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: test/openssl/test_ssl_session.rb -=================================================================== ---- test/openssl/test_ssl_session.rb (revision 49098) -+++ test/openssl/test_ssl_session.rb (revision 49099) -@@ -278,7 +278,7 @@ - - def test_ctx_client_session_cb - called = {} -- ctx = OpenSSL::SSL::SSLContext.new("SSLv3") -+ ctx = OpenSSL::SSL::SSLContext.new - ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT - - ctx.session_new_cb = lambda { |ary| diff --git a/ruby.spec b/ruby.spec index 7c561a8..3e4f698 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 2 -%global teeny_version 3 +%global teeny_version 4 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 46 +%global release 47 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} %global rubygems_version 2.4.5.1 @@ -115,11 +115,6 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Use miniruby to regenerate prelude.c. # https://bugs.ruby-lang.org/issues/10554 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch -# Don't use SSLv3 for tests. -# https://bugs.ruby-lang.org/issues/10046 -Patch9: ruby-2.3.0-fix-test-ctx-client-session-cb.patch -Patch10: ruby-2.3.0-Don-t-force-SSLv3-in-test-as-it-is-insecure-and-may-.patch -Patch11: ruby-2.3.0-Use-OP_NO_TICKET-when-testing-SSL-session-cache-call.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: ruby(rubygems) >= %{rubygems_version} @@ -421,9 +416,6 @@ rm -rf ext/fiddle/libffi* %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch9 -%patch10 -%patch11 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -898,6 +890,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Dec 21 2015 V鱈t Ondruch - 2.2.4-47 +- Update to Ruby 2.2.4. + * Thu Dec 10 2015 V鱈t Ondruch - 2.2.3-46 - Fix ABRT hook autoloading. diff --git a/sources b/sources index dbae8f0..94b8135 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2a8bc1f46aba8938add70f742e8af1ff ruby-2.2.3.tar.xz +350bfd495e1974cf752de9f4566c7911 ruby-2.2.4.tar.xz From 4c12d4e704a383f79d42d06832477b79224d2181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 5 Jan 2016 10:58:10 +0100 Subject: [PATCH 435/529] Upgrade to Ruby 2.3.0. --- .gitignore | 8 +- macros.rubygems | 3 +- operating_system.rb | 26 +- ruby-1.9.3-mkmf-verbose.patch | 2 +- ...-additional-preludes-by-configuratio.patch | 8 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 64 +--- ruby-2.1.0-always-use-i386.patch | 4 +- ruby-2.1.0-custom-rubygems-location.patch | 14 +- ...2.3-Generate-preludes-using-miniruby.patch | 8 +- ruby-2.3.0-ruby_version.patch | 300 ++++++++++++++++++ ruby.spec | 207 +++++++----- sources | 2 +- test_systemtap.rb | 65 +++- 14 files changed, 549 insertions(+), 164 deletions(-) create mode 100644 ruby-2.3.0-ruby_version.patch diff --git a/.gitignore b/.gitignore index 81f7fc1..3523d77 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ +/*/ /ruby-2.*.tar.bz2 -/ruby-2.2.0.tar.xz -/ruby-2.2.1.tar.xz -/ruby-2.2.2.tar.xz -/ruby-2.2.3.tar.xz -/ruby-2.2.4.tar.xz +/ruby-2.*.tar.xz +/*.rpm diff --git a/macros.rubygems b/macros.rubygems index 1043c02..6d99ac3 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -20,8 +20,7 @@ CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\ gem install \\\ -V \\\ --local \\\ - --install-dir %{-d*}%{!?-d:.%{gem_dir}} \\\ - --bindir .%{_bindir} \\\ + --build-root %{-d*}%{!?-d:.} \\\ --force \\\ --document=ri,rdoc \\\ %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \ diff --git a/operating_system.rb b/operating_system.rb index ed653fd..4b2903d 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -13,12 +13,28 @@ module Gem end private :previous_but_one_dir_to + ## + # Detects --install-dir option specified on command line. + + def opt_install_dir? + @opt_install_dir ||= ARGV.include?('--install-dir') || ARGV.include?('-i') + end + private :opt_install_dir? + + ## + # Detects --build-root option specified on command line. + + def opt_build_root? + @opt_build_root ||= ARGV.include?('--build-root') + end + private :opt_build_root? + ## # Tries to detect, if arguments and environment variables suggest that # 'gem install' is executed from rpmbuild. def rpmbuild? - (ARGV.include?('--install-dir') || ARGV.include?('-i')) && ENV['RPM_PACKAGE_NAME'] + @rpmbuild ||= ENV['RPM_PACKAGE_NAME'] && (opt_install_dir? || opt_build_root?) end private :rpmbuild? @@ -80,7 +96,9 @@ module Gem # RubyGems default overrides. def default_dir - if Process.uid == 0 + if opt_build_root? + Gem.default_dirs[:system][:gem_dir] + elsif Process.uid == 0 Gem.default_dirs[:local][:gem_dir] else Gem.user_dir @@ -93,7 +111,9 @@ module Gem end def default_bindir - if Process.uid == 0 + if opt_build_root? + Gem.default_dirs[:system][:bin_dir] + elsif Process.uid == 0 Gem.default_dirs[:local][:bin_dir] else File.join [Dir.home, 'bin'] diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index 0f2a742..ccbd972 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1859,7 +1859,7 @@ SRC +@@ -1892,7 +1892,7 @@ def configuration(srcdir) SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 6eb6122..6f16bae 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -13,9 +13,9 @@ diff --git a/Makefile.in b/Makefile.in index 7e8ed82..7916993 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -114,6 +114,8 @@ XRUBY_LIBDIR = @XRUBY_LIBDIR@ - XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ +@@ -116,6 +116,8 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ + BOOTSTRAPRUBY = @BOOTSTRAPRUBY@ +OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ + @@ -26,7 +26,7 @@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -117,7 +117,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) +@@ -127,7 +127,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) DEFAULT_PRELUDES = $(GEM_PRELUDE) @@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -4169,6 +4169,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4334,6 +4334,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index b54f8e0..33bd565 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3385,6 +3385,11 @@ if test ${multiarch+set}; then +@@ -3592,6 +3592,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index b401158..6661f9b 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -5,71 +5,25 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is configured. --- - configure.in | 15 +++++++++------ + configure.in | 3 ++- loadpath.c | 12 ++++++++++++ tool/mkconfig.rb | 2 +- - 3 files changed, 22 insertions(+), 7 deletions(-) + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in -index 17ed3ed..5843651 100644 +index db37cd6..ce8d149 100644 --- a/configure.in +++ b/configure.in -@@ -3975,8 +3975,6 @@ AS_CASE(["$target_os"], - rubyw_install_name='$(RUBYW_INSTALL_NAME)' - ]) +@@ -4188,7 +4188,8 @@ AS_CASE(["$ruby_version_dir_name"], + ruby_version_dir=/'${ruby_version_dir_name}' --rubylibdir='${rubylibprefix}/${ruby_version}' --rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} - - rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} - AC_ARG_WITH(rubyarchprefix, -@@ -4006,6 +4004,7 @@ AC_ARG_WITH(ruby-version, - [ruby_version=full]) - unset RUBY_LIB_VERSION - unset RUBY_LIB_VERSION_STYLE -+ruby_version_suffix=/'${ruby_version}' - AS_CASE(["$ruby_version"], - [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], - [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) -@@ -4022,30 +4021,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then - ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" - eval $ruby_version - elif test -z "${ruby_version}"; then + if test -z "${ruby_version_dir_name}"; then - AC_MSG_ERROR([No ruby version, No place for bundled libraries]) -+ unset ruby_version_suffix ++ unset ruby_version_dir + AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1) - else - RUBY_LIB_VERSION="${ruby_version}" fi - AC_SUBST(RUBY_LIB_VERSION_STYLE) - AC_SUBST(RUBY_LIB_VERSION) -+rubylibdir='${rubylibprefix}'${ruby_version_suffix} -+rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_suffix}}${multiarch-'${rubylibdir}/${arch}'} -+ - AC_ARG_WITH(sitedir, - AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), - [sitedir=$withval], - [sitedir='${rubylibprefix}/site_ruby']) --sitelibdir='${sitedir}/${ruby_version}' -+sitelibdir='${sitedir}'${ruby_version_suffix} - - AC_ARG_WITH(sitearchdir, - AS_HELP_STRING([--with-sitearchdir=DIR], - [architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]), - [sitearchdir=$withval], -- [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}]) -+ [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_suffix}}${multiarch-'${sitelibdir}/${sitearch}'}]) - - AC_ARG_WITH(vendordir, - AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), - [vendordir=$withval], - [vendordir='${rubylibprefix}/vendor_ruby']) --vendorlibdir='${vendordir}/${ruby_version}' -+vendorlibdir='${vendordir}'${ruby_version_suffix} - - AC_ARG_WITH(vendorarchdir, - AS_HELP_STRING([--with-vendorarchdir=DIR], + rubylibdir='${rubylibprefix}'${ruby_version_dir} diff --git a/loadpath.c b/loadpath.c index 9160031..0d4d953 100644 --- a/loadpath.c @@ -113,7 +67,7 @@ diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 07076d4..35e6c3c 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb -@@ -123,7 +123,7 @@ File.foreach "config.status" do |line| +@@ -122,7 +122,7 @@ def config.write(arg) val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump case name when /^prefix$/ diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index f8e61f5..3c3fcd4 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,8 +11,8 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -4087,6 +4087,8 @@ AC_SUBST(vendorarchdir)dnl - +@@ -4252,6 +4252,8 @@ AC_SUBST(vendorarchdir)dnl + AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl +target_cpu=`echo $target_cpu | sed s/i.86/i386/` diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index c21c858..36a7711 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,9 +15,9 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -4061,6 +4061,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4224,6 +4224,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], - [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) + [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) +AC_ARG_WITH(rubygemsdir, + AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]), @@ -26,14 +26,14 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4084,6 +4088,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4248,6 +4252,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl +AC_SUBST(rubygemsdir)dnl + AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl - diff --git a/loadpath.c b/loadpath.c index 623dc9d..74c5d9e 100644 --- a/loadpath.c @@ -53,7 +53,7 @@ diff --git a/template/verconf.h.tmpl b/template/verconf.h.tmpl index 79c003e..34f2382 100644 --- a/template/verconf.h.tmpl +++ b/template/verconf.h.tmpl -@@ -34,6 +34,9 @@ +@@ -36,6 +36,9 @@ % if C["RUBY_SEARCH_PATH"] #define RUBY_SEARCH_PATH "${RUBY_SEARCH_PATH}" % end @@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -317,6 +317,7 @@ sitelibdir = CONFIG["sitelibdir"] +@@ -328,6 +328,7 @@ def CONFIG.[](name, mandatory = false) sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -505,7 +506,15 @@ end +@@ -506,7 +507,15 @@ def CONFIG.[](name, mandatory = false) install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[README* *.txt *.rdoc *.gemspec] diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch index 81b7c5b..aa17411 100644 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -1,4 +1,4 @@ -From 9fedac991e717f0103d092275ac301e58c5cf010 Mon Sep 17 00:00:00 2001 +From 07eb5f5e775dec01a92a8b13910eaced9e8ee0cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 2 Dec 2014 10:56:58 +0100 Subject: [PATCH] Generate preludes using miniruby. @@ -8,10 +8,10 @@ Subject: [PATCH] Generate preludes using miniruby. 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk -index 76f1621..b0f6e28 100644 +index 168dc52..20c218a 100644 --- a/common.mk +++ b/common.mk -@@ -782,9 +782,9 @@ $(PRELUDE_C): $(COMPILE_PRELUDE) \ +@@ -839,9 +839,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(PRELUDE_C): $(COMPILE_PRELUDE) \ {$(srcdir)}lib/rubygems/defaults.rb \ {$(srcdir)}lib/rubygems/core_ext/kernel_gem.rb \ @@ -24,5 +24,5 @@ index 76f1621..b0f6e28 100644 {$(VPATH)}golf_prelude.c: $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb -- -2.1.0 +2.6.3 diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch new file mode 100644 index 0000000..6a13e3a --- /dev/null +++ b/ruby-2.3.0-ruby_version.patch @@ -0,0 +1,300 @@ +From 4fc1be3af3f58621bb751c9e63c208b15c0e8d16 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 31 Mar 2015 16:21:04 +0200 +Subject: [PATCH 1/4] Use ruby_version_dir_name for versioned directories. + +This disallows changing the ruby_version constant by --with-ruby-version +configuration options. The two places version numbers are disallowed as +well, since there are a lot of places which cannot handle this format +properly. + +ruby_version_dir_name now specifies custom version string for versioned +directories, e.g. instead of default X.Y.Z, you can specify whatever +string. +--- + configure.in | 68 ++++++++++++++++++++++++++++------------------------- + template/ruby.pc.in | 1 + + 2 files changed, 37 insertions(+), 32 deletions(-) + +diff --git a/configure.in b/configure.in +index db37cd6..6e73fae 100644 +--- a/configure.in ++++ b/configure.in +@@ -4137,9 +4137,6 @@ AS_CASE(["$target_os"], + rubyw_install_name='$(RUBYW_INSTALL_NAME)' + ]) + +-rubylibdir='${rubylibprefix}/${ruby_version}' +-rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} +- + rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} + AC_ARG_WITH(rubyarchprefix, + AS_HELP_STRING([--with-rubyarchprefix=DIR], +@@ -4162,58 +4159,64 @@ AC_ARG_WITH(ridir, + AC_SUBST(ridir) + AC_SUBST(RI_BASE_NAME) + +-AC_ARG_WITH(ruby-version, +- AS_HELP_STRING([--with-ruby-version=STR], [ruby version string for version specific directories [[full]] (full|minor|STR)]), +- [ruby_version=$withval], +- [ruby_version=full]) + unset RUBY_LIB_VERSION +-unset RUBY_LIB_VERSION_STYLE +-AS_CASE(["$ruby_version"], +- [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], +- [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) +-if test ${RUBY_LIB_VERSION_STYLE+set}; then +- { +- echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE" +- echo '#define STRINGIZE(x) x' +- test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0' +- echo '#include "verconf.h"' +- echo '#include "version.h"' +- echo 'ruby_version=RUBY_LIB_VERSION' +- } > conftest.c +- test -f verconf.h || > verconf.h +- ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" +- eval $ruby_version +-elif test -z "${ruby_version}"; then +- AC_MSG_ERROR([No ruby version, No place for bundled libraries]) +-else +- RUBY_LIB_VERSION="${ruby_version}" +-fi ++RUBY_LIB_VERSION_STYLE='3 /* full */' ++{ ++echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE" ++echo '#define STRINGIZE(x) x' ++test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0' ++echo '#include "verconf.h"' ++echo '#include "version.h"' ++echo 'ruby_version=RUBY_LIB_VERSION' ++} > conftest.c ++test -f verconf.h || > verconf.h ++ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" ++eval $ruby_version ++ ++RUBY_LIB_VERSION="${ruby_version}" ++ + AC_SUBST(RUBY_LIB_VERSION_STYLE) + AC_SUBST(RUBY_LIB_VERSION) + ++AC_ARG_WITH(ruby-version, ++ AS_HELP_STRING([--with-ruby-version=STR], [ruby version string for version specific directories [[full]] (full|STR)]), ++ [ruby_version_dir_name=$withval], ++ [ruby_version_dir_name=full]) ++AS_CASE(["$ruby_version_dir_name"], ++ [full], [ruby_version_dir_name='${ruby_version}']) ++ ++ruby_version_dir=/'${ruby_version_dir_name}' ++ ++if test -z "${ruby_version_dir_name}"; then ++ AC_MSG_ERROR([No ruby version, No place for bundled libraries]) ++fi ++ ++rubylibdir='${rubylibprefix}'${ruby_version_dir} ++rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_dir}}${multiarch-'${rubylibdir}/${arch}'} ++ + AC_ARG_WITH(sitedir, + AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), + [sitedir=$withval], + [sitedir='${rubylibprefix}/site_ruby']) +-sitelibdir='${sitedir}/${ruby_version}' ++sitelibdir='${sitedir}'${ruby_version_dir} + + AC_ARG_WITH(sitearchdir, + AS_HELP_STRING([--with-sitearchdir=DIR], + [architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]), + [sitearchdir=$withval], +- [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}]) ++ [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_dir}}${multiarch-'${sitelibdir}/${sitearch}'}]) + + AC_ARG_WITH(vendordir, + AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), + [vendordir=$withval], + [vendordir='${rubylibprefix}/vendor_ruby']) +-vendorlibdir='${vendordir}/${ruby_version}' ++vendorlibdir='${vendordir}'${ruby_version_dir} + + AC_ARG_WITH(vendorarchdir, + AS_HELP_STRING([--with-vendorarchdir=DIR], + [architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]), + [vendorarchdir=$withval], +- [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) ++ [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) + + if test "${LOAD_RELATIVE+set}"; then + AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) +@@ -4230,6 +4233,7 @@ AC_SUBST(sitearchincludedir)dnl + AC_SUBST(arch)dnl + AC_SUBST(sitearch)dnl + AC_SUBST(ruby_version)dnl ++AC_SUBST(ruby_version_dir_name)dnl + AC_SUBST(rubylibdir)dnl + AC_SUBST(rubyarchdir)dnl + AC_SUBST(sitedir)dnl +diff --git a/template/ruby.pc.in b/template/ruby.pc.in +index 8a2c066..c81b211 100644 +--- a/template/ruby.pc.in ++++ b/template/ruby.pc.in +@@ -9,6 +9,7 @@ MAJOR=@MAJOR@ + MINOR=@MINOR@ + TEENY=@TEENY@ + ruby_version=@ruby_version@ ++ruby_version_dir_name=@ruby_version_dir_name@ + RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@ + RUBY_BASE_NAME=@RUBY_BASE_NAME@ + RUBY_VERSION_NAME=@RUBY_VERSION_NAME@ +-- +2.1.0 + + +From 518850aba6eee76de7715aae8d37330e34b01983 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 31 Mar 2015 16:37:26 +0200 +Subject: [PATCH 2/4] Add ruby_version_dir_name support for RDoc. + +--- + lib/rdoc/ri/paths.rb | 2 +- + tool/rbinstall.rb | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb +index 970cb91..5bf8230 100644 +--- a/lib/rdoc/ri/paths.rb ++++ b/lib/rdoc/ri/paths.rb +@@ -10,7 +10,7 @@ module RDoc::RI::Paths + #:stopdoc: + require 'rbconfig' + +- version = RbConfig::CONFIG['ruby_version'] ++ version = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + + BASE = if RbConfig::CONFIG.key? 'ridir' then + File.join RbConfig::CONFIG['ridir'], version +diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb +index d4c110e..d39c9a6 100755 +--- a/tool/rbinstall.rb ++++ b/tool/rbinstall.rb +@@ -406,7 +406,7 @@ def CONFIG.[](name, mandatory = false) + + install?(:doc, :rdoc) do + if $rdocdir +- ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system") ++ ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version_dir_name'] || CONFIG['ruby_version'], "system") + prepare "rdoc", ridatadir + install_recursive($rdocdir, ridatadir, :mode => $data_mode) + end +-- +2.1.0 + + +From f8d136f9a46d1fe87eba622ab9665935d05e981b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 31 Mar 2015 16:37:44 +0200 +Subject: [PATCH 3/4] Add ruby_version_dir_name support for RubyGems. + +--- + lib/rubygems/defaults.rb | 11 ++++++----- + test/rubygems/test_gem.rb | 5 +++-- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb +index 55ca080..75eea2b 100644 +--- a/lib/rubygems/defaults.rb ++++ b/lib/rubygems/defaults.rb +@@ -32,20 +32,20 @@ def self.default_dir + [ + File.dirname(RbConfig::CONFIG['sitedir']), + 'Gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + ] + elsif RbConfig::CONFIG['rubylibprefix'] then + [ + RbConfig::CONFIG['rubylibprefix'], + 'gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + ] + else + [ + RbConfig::CONFIG['libdir'], + ruby_engine, + 'gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + ] + end + +@@ -75,7 +75,8 @@ def self.default_rubygems_dirs + + def self.user_dir + parts = [Gem.user_home, '.gem', ruby_engine] +- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty? ++ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] ++ parts << ruby_version_dir_name unless ruby_version_dir_name.empty? + File.join parts + end + +@@ -172,7 +173,7 @@ def self.vendor_dir # :nodoc: + return nil unless RbConfig::CONFIG.key? 'vendordir' + + File.join RbConfig::CONFIG['vendordir'], 'gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + end + + end +diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb +index 0428bea..b6e090e 100644 +--- a/test/rubygems/test_gem.rb ++++ b/test/rubygems/test_gem.rb +@@ -963,7 +963,8 @@ def test_self_use_paths + + def test_self_user_dir + parts = [@userhome, '.gem', Gem.ruby_engine] +- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty? ++ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] ++ parts << ruby_version_dir_name unless ruby_version_dir_name.empty? + + assert_equal File.join(parts), Gem.user_dir + end +@@ -1090,7 +1091,7 @@ def test_self_user_home_user_drive_and_path + def test_self_vendor_dir + expected = + File.join RbConfig::CONFIG['vendordir'], 'gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + + assert_equal expected, Gem.vendor_dir + end +-- +2.1.0 + + +From 88c38a030c22dbf9422ece847bdfbf87d6659313 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 1 Apr 2015 14:55:37 +0200 +Subject: [PATCH 4/4] Let headers directories follow the configured version + name. + +--- + configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index 6e73fae..c842725 100644 +--- a/configure.in ++++ b/configure.in +@@ -274,7 +274,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` + RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"` + AC_SUBST(RUBY_BASE_NAME) + AC_SUBST(RUBYW_BASE_NAME) +-AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version}') ++AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version_dir_name}') + + AC_CANONICAL_TARGET + test x"$target_alias" = x && +-- +2.1.0 + diff --git a/ruby.spec b/ruby.spec index 3e4f698..999130a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,16 +1,16 @@ %global major_version 2 -%global minor_version 2 -%global teeny_version 4 +%global minor_version 3 +%global teeny_version 0 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -#%%global milestone rc1 +#%%global milestone preview2 # Keep the revision enabled for pre-releases from SVN. -#%%global revision 48936 +#%%global revision 53264 %global ruby_archive %{name}-%{ruby_version} @@ -21,28 +21,32 @@ %endif -%global release 47 +%global release 50 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} -%global rubygems_version 2.4.5.1 - # The RubyGems library has to stay out of Ruby directory three, since the # RubyGems should be share by all Ruby implementations. %global rubygems_dir %{_datadir}/rubygems +# Bundled libraries versions +%global rubygems_version 2.5.1 +%global molinillo_version 0.4.0 + # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version} -%global bigdecimal_version 1.2.6 -%global io_console_version 0.4.3 -%global json_version 1.8.1 -%global minitest_version 5.4.3 -%global power_assert_version 0.2.2 -%global psych_version 2.0.8 +%global bigdecimal_version 1.2.8 +%global did_you_mean_version 1.0.0 +%global io_console_version 0.4.5 +%global json_version 1.8.3 +%global minitest_version 5.8.3 +%global power_assert_version 0.2.6 +%global psych_version 2.0.17 %global rake_version 10.4.2 -%global rdoc_version 4.2.0 -%global test_unit_version 3.0.8 +%global rdoc_version 4.2.1 +%global net_telnet_version 0.1.1 +%global test_unit_version 3.1.5 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -84,25 +88,28 @@ Source7: config.h Source8: rubygems.attr Source9: rubygems.req Source10: rubygems.prov -# SystemTap sanity test case. -Source11: test_systemtap.rb # ABRT hoook test case. Source12: test_abrt.rb +# SystemTap tests. +Source13: test_systemtap.rb # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. %{?load:%{SOURCE4}} %{?load:%{SOURCE5}} +# Fix ruby_version abuse. +# https://bugs.ruby-lang.org/issues/11002 +Patch0: ruby-2.3.0-ruby_version.patch # http://bugs.ruby-lang.org/issues/7807 -Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +Patch1: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch # Allows to override libruby.so placement. Hopefully we will be able to return # to plain --with-rubyarchprefix. # http://bugs.ruby-lang.org/issues/8973 -Patch1: ruby-2.1.0-Enable-configuration-of-archlibdir.patch +Patch2: ruby-2.1.0-Enable-configuration-of-archlibdir.patch # Force multiarch directories for i.86 to be always named i386. This solves # some differencies in build between Fedora and RHEL. -Patch2: ruby-2.1.0-always-use-i386.patch +Patch3: ruby-2.1.0-always-use-i386.patch # Allows to install RubyGems into custom directory, outside of Ruby's tree. # http://bugs.ruby-lang.org/issues/5617 Patch4: ruby-2.1.0-custom-rubygems-location.patch @@ -117,12 +124,10 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Requires: ruby(rubygems) >= %{rubygems_version} -# Make the bigdecimal gem a runtime dependency of Ruby to avoid problems -# with user-installed gems, that don't require it in gemspec/Gemfile -# See https://bugzilla.redhat.com/show_bug.cgi?id=829209 -# and http://bugs.ruby-lang.org/issues/6123 -Requires: rubygem(bigdecimal) >= %{bigdecimal_version} +Suggests: rubypick +Recommends: ruby(rubygems) >= %{rubygems_version} +Recommends: rubygem(bigdecimal) >= %{bigdecimal_version} +Recommends: rubygem(did_you_mean) >= %{did_you_mean_version} BuildRequires: autoconf BuildRequires: gdbm-devel @@ -142,8 +147,6 @@ BuildRequires: %{_bindir}/cmake # virtual provide. It can be installed as dependency of rubypick. Provides: ruby(runtime_executable) = %{ruby_release} -%global __provides_exclude_from ^(%{ruby_libarchdir}|%{gem_archdir})/.*\\.so$ - %description Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text @@ -166,9 +169,17 @@ Group: Development/Libraries License: Ruby or BSD Provides: ruby(release) = %{ruby_release} +# Virtual provides for CCAN copylibs. +# https://fedorahosted.org/fpc/ticket/364 +Provides: bundled(ccan-build_assert) +Provides: bundled(ccan-check_type) +Provides: bundled(ccan-container_of) +Provides: bundled(ccan-list) + %description libs This package includes the libruby, necessary to run Ruby. + # TODO: Rename or not rename to ruby-rubygems? %package -n rubygems Summary: The Ruby standard for packaging ruby libraries @@ -176,13 +187,14 @@ Version: %{rubygems_version} Group: Development/Libraries License: Ruby or MIT Requires: ruby(release) -Requires: rubygem(rdoc) >= %{rdoc_version} -# TODO: This seems to be optional now. -# https://github.com/rubygems/rubygems/commit/68da16dd7508c5c4010bfe32f99422568d3d582f -Requires: rubygem(io-console) >= %{io_console_version} +Recommends: rubygem(rdoc) >= %{rdoc_version} +Recommends: rubygem(io-console) >= %{io_console_version} Requires: rubygem(psych) >= %{psych_version} Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} +# https://github.com/rubygems/rubygems/pull/1189#issuecomment-121600910 +Provides: bundled(rubygem(molinillo)) = %{molinillo_version} +Provides: bundled(rubygem-molinillo) = %{molinillo_version} BuildArch: noarch %description -n rubygems @@ -196,6 +208,8 @@ Version: %{rubygems_version} Group: Development/Libraries License: Ruby or MIT Requires: ruby(rubygems) = %{version}-%{release} +# Needed for RDoc documentation format generation. +Requires: rubygem(json) >= %{json_version} BuildArch: noarch %description -n rubygems-devel @@ -241,7 +255,7 @@ License: GPLv2 and Ruby and MIT and SIL Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} -Requires: rubygem(json) >= %{json_version} +Recommends: rubygem(json) >= %{json_version} Provides: rdoc = %{version}-%{release} Provides: ri = %{version}-%{release} Provides: rubygem(rdoc) = %{version}-%{release} @@ -285,6 +299,20 @@ floating point arithmetic often introduces subtle errors because of the conversion between base 10 and base 2. +%package -n rubygem-did_you_mean +Summary: "Did you mean?" experience in Ruby +Version: %{did_you_mean_version} +Group: Development/Libraries +License: MIT +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(did_you_mean) = %{version}-%{release} + +%description -n rubygem-did_you_mean +"did you mean?" experience in Ruby: the error message will tell you the right +one when you misspelled something. + + %package -n rubygem-io-console Summary: IO/Console is a simple console utilizing library Version: %{io_console_version} @@ -340,8 +368,6 @@ minitest/pride shows pride in testing and adds coloring to your test output. -# The Summary/Description fields are rather poor. -# https://github.com/k-tsj/power_assert/issues/3 %package -n rubygem-power_assert Summary: Power Assert for Ruby Version: %{power_assert_version} @@ -353,7 +379,9 @@ Provides: rubygem(power_assert) = %{version}-%{release} BuildArch: noarch %description -n rubygem-power_assert -Power Assert for Ruby. +Power Assert shows each value of variables and method calls in the expression. +It is useful for testing, providing which value wasn't correct when the +condition is not satisfied. %package -n rubygem-psych @@ -372,6 +400,25 @@ capabilities. In addition to wrapping libyaml, Psych also knows how to serialize and de-serialize most Ruby objects to and from the YAML format. +%package -n rubygem-net-telnet +Summary: Provides telnet client functionality +Version: %{net_telnet_version} +Group: Development/Libraries +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(net-telnet) = %{version}-%{release} + +%description -n rubygem-net-telnet +Provides telnet client functionality. + +This class also has, through delegation, all the methods of a socket object +(by default, a TCPSocket, but can be set by the Proxy option to new()). This +provides methods such as close() to end the session and sysread() to read data +directly from the host, instead of via the waitfor() mechanism. Note that if +you do use sysread() directly when in telnet mode, you should probably pass +the output through preprocess() to extract telnet command sequences. + + # The Summary/Description fields are rather poor. # https://github.com/test-unit/test-unit/issues/73 %package -n rubygem-test-unit @@ -412,6 +459,7 @@ rm -rf ext/fiddle/libffi* %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 @@ -509,10 +557,6 @@ mkdir -p %{buildroot}%{_exec_prefix}/lib{,64}/gems/%{name} # Move bundled rubygems to %%gem_dir and %%gem_extdir_mri # make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems -mkdir -p %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib -mv %{buildroot}%{ruby_libdir}/rake* %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/lib -mv %{buildroot}%{gem_dir}/specifications/default/rake-%{rake_version}.gemspec %{buildroot}%{gem_dir}/specifications - mkdir -p %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib mv %{buildroot}%{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/specifications @@ -550,32 +594,10 @@ ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby # Adjust the gemspec files so that the gems will load properly sed -i '/^end$/ i\ - s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rake-%{rake_version}.gemspec - -sed -i '/^end$/ i\ - s.require_paths = ["lib"]' %{buildroot}%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec - -sed -i '/^end$/ i\ - s.require_paths = ["lib"]\ - s.extensions = ["bigdecimal.so"]' %{buildroot}%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec - -sed -i '/^end$/ i\ - s.require_paths = ["lib"]\ - s.extensions = ["io/console.so"]' %{buildroot}%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec - -sed -i '/^end$/ i\ - s.require_paths = ["lib"]\ s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec -# Push the .gemspecs through the RubyGems to let them write the stub headers. -# This speeds up loading of libraries and avoids warnings in Spring: -# https://github.com/rubygems/rubygems/pull/694 -for s in rake-%{rake_version}.gemspec rdoc-%{rdoc_version}.gemspec json-%{json_version}.gemspec; do - s="%{buildroot}%{gem_dir}/specifications/$s" - make runruby TESTRUN_SCRIPT="-rubygems \ - -e \"spec = Gem::Specification.load(%{$s})\" \ - -e \"File.write %{$s}, spec.to_ruby\"" -done +# Move man pages into proper location +mv %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/doc/rake.1 %{buildroot}%{_mandir}/man1 # Install a tapset and fix up the path to the library. mkdir -p %{buildroot}%{tapset_dir} @@ -584,18 +606,36 @@ sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \ # Escape '*/' in comment. sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp +# Prepare -doc subpackage file lists. +find doc -maxdepth 1 -type f ! -name '.*' ! -name '*.ja*' > .ruby-doc.en +echo 'doc/images' >> .ruby-doc.en +echo 'doc/syntax' >> .ruby-doc.en + +find doc -maxdepth 1 -type f -name '*.ja*' > .ruby-doc.ja +echo 'doc/irb' >> .ruby-doc.ja +echo 'doc/pty' >> .ruby-doc.ja + +sed -i 's/^/%doc /' .ruby-doc.* +sed -i 's/^/%lang(ja) /' .ruby-doc.ja + %check +# Check RubyGems version correctness. +[ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ] +# Check Molinillo version correctness. +[ "`make runruby TESTRUN_SCRIPT=\"-e \\\"module Gem; module Resolver; end; end; require 'rubygems/resolver/molinillo/lib/molinillo/gem_metadata'; puts Gem::Resolver::Molinillo::VERSION\\\"\" | tail -1`" \ + == '%{molinillo_version}' ] + # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). touch abrt.rb -# Sanity check that SystemTap (dtrace) was detected. -make runruby TESTRUN_SCRIPT=%{SOURCE11} - # Check if abrt hook is required. make runruby TESTRUN_SCRIPT=%{SOURCE12} +# Check if systemtap is supported. +make runruby TESTRUN_SCRIPT=%{SOURCE13} + DISABLE_TESTS="" make check TESTS="-v $DISABLE_TESTS" @@ -624,8 +664,6 @@ make check TESTS="-v $DISABLE_TESTS" %lang(ja) %doc COPYING.ja %doc GPL %doc LEGAL -%doc README.EXT -%lang(ja) %doc README.EXT.ja %{_rpmconfigdir}/macros.d/macros.ruby @@ -639,9 +677,7 @@ make check TESTS="-v $DISABLE_TESTS" %doc GPL %doc LEGAL %doc README.md -%lang(ja) %doc README.ja.md %doc NEWS -%doc doc/NEWS-* # Exclude /usr/local directory since it is supposed to be managed by # local system administrator. %exclude %{ruby_sitelibdir} @@ -686,6 +722,8 @@ make check TESTS="-v $DISABLE_TESTS" # Platform specific libraries. %{_libdir}/libruby.so.* %dir %{ruby_libarchdir} +%dir %{ruby_libarchdir}/cgi +%{ruby_libarchdir}/cgi/escape.so %{ruby_libarchdir}/continuation.so %{ruby_libarchdir}/coverage.so %{ruby_libarchdir}/date_core.so @@ -729,6 +767,7 @@ make check TESTS="-v $DISABLE_TESTS" %dir %{ruby_libarchdir}/enc/trans %{ruby_libarchdir}/enc/trans/big5.so %{ruby_libarchdir}/enc/trans/chinese.so +%{ruby_libarchdir}/enc/trans/ebcdic.so %{ruby_libarchdir}/enc/trans/emoji.so %{ruby_libarchdir}/enc/trans/emoji_iso2022_kddi.so %{ruby_libarchdir}/enc/trans/emoji_sjis_docomo.so @@ -750,7 +789,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/enc/utf_16le.so %{ruby_libarchdir}/enc/utf_32be.so %{ruby_libarchdir}/enc/utf_32le.so +%{ruby_libarchdir}/enc/windows_1250.so %{ruby_libarchdir}/enc/windows_1251.so +%{ruby_libarchdir}/enc/windows_1252.so %{ruby_libarchdir}/enc/windows_31j.so %{ruby_libarchdir}/etc.so %{ruby_libarchdir}/fcntl.so @@ -831,11 +872,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec %{_mandir}/man1/ri* -%files doc +%files doc -f .ruby-doc.en -f .ruby-doc.ja %doc README.md -%lang(ja) %doc README.ja.md %doc ChangeLog -%doc doc/ChangeLog-* %doc ruby-exercise.stp %{_datadir}/ri @@ -846,6 +885,11 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/gems/bigdecimal-%{bigdecimal_version} %{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec +%files -n rubygem-did_you_mean +%{gem_dir}/gems/did_you_mean-%{did_you_mean_version} +%exclude %{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/.* +%{gem_dir}/specifications/did_you_mean-%{did_you_mean_version}.gemspec + %files -n rubygem-io-console %{ruby_libdir}/io %{ruby_libarchdir}/io/console.so @@ -876,6 +920,11 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/gems/psych-%{psych_version} %{gem_dir}/specifications/psych-%{psych_version}.gemspec +%files -n rubygem-net-telnet +%{gem_dir}/gems/net-telnet-%{net_telnet_version} +%exclude %{gem_dir}/gems/net-telnet-%{net_telnet_version}/.* +%{gem_dir}/specifications/net-telnet-%{net_telnet_version}.gemspec + %files -n rubygem-test-unit %{gem_dir}/gems/test-unit-%{test_unit_version} %{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec @@ -890,6 +939,16 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon Jan 04 2016 V鱈t Ondruch - 2.3.0-50 +- Upgrade to Ruby 2.3.0. +- Move gemified net-telnet into subpackage. +- Add did_you_mean subpackage. +- Add virtual provides for CCAN copylibs. +- Use weak dependencies. + +* Tue Dec 22 2015 Pavel Valena - 2.3.0-0.7.preview2 +- Add systemtap tests. + * Mon Dec 21 2015 V鱈t Ondruch - 2.2.4-47 - Update to Ruby 2.2.4. diff --git a/sources b/sources index 94b8135..f935fb7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -350bfd495e1974cf752de9f4566c7911 ruby-2.2.4.tar.xz +92ef54e033fb95ec9bdf7023666e5f1f ruby-2.3.0.tar.xz diff --git a/test_systemtap.rb b/test_systemtap.rb index aa8df4e..eb518df 100644 --- a/test_systemtap.rb +++ b/test_systemtap.rb @@ -1,9 +1,64 @@ -require 'rbconfig' +require 'set' -if RbConfig::CONFIG.select {|k, v| v =~ /dtrace/}.size == 1 - exit true -else - puts 'ERROR: SystemTap (dtrace) support was not detected.' +LIBRUBY_SO = 'libruby.so' +PROBES_D = 'probes.d' +### +# Detect SystemTap section headers presence. + +stap_headers = [ + '\.stapsdt\.base', + '\.note\.stapsdt' +] + +header_regexp = %r{ (#{stap_headers.join('|')}) } + +section_headers = `readelf -S "#{LIBRUBY_SO}"` +detected_stap_headers = section_headers.scan(header_regexp).flatten + +# Assume there are both headers until this is proven wrong ;) +unless detected_stap_headers.size == 2 + puts 'ERROR: SystemTap (DTrace) headers were not detected in resulting library.' + exit false +end + +### +# Find if every declared probe is propagated to resulting library. + +# Colect probes specified in probes.d file. +probes = [] + +File.open(PROBES_D) do |file| + file.each_line do |line| + if probe = line[/probe (\S+)\(.*\);/, 1] + probes << probe + end + end +end + +probes = Set.new probes + +# These probes are excluded by VM_COLLECT_USAGE_DETAILS ifdef. +EXCLUDE_PROBES = Set.new %w(insn insn__operand) +unless EXCLUDE_PROBES.subset? probes + puts 'ERROR: Change in SystemTap (DTrace) probes definition file detected.' + exit false +end + +probes -= EXCLUDE_PROBES + +# Detect probes in resulting library. +probe_regexp = %r{ +^\s*stapsdt\s*0[xX][0-9a-fA-F]+\tNT_STAPSDT \(SystemTap probe descriptors\)$ +^\s*Provider: ruby$ +^\s*Name: (\S+)$ +} + +notes = `readelf -n "#{LIBRUBY_SO}"` +detected_probes = Set.new notes.scan(probe_regexp).flatten + +# Both sets must be equal, otherwise something is wrong. +unless probes == detected_probes + puts 'ERROR: SystemTap (DTrace) probes were not correctly propagated into resulting library.' exit false end From 16c9e1e6b0e402a074893ac835b32a41943fcd94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 6 Jan 2016 12:20:42 +0100 Subject: [PATCH 436/529] Load RubyGems prior ABRT hook to properly rescue RubyGems exceptions. --- abrt_prelude.rb | 10 +++++++--- ruby.spec | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/abrt_prelude.rb b/abrt_prelude.rb index 5ffc51d..587c6a6 100644 --- a/abrt_prelude.rb +++ b/abrt_prelude.rb @@ -1,4 +1,8 @@ -begin - require 'abrt' -rescue LoadError +if defined?(Gem) + require 'rubygems.rb' + + begin + require 'abrt' + rescue LoadError + end end diff --git a/ruby.spec b/ruby.spec index 999130a..02783ab 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 50 +%global release 51 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -630,8 +630,9 @@ sed -i 's/^/%lang(ja) /' .ruby-doc.ja # the test suite). touch abrt.rb -# Check if abrt hook is required. -make runruby TESTRUN_SCRIPT=%{SOURCE12} +# Check if abrt hook is required (RubyGems are disabled by default when using +# runruby, so re-enable them). +make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE12}" # Check if systemtap is supported. make runruby TESTRUN_SCRIPT=%{SOURCE13} @@ -939,6 +940,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Jan 06 2016 V鱈t Ondruch - 2.3.0-51 +- Load RubyGems prior ABRT hook to properly rescue RubyGems exceptions. + * Mon Jan 04 2016 V鱈t Ondruch - 2.3.0-50 - Upgrade to Ruby 2.3.0. - Move gemified net-telnet into subpackage. From 5ed2c68dc58913fd1e4c3870b86af1a4145dbf2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 6 Jan 2016 15:11:29 +0100 Subject: [PATCH 437/529] Explicitly require RDoc, since weak dependencies are ignored by default. --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 02783ab..8dadd1c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 51 +%global release 52 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -210,6 +210,7 @@ License: Ruby or MIT Requires: ruby(rubygems) = %{version}-%{release} # Needed for RDoc documentation format generation. Requires: rubygem(json) >= %{json_version} +Requires: rubygem(rdoc) >= %{rdoc_version} BuildArch: noarch %description -n rubygems-devel @@ -940,6 +941,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Jan 06 2016 V鱈t Ondruch - 2.3.0-52 +- Explicitly require RDoc, since weak dependencies are ignored by default. + * Wed Jan 06 2016 V鱈t Ondruch - 2.3.0-51 - Load RubyGems prior ABRT hook to properly rescue RubyGems exceptions. From 55ecc214e1acb8d899c6ff735aa1813e2f19b5a5 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 15 Jan 2016 14:12:34 +0900 Subject: [PATCH 438/529] Backport trunk@53455 to make ruby-qt build --- ...undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch | 31 +++++++++++++++++++ ruby.spec | 10 +++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch diff --git a/ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch b/ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch new file mode 100644 index 0000000..da7e980 --- /dev/null +++ b/ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch @@ -0,0 +1,31 @@ +From 98e565ec78cb4a07ffde8589ac4581fca31e9c17 Mon Sep 17 00:00:00 2001 +From: mrkn +Date: Thu, 7 Jan 2016 13:35:32 +0000 +Subject: [PATCH] * ruby.h: undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P + and HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P on C++. [ruby-core:72736] + [Bug #11962] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 6 ++++++ + include/ruby/ruby.h | 7 +++++++ + 2 files changed, 13 insertions(+) + +diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h +index 7aabf5b..82dca14 100644 +--- a/include/ruby/ruby.h ++++ b/include/ruby/ruby.h +@@ -26,6 +26,13 @@ extern "C" { + #include RUBY_EXTCONF_H + #endif + ++#if defined(__cplusplus) ++/* __builtin_choose_expr and __builtin_types_compatible aren't available ++ * on C++. See https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */ ++# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P ++# undef HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P ++#endif ++ + #include "defines.h" + + #define NORETURN_STYLE_NEW 1 diff --git a/ruby.spec b/ruby.spec index 8dadd1c..695e430 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 52 +%global release 53 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -122,6 +122,10 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Use miniruby to regenerate prelude.c. # https://bugs.ruby-lang.org/issues/10554 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch +# 98e565ec78cb4a07ffde8589ac4581fca31e9c17 +# https://bugs.ruby-lang.org/issues/11962 +# https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/53455 +Patch8: ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -465,6 +469,7 @@ rm -rf ext/fiddle/libffi* %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -941,6 +946,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Jan 15 2016 Mamoru TASAKA - 2.3.0-53 +- Backport trunk@53455 to make ruby-qt build + * Wed Jan 06 2016 V鱈t Ondruch - 2.3.0-52 - Explicitly require RDoc, since weak dependencies are ignored by default. From 2414227a755e10692df045215819dbd453f35744 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 15 Jan 2016 14:35:09 +0900 Subject: [PATCH 439/529] kill one test for now --- ruby.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby.spec b/ruby.spec index 695e430..8dc9661 100644 --- a/ruby.spec +++ b/ruby.spec @@ -645,6 +645,10 @@ make runruby TESTRUN_SCRIPT=%{SOURCE13} DISABLE_TESTS="" +# https://bugs.ruby-lang.org/issues/11480 +# Once seen: http://koji.fedoraproject.org/koji/taskinfo?taskID=12556650 +DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb" + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig From dd6ce9ce9cc6b65f22e071e0a87fb79d67430ac5 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 3 Feb 2016 14:35:12 +0000 Subject: [PATCH 440/529] Add rubypick and rubygems requires to ruby-devel to deal with BuildRequires failures in koji, this likely needs to be revisited post mass rebuild but we need it now to ensure we don't have a high failure --- ruby.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 8dc9661..0607822 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 53 +%global release 54 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -162,6 +162,8 @@ straight-forward, and extensible. Summary: A Ruby development environment Group: Development/Languages Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: rubypick +Requires: rubygems %description devel Header files and libraries for building an extension library for the @@ -950,6 +952,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Feb 3 2016 Peter Robinson 2.3.0-54 +- Add rubypick and rubygems requires to ruby-devel to deal with BuildRequires + * Fri Jan 15 2016 Mamoru TASAKA - 2.3.0-53 - Backport trunk@53455 to make ruby-qt build From f2347fa378194ad532a199584d18fdd1429d1166 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 29 Apr 2016 23:17:31 +0200 Subject: [PATCH 441/529] Update to Ruby 2.3.1. --- ...-additional-preludes-by-configuratio.patch | 2 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +-- ruby-2.3.0-ruby_version.patch | 8 ++--- ...undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch | 31 ------------------- ruby-2.4.0-increase-timeout-for-ARMv7.patch | 25 +++++++++++++++ ruby.spec | 14 +++++---- sources | 2 +- 10 files changed, 44 insertions(+), 48 deletions(-) delete mode 100644 ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch create mode 100644 ruby-2.4.0-increase-timeout-for-ARMv7.patch diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 6f16bae..75eb363 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -4334,6 +4334,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4374,6 +4374,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 33bd565..43fa7f6 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3592,6 +3592,11 @@ if test ${multiarch+set}; then +@@ -3632,6 +3632,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 6661f9b..eb34107 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index db37cd6..ce8d149 100644 --- a/configure.in +++ b/configure.in -@@ -4188,7 +4188,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -4228,7 +4228,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 3c3fcd4..9d78b05 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -4252,6 +4252,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4292,6 +4292,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 36a7711..e82f172 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -4224,6 +4224,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4264,6 +4264,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4248,6 +4252,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4288,6 +4292,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 6a13e3a..cdd016c 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.in b/configure.in index db37cd6..6e73fae 100644 --- a/configure.in +++ b/configure.in -@@ -4137,9 +4137,6 @@ AS_CASE(["$target_os"], +@@ -4177,9 +4177,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index db37cd6..6e73fae 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -4162,58 +4159,64 @@ AC_ARG_WITH(ridir, +@@ -4202,58 +4199,64 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -124,7 +124,7 @@ index db37cd6..6e73fae 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -4230,6 +4233,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4270,6 +4273,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -286,7 +286,7 @@ diff --git a/configure.in b/configure.in index 6e73fae..c842725 100644 --- a/configure.in +++ b/configure.in -@@ -274,7 +274,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` +@@ -275,7 +275,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"` AC_SUBST(RUBY_BASE_NAME) AC_SUBST(RUBYW_BASE_NAME) diff --git a/ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch b/ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch deleted file mode 100644 index da7e980..0000000 --- a/ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 98e565ec78cb4a07ffde8589ac4581fca31e9c17 Mon Sep 17 00:00:00 2001 -From: mrkn -Date: Thu, 7 Jan 2016 13:35:32 +0000 -Subject: [PATCH] * ruby.h: undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P - and HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P on C++. [ruby-core:72736] - [Bug #11962] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 6 ++++++ - include/ruby/ruby.h | 7 +++++++ - 2 files changed, 13 insertions(+) - -diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h -index 7aabf5b..82dca14 100644 ---- a/include/ruby/ruby.h -+++ b/include/ruby/ruby.h -@@ -26,6 +26,13 @@ extern "C" { - #include RUBY_EXTCONF_H - #endif - -+#if defined(__cplusplus) -+/* __builtin_choose_expr and __builtin_types_compatible aren't available -+ * on C++. See https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html */ -+# undef HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P -+# undef HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P -+#endif -+ - #include "defines.h" - - #define NORETURN_STYLE_NEW 1 diff --git a/ruby-2.4.0-increase-timeout-for-ARMv7.patch b/ruby-2.4.0-increase-timeout-for-ARMv7.patch new file mode 100644 index 0000000..d0dfcb2 --- /dev/null +++ b/ruby-2.4.0-increase-timeout-for-ARMv7.patch @@ -0,0 +1,25 @@ +From 35568b41699ca1cd466fc8d23a84139b73ad0f1b Mon Sep 17 00:00:00 2001 +From: naruse +Date: Tue, 19 Jan 2016 02:52:37 +0000 +Subject: [PATCH] increase timeout for ARMv7 + +http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20160113T091704Z.diff.html.gz + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/ruby/test_iseq.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb +index 7af8c1b..4561eeb 100644 +--- a/test/ruby/test_iseq.rb ++++ b/test/ruby/test_iseq.rb +@@ -187,7 +187,7 @@ def test_safe_call_chain + end + + def test_parent_iseq_mark +- assert_separately([], <<-'end;') ++ assert_separately([], <<-'end;', timeout: 20) + ->{ + ->{ + ->{ diff --git a/ruby.spec b/ruby.spec index 0607822..da5411b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 3 -%global teeny_version 0 +%global teeny_version 1 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 54 +%global release 55 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -122,10 +122,9 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Use miniruby to regenerate prelude.c. # https://bugs.ruby-lang.org/issues/10554 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch -# 98e565ec78cb4a07ffde8589ac4581fca31e9c17 -# https://bugs.ruby-lang.org/issues/11962 -# https://bugs.ruby-lang.org/projects/ruby-trunk/repository/revisions/53455 -Patch8: ruby-2.3.0-undef-BUILTIN_CHOOSE_EXPR_CONSTANT_P.patch +# Prevent test failures on ARM. +# https://bugs.ruby-lang.org/issues/12331 +Patch8: ruby-2.4.0-increase-timeout-for-ARMv7.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -952,6 +951,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Apr 29 2016 V鱈t Ondruch - 2.3.1-55 +- Update to Ruby 2.3.1. + * Wed Feb 3 2016 Peter Robinson 2.3.0-54 - Add rubypick and rubygems requires to ruby-devel to deal with BuildRequires diff --git a/sources b/sources index f935fb7..6eb7405 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -92ef54e033fb95ec9bdf7023666e5f1f ruby-2.3.0.tar.xz +01e9d172a5c33b385e92fc0cc2899766 ruby-2.3.1.tar.xz From cad4c2ab270483dc0846adf830bf63529387dff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 23 May 2016 14:02:20 +0200 Subject: [PATCH 442/529] Requires rubygem(json) for rubygem-rdoc (rhbz#1325022). This makes it compatible with rubygem-rdoc package built from rdoc gem. --- ruby.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index da5411b..0744039 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 55 +%global release 56 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -261,7 +261,9 @@ License: GPLv2 and Ruby and MIT and SIL Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} -Recommends: rubygem(json) >= %{json_version} +# Hardcode the dependency to keep it compatible with dependencies of the +# official rubygem-rdoc gem. +Requires: rubygem(json) >= %{json_version} Provides: rdoc = %{version}-%{release} Provides: ri = %{version}-%{release} Provides: rubygem(rdoc) = %{version}-%{release} @@ -951,6 +953,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Mon May 23 2016 V鱈t Ondruch - 2.3.1-56 +- Requires rubygem(json) for rubygem-rdoc (rhbz#1325022). + * Fri Apr 29 2016 V鱈t Ondruch - 2.3.1-55 - Update to Ruby 2.3.1. From b1466a4c8f2cd28556efcd93c5dc539bff041be9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 12 Jul 2016 13:50:14 +0200 Subject: [PATCH 443/529] Make symlinks for json gem. --- ruby.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 0744039..e75c0c8 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 56 +%global release 57 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -591,6 +591,9 @@ mkdir -p %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version} mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/ mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications +ln -s %{gem_dir}/gems/json-%{json_version}/lib/json.rb %{buildroot}%{ruby_libdir}/json.rb +ln -s %{gem_dir}/gems/json-%{json_version}/lib/json %{buildroot}%{ruby_libdir}/json +ln -s %{_libdir}/gems/%{name}/json-%{json_version}/json/ %{buildroot}%{ruby_libarchdir}/json mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version} @@ -912,6 +915,8 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/io-console-%{io_console_version}.gemspec %files -n rubygem-json +%{ruby_libdir}/json* +%{ruby_libarchdir}/json* %{_libdir}/gems/%{name}/json-%{json_version} %{gem_dir}/gems/json-%{json_version} %{gem_dir}/specifications/json-%{json_version}.gemspec @@ -953,6 +958,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Jul 12 2016 V鱈t Ondruch - 2.3.1-57 +- Make symlinks for json gem. + * Mon May 23 2016 V鱈t Ondruch - 2.3.1-56 - Requires rubygem(json) for rubygem-rdoc (rhbz#1325022). From 7684b6800d525e61d12253b21efa2447f4f5ad26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 10 Aug 2016 18:26:29 +0200 Subject: [PATCH 444/529] Workaround "an invalid stdio handle" error on PPC (rhbz#1361037). --- ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch | 119 +++++++++++++++++++ ruby.spec | 10 +- 2 files changed, 128 insertions(+), 1 deletion(-) create mode 100644 ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch diff --git a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch new file mode 100644 index 0000000..8765d2a --- /dev/null +++ b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch @@ -0,0 +1,119 @@ +From 346e147ba6480839b87046e9a9efab0bf6ed3660 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 10 Aug 2016 17:35:48 +0200 +Subject: [PATCH] Rely on ldd to detect glibc. + +This is just workaround, since we know we are quite sure this will be successful +on Red Hat platforms. + +This workaround rhbz#1361037 +--- + test/fiddle/helper.rb | 92 --------------------------------------------------- + 1 file changed, 92 deletions(-) + +diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb +index 1da3d93..65148a1 100644 +--- a/test/fiddle/helper.rb ++++ b/test/fiddle/helper.rb +@@ -6,98 +6,6 @@ + + libc_so = libm_so = nil + +-case RUBY_PLATFORM +-when /cygwin/ +- libc_so = "cygwin1.dll" +- libm_so = "cygwin1.dll" +-when /x86_64-linux/ +- libc_so = "/lib64/libc.so.6" +- libm_so = "/lib64/libm.so.6" +-when /linux/ +- libdir = '/lib' +- case [0].pack('L!').size +- when 4 +- # 32-bit ruby +- libdir = '/lib32' if File.directory? '/lib32' +- when 8 +- # 64-bit ruby +- libdir = '/lib64' if File.directory? '/lib64' +- end +- libc_so = File.join(libdir, "libc.so.6") +- libm_so = File.join(libdir, "libm.so.6") +-when /mingw/, /mswin/ +- require "rbconfig" +- crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase' +- libc_so = libm_so = "#{crtname}.dll" +-when /darwin/ +- libc_so = "/usr/lib/libc.dylib" +- libm_so = "/usr/lib/libm.dylib" +-when /kfreebsd/ +- libc_so = "/lib/libc.so.0.1" +- libm_so = "/lib/libm.so.1" +-when /gnu/ #GNU/Hurd +- libc_so = "/lib/libc.so.0.3" +- libm_so = "/lib/libm.so.6" +-when /mirbsd/ +- libc_so = "/usr/lib/libc.so.41.10" +- libm_so = "/usr/lib/libm.so.7.0" +-when /freebsd/ +- libc_so = "/lib/libc.so.7" +- libm_so = "/lib/libm.so.5" +-when /bsd|dragonfly/ +- libc_so = "/usr/lib/libc.so" +- libm_so = "/usr/lib/libm.so" +-when /solaris/ +- libdir = '/lib' +- case [0].pack('L!').size +- when 4 +- # 32-bit ruby +- libdir = '/lib' if File.directory? '/lib' +- when 8 +- # 64-bit ruby +- libdir = '/lib/64' if File.directory? '/lib/64' +- end +- libc_so = File.join(libdir, "libc.so") +- libm_so = File.join(libdir, "libm.so") +-when /aix/ +- pwd=Dir.pwd +- libc_so = libm_so = "#{pwd}/libaixdltest.so" +- unless File.exist? libc_so +- cobjs=%w!strcpy.o! +- mobjs=%w!floats.o sin.o! +- funcs=%w!sin sinf strcpy strncpy! +- expfile='dltest.exp' +- require 'tmpdir' +- Dir.mktmpdir do |dir| +- begin +- Dir.chdir dir +- %x!/usr/bin/ar x /usr/lib/libc.a #{cobjs.join(' ')}! +- %x!/usr/bin/ar x /usr/lib/libm.a #{mobjs.join(' ')}! +- %x!echo "#{funcs.join("\n")}\n" > #{expfile}! +- require 'rbconfig' +- if RbConfig::CONFIG["GCC"] = 'yes' +- lflag='-Wl,' +- else +- lflag='' +- end +- flags="#{lflag}-bE:#{expfile} #{lflag}-bnoentry -lm" +- %x!#{RbConfig::CONFIG["LDSHARED"]} -o #{libc_so} #{(cobjs+mobjs).join(' ')} #{flags}! +- ensure +- Dir.chdir pwd +- end +- end +- end +-else +- libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/ +- libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/ +- if( !(libc_so && libm_so) ) +- $stderr.puts("libc and libm not found: #{$0} ") +- end +-end +- +-libc_so = nil if !libc_so || (libc_so[0] == ?/ && !File.file?(libc_so)) +-libm_so = nil if !libm_so || (libm_so[0] == ?/ && !File.file?(libm_so)) +- + if !libc_so || !libm_so + ruby = EnvUtil.rubybin + ldd = `ldd #{ruby}` +-- +2.9.2 + diff --git a/ruby.spec b/ruby.spec index e75c0c8..829f506 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 57 +%global release 58 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -125,6 +125,10 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # Prevent test failures on ARM. # https://bugs.ruby-lang.org/issues/12331 Patch8: ruby-2.4.0-increase-timeout-for-ARMv7.patch +# Workaround "an invalid stdio handle" error on PPC, due to recently introduced +# hardening features of glibc (rhbz#1361037). +# https://bugs.ruby-lang.org/issues/12666 +Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -473,6 +477,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -958,6 +963,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Wed Aug 10 2016 V鱈t Ondruch - 2.3.1-58 +- Workaround "an invalid stdio handle" error on PPC (rhbz#1361037). + * Tue Jul 12 2016 V鱈t Ondruch - 2.3.1-57 - Make symlinks for json gem. From 46551f13fcf318224916557bdaff973335c2056c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 14 Oct 2016 10:36:21 +0100 Subject: [PATCH 445/529] config.h: Add riscv64 variant. --- config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/config.h b/config.h index 39e4a5c..b44f715 100644 --- a/config.h +++ b/config.h @@ -52,6 +52,8 @@ #include "ruby/config-mipsel.h" #elif defined(__mips) #include "ruby/config-mips.h" +#elif defined(__riscv64) +#include "ruby/config-riscv64.h" #else #error "The ruby-devel package is not usable with the architecture." #endif From c4c93c1113cad7eab3aaa57a2bd9247b530cff2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 21 Oct 2016 16:47:58 +0200 Subject: [PATCH 446/529] Use continue to use OpenSSL 1.0 for the moment. Only upcoming Ruby 2.4 support OpenSSL 1.1 so far: https://bugs.ruby-lang.org/issues/12830 --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 829f506..3cc576b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 58 +%global release 59 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -139,7 +139,7 @@ Recommends: rubygem(did_you_mean) >= %{did_you_mean_version} BuildRequires: autoconf BuildRequires: gdbm-devel BuildRequires: libffi-devel -BuildRequires: openssl-devel +BuildRequires: compat-openssl10-devel BuildRequires: libyaml-devel BuildRequires: readline-devel BuildRequires: tk-devel @@ -963,6 +963,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Oct 21 2016 V鱈t Ondruch - 2.3.1-59 +- Use continue to use OpenSSL 1.0 for the moment. + * Wed Aug 10 2016 V鱈t Ondruch - 2.3.1-58 - Workaround "an invalid stdio handle" error on PPC (rhbz#1361037). From dbf79976ab87a9fa860c1454c6ec7118d4b333f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 21 Oct 2016 16:48:42 +0200 Subject: [PATCH 447/529] Harden package. --- ruby.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ruby.spec b/ruby.spec index 3cc576b..659a4ed 100644 --- a/ruby.spec +++ b/ruby.spec @@ -490,6 +490,10 @@ cp -a %{SOURCE6} . %build autoconf +# Ruby does not respec LDFLAGS :( +# https://bugs.ruby-lang.org/issues/11863 +export EXTLDFLAGS="%{__global_ldflags}" + %configure \ --with-rubylibprefix='%{ruby_libdir}' \ --with-archlibdir='%{_libdir}' \ @@ -965,6 +969,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Fri Oct 21 2016 V鱈t Ondruch - 2.3.1-59 - Use continue to use OpenSSL 1.0 for the moment. +- Harden package. * Wed Aug 10 2016 V鱈t Ondruch - 2.3.1-58 - Workaround "an invalid stdio handle" error on PPC (rhbz#1361037). From 4fb1d9c02d92ae2f7ecaf1b644695ed94fc12978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 20 Oct 2016 13:55:21 +0200 Subject: [PATCH 448/529] Add gemspec_add_dep and gemspec_remove_dep macros. --- macros.rubygems | 78 +++++++++++++++++++++++++++++++++++++++++++++++++ ruby.spec | 1 + 2 files changed, 79 insertions(+) diff --git a/macros.rubygems b/macros.rubygems index 6d99ac3..8218ec9 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -34,3 +34,81 @@ gem install \\\ %rubygems_default_filter %{expand: \ %global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \ } + +# The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not +# essential, but it is usefull to make the sript appear in build log. + +# Add dependency named gem with version requirements to .gemspec. It adds +# runtime dependency by default. +# -g Specifies name of the gem dependency. +# -s Overrides the default .gemspec location. +# -d Add development dependecy. +# +# The remaining arguments are expected to be version requirements and should +# be valid Ruby code. +%gemspec_add_dep(g:s:d) \ +read -d '' gemspec_add_dep_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + \ + name = '%{-g*}' \ + requirements = %{*}%{!?1:nil} \ + \ + type = :%{!?-d:runtime}%{?-d:development} \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \ + if dep \ + dep.requirement.concat requirements \ + else \ + spec.public_send "add_#{type}_dependency", name, requirements \ + end \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_add_dep_script" | ruby \ +unset -v gemspec_add_dep_script \ +%{nil} + +# Remove dependency named gem with version requirements to .gemspec. It +# removes runtime dependency by default. +# -g Specifies name of the gem dependency. +# -s Overrides the default .gemspec location. +# -d Remove development dependecy. +# +# The remaining arguments are expected to be version requirements and should +# be valid Ruby code. The macro fails if these specific requirements can't be +# removed. +%gemspec_remove_dep(g:s:d) \ +read -d '' gemspec_remove_dep_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + \ + name = '%{-g*}' \ + requirements = %{*}%{!?1:nil} \ + \ + type = :%{!?-d:runtime}%{?-d:development} \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \ + if dep \ + if requirements \ + requirements = Gem::Requirement.create(requirements).requirements \ + requirements.each do |r| \ + unless dep.requirement.requirements.reject! { |dependency_requirements| dependency_requirements == r } \ + abort("Requirement '#{r.first} #{r.last}' was not possible to remove for dependency '#{dep}'!") \ + end \ + end \ + spec.dependencies.delete dep if dep.requirement.requirements.empty? \ + else \ + spec.dependencies.delete dep \ + end \ + else \ + abort("Dependency '#{name}' was not found!") \ + end \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_remove_dep_script" | ruby \ +unset -v gemspec_remove_dep_script \ +%{nil} diff --git a/ruby.spec b/ruby.spec index 659a4ed..e0ba0de 100644 --- a/ruby.spec +++ b/ruby.spec @@ -969,6 +969,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Fri Oct 21 2016 V鱈t Ondruch - 2.3.1-59 - Use continue to use OpenSSL 1.0 for the moment. +- Add gemspec_add_dep and gemspec_remove_dep macros. - Harden package. * Wed Aug 10 2016 V鱈t Ondruch - 2.3.1-58 From 2e9e67ab5bb1bd97212856674291c515f5010030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 21 Oct 2016 12:36:39 +0200 Subject: [PATCH 449/529] Improve macro documentation. --- macros.rubygems | 52 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/macros.rubygems b/macros.rubygems index 8218ec9..45c59c4 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -10,9 +10,14 @@ %gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec %gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} -# Install gem into appropriate directory. -# -n Overrides gem file name for installation. -# -d Set installation directory. + +# %gem_install - Install gem into appropriate directory. +# +# Usage: %gem_install [options] +# +# -n Overrides gem file name for installation. +# -d Set installation directory. +# %gem_install(d:n:) \ mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \ \ @@ -26,6 +31,7 @@ gem install \\\ %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \ %{nil} + # For rubygems packages we want to filter out any provides caused by private # libs in %%{gem_archdir}. # @@ -35,17 +41,23 @@ gem install \\\ %global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \ } + # The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not # essential, but it is usefull to make the sript appear in build log. -# Add dependency named gem with version requirements to .gemspec. It adds -# runtime dependency by default. -# -g Specifies name of the gem dependency. -# -s Overrides the default .gemspec location. -# -d Add development dependecy. + +# %gemspec_add_dep - Add dependency into .gemspec. +# +# Usage: %gemspec_add_dep -g [options] [requirements] +# +# Add dependency named to .gemspec file. The macro adds runtime +# dependency by default. The [requirements] argument can be used to specify +# the dependency constraints more precisely. It is expected to be valid Ruby +# code. +# +# -s Overrides the default .gemspec location. +# -d Add development dependecy. # -# The remaining arguments are expected to be version requirements and should -# be valid Ruby code. %gemspec_add_dep(g:s:d) \ read -d '' gemspec_add_dep_script << 'EOR' || : \ gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ @@ -70,15 +82,19 @@ echo "$gemspec_add_dep_script" | ruby \ unset -v gemspec_add_dep_script \ %{nil} -# Remove dependency named gem with version requirements to .gemspec. It -# removes runtime dependency by default. -# -g Specifies name of the gem dependency. -# -s Overrides the default .gemspec location. -# -d Remove development dependecy. + +# %gemspec_remove_dep - Remove dependency from .gemspec. +# +# Usage: %gemspec_remove_dep -g [options] [requirements] +# +# Remove dependency named from .gemspec file. The macro removes runtime +# dependency by default. The [requirements] argument can be used to specify +# the dependency constraints more precisely. It is expected to be valid Ruby +# code. The macro fails if these specific requirements can't be removed. +# +# -s Overrides the default .gemspec location. +# -d Remove development dependecy. # -# The remaining arguments are expected to be version requirements and should -# be valid Ruby code. The macro fails if these specific requirements can't be -# removed. %gemspec_remove_dep(g:s:d) \ read -d '' gemspec_remove_dep_script << 'EOR' || : \ gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ From 2221c5b84347a5b6b430e191719c542557a3d7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 24 Oct 2016 10:48:05 +0200 Subject: [PATCH 450/529] Avoid conflict between OpenSSL 1.0.x and 1.1.x. --- ...-ex_data-index-for-X509_STORE-_CTX-r.patch | 206 ++++++++++++++++++ ruby.spec | 6 +- 2 files changed, 211 insertions(+), 1 deletion(-) create mode 100644 ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch diff --git a/ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch b/ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch new file mode 100644 index 0000000..594d5f9 --- /dev/null +++ b/ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch @@ -0,0 +1,206 @@ +From 2aabfcd4c604891ab043649129bb1404e3c311f0 Mon Sep 17 00:00:00 2001 +From: rhe +Date: Thu, 19 May 2016 04:53:05 +0000 +Subject: [PATCH] openssl: register ex_data index for X509_STORE{_CTX,} + respectively + +* ext/openssl/ossl.c (Init_openssl): register an ex_data index for + X509_STORE and X509_STORE_CTX respectively. Since they don't share + the ex_data index registry, we can't use the same index. + (ossl_verify_cb): use the the correct index. + +* ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto. + +* ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto. + (ossl_x509stctx_verify): ditto. + +* ext/openssl/ossl.h (void ossl_clear_error): add extern declarations + of ossl_store_{ctx_,}ex_verify_cb_idx. + +* ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and + X509_STORE_get_ex_data. + +* ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data, + X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + ChangeLog | 21 +++++++++++++++++++++ + ext/openssl/openssl_missing.c | 14 -------------- + ext/openssl/openssl_missing.h | 9 +++++++-- + ext/openssl/ossl.c | 15 +++++++++------ + ext/openssl/ossl.h | 3 ++- + ext/openssl/ossl_ssl.c | 2 +- + ext/openssl/ossl_x509store.c | 4 ++-- + 7 files changed, 42 insertions(+), 26 deletions(-) + +diff --git a/ChangeLog b/ChangeLog +index c163123..73ea253 100644 +--- a/ChangeLog ++++ b/ChangeLog +@@ -1,3 +1,24 @@ ++Thu May 19 13:22:44 2016 Kazuki Yamaguchi ++ ++ * ext/openssl/ossl.c (Init_openssl): register an ex_data index for ++ X509_STORE and X509_STORE_CTX respectively. Since they don't share ++ the ex_data index registry, we can't use the same index. ++ (ossl_verify_cb): use the the correct index. ++ ++ * ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto. ++ ++ * ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto. ++ (ossl_x509stctx_verify): ditto. ++ ++ * ext/openssl/ossl.h (void ossl_clear_error): add extern declarations ++ of ossl_store_{ctx_,}ex_verify_cb_idx. ++ ++ * ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and ++ X509_STORE_get_ex_data. ++ ++ * ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data, ++ X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros. ++ + Tue Apr 26 02:58:51 2016 Marcus Stollsteimer + + * doc/extension.rdoc: Improvements to english grammers. +diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c +index bd8eef5..31f2d0a 100644 +--- a/ext/openssl/openssl_missing.c ++++ b/ext/openssl/openssl_missing.c +@@ -34,20 +34,6 @@ HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in) + #endif /* HAVE_HMAC_CTX_COPY */ + #endif /* NO_HMAC */ + +-#if !defined(HAVE_X509_STORE_SET_EX_DATA) +-int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data) +-{ +- return CRYPTO_set_ex_data(&str->ex_data, idx, data); +-} +-#endif +- +-#if !defined(HAVE_X509_STORE_GET_EX_DATA) +-void *X509_STORE_get_ex_data(X509_STORE *str, int idx) +-{ +- return CRYPTO_get_ex_data(&str->ex_data, idx); +-} +-#endif +- + #if !defined(HAVE_EVP_MD_CTX_CREATE) + EVP_MD_CTX * + EVP_MD_CTX_create(void) +diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h +index 2dc49d3..955579c 100644 +--- a/ext/openssl/openssl_missing.h ++++ b/ext/openssl/openssl_missing.h +@@ -133,11 +133,16 @@ int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in); + #endif + + #if !defined(HAVE_X509_STORE_GET_EX_DATA) +-void *X509_STORE_get_ex_data(X509_STORE *str, int idx); ++# define X509_STORE_get_ex_data(x, idx) \ ++ CRYPTO_get_ex_data(&(x)->ex_data, (idx)) + #endif + + #if !defined(HAVE_X509_STORE_SET_EX_DATA) +-int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data); ++# define X509_STORE_set_ex_data(x, idx, data) \ ++ CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data)) ++# define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \ ++ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \ ++ (newf), (dupf), (freef)) + #endif + + #if !defined(HAVE_X509_CRL_SET_VERSION) +diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c +index ac82815..2b5579e 100644 +--- a/ext/openssl/ossl.c ++++ b/ext/openssl/ossl.c +@@ -198,7 +198,8 @@ ossl_pem_passwd_cb(char *buf, int max_len, int flag, void *pwd) + /* + * Verify callback + */ +-int ossl_verify_cb_idx; ++int ossl_store_ctx_ex_verify_cb_idx; ++int ossl_store_ex_verify_cb_idx; + + VALUE + ossl_call_verify_cb_proc(struct ossl_verify_cb_args *args) +@@ -214,10 +215,10 @@ ossl_verify_cb(int ok, X509_STORE_CTX *ctx) + struct ossl_verify_cb_args args; + int state = 0; + +- proc = (VALUE)X509_STORE_CTX_get_ex_data(ctx, ossl_verify_cb_idx); +- if ((void*)proc == 0) +- proc = (VALUE)X509_STORE_get_ex_data(ctx->ctx, ossl_verify_cb_idx); +- if ((void*)proc == 0) ++ proc = (VALUE)X509_STORE_CTX_get_ex_data(ctx, ossl_store_ctx_ex_verify_cb_idx); ++ if (!proc) ++ proc = (VALUE)X509_STORE_get_ex_data(ctx->ctx, ossl_store_ex_verify_cb_idx); ++ if (!proc) + return ok; + if (!NIL_P(proc)) { + ret = Qfalse; +@@ -1127,8 +1128,10 @@ Init_openssl(void) + /* + * Verify callback Proc index for ext-data + */ +- if ((ossl_verify_cb_idx = X509_STORE_CTX_get_ex_new_index(0, (void *)"ossl_verify_cb_idx", 0, 0, 0)) < 0) ++ if ((ossl_store_ctx_ex_verify_cb_idx = X509_STORE_CTX_get_ex_new_index(0, (void *)"ossl_store_ctx_ex_verify_cb_idx", 0, 0, 0)) < 0) + ossl_raise(eOSSLError, "X509_STORE_CTX_get_ex_new_index"); ++ if ((ossl_store_ex_verify_cb_idx = X509_STORE_get_ex_new_index(0, (void *)"ossl_store_ex_verify_cb_idx", 0, 0, 0)) < 0) ++ ossl_raise(eOSSLError, "X509_STORE_get_ex_new_index"); + + /* + * Init debug core +diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h +index a31ca95..5b2f6e1 100644 +--- a/ext/openssl/ossl.h ++++ b/ext/openssl/ossl.h +@@ -167,7 +167,8 @@ void ossl_clear_error(void); + /* + * Verify callback + */ +-extern int ossl_verify_cb_idx; ++extern int ossl_store_ctx_ex_verify_cb_idx; ++extern int ossl_store_ex_verify_cb_idx; + + struct ossl_verify_cb_args { + VALUE proc; +diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c +index 938e36f..87df7f9 100644 +--- a/ext/openssl/ossl_ssl.c ++++ b/ext/openssl/ossl_ssl.c +@@ -307,7 +307,7 @@ ossl_ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx) + + ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); + cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_vcb_idx); +- X509_STORE_CTX_set_ex_data(ctx, ossl_verify_cb_idx, (void*)cb); ++ X509_STORE_CTX_set_ex_data(ctx, ossl_store_ctx_ex_verify_cb_idx, (void *)cb); + return ossl_verify_cb(preverify_ok, ctx); + } + +diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c +index aca25b1..8d6f9de 100644 +--- a/ext/openssl/ossl_x509store.c ++++ b/ext/openssl/ossl_x509store.c +@@ -130,7 +130,7 @@ ossl_x509store_set_vfy_cb(VALUE self, VALUE cb) + X509_STORE *store; + + GetX509Store(self, store); +- X509_STORE_set_ex_data(store, ossl_verify_cb_idx, (void*)cb); ++ X509_STORE_set_ex_data(store, ossl_store_ex_verify_cb_idx, (void *)cb); + rb_iv_set(self, "@verify_callback", cb); + + return cb; +@@ -467,7 +467,7 @@ ossl_x509stctx_verify(VALUE self) + int result; + + GetX509StCtx(self, ctx); +- X509_STORE_CTX_set_ex_data(ctx, ossl_verify_cb_idx, ++ X509_STORE_CTX_set_ex_data(ctx, ossl_store_ctx_ex_verify_cb_idx, + (void*)rb_iv_get(self, "@verify_callback")); + result = X509_verify_cert(ctx); + +-- +2.10.0 + diff --git a/ruby.spec b/ruby.spec index e0ba0de..2817201 100644 --- a/ruby.spec +++ b/ruby.spec @@ -129,6 +129,9 @@ Patch8: ruby-2.4.0-increase-timeout-for-ARMv7.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +# Avoid conflict between OpenSSL 1.0.x and 1.1.x. +# https://bugs.ruby-lang.org/issues/12868 +Patch10: ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -478,6 +481,7 @@ rm -rf ext/fiddle/libffi* %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -968,7 +972,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Fri Oct 21 2016 V鱈t Ondruch - 2.3.1-59 -- Use continue to use OpenSSL 1.0 for the moment. +- Continue to use OpenSSL 1.0 for the moment. - Add gemspec_add_dep and gemspec_remove_dep macros. - Harden package. From 0a64e4b921f6b38f91813ae8dbd714facf4e9491 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 18 Nov 2016 16:58:41 +0100 Subject: [PATCH 451/529] Update to Ruby 2.3.2. --- ruby-2.3.0-ruby_version.patch | 4 +- ruby-2.4.0-increase-timeout-for-ARMv7.patch | 25 --- ...-ex_data-index-for-X509_STORE-_CTX-r.patch | 206 ------------------ ruby.spec | 26 +-- sources | 2 +- 5 files changed, 14 insertions(+), 249 deletions(-) delete mode 100644 ruby-2.4.0-increase-timeout-for-ARMv7.patch delete mode 100644 ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index cdd016c..96d7249 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -249,7 +249,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 0428bea..b6e090e 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -963,7 +963,8 @@ def test_self_use_paths +@@ -962,7 +962,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -259,7 +259,7 @@ index 0428bea..b6e090e 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1090,7 +1091,7 @@ def test_self_user_home_user_drive_and_path +@@ -1089,7 +1090,7 @@ def test_self_user_home_user_drive_and_path def test_self_vendor_dir expected = File.join RbConfig::CONFIG['vendordir'], 'gems', diff --git a/ruby-2.4.0-increase-timeout-for-ARMv7.patch b/ruby-2.4.0-increase-timeout-for-ARMv7.patch deleted file mode 100644 index d0dfcb2..0000000 --- a/ruby-2.4.0-increase-timeout-for-ARMv7.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 35568b41699ca1cd466fc8d23a84139b73ad0f1b Mon Sep 17 00:00:00 2001 -From: naruse -Date: Tue, 19 Jan 2016 02:52:37 +0000 -Subject: [PATCH] increase timeout for ARMv7 - -http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-trunk/log/20160113T091704Z.diff.html.gz - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/ruby/test_iseq.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb -index 7af8c1b..4561eeb 100644 ---- a/test/ruby/test_iseq.rb -+++ b/test/ruby/test_iseq.rb -@@ -187,7 +187,7 @@ def test_safe_call_chain - end - - def test_parent_iseq_mark -- assert_separately([], <<-'end;') -+ assert_separately([], <<-'end;', timeout: 20) - ->{ - ->{ - ->{ diff --git a/ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch b/ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch deleted file mode 100644 index 594d5f9..0000000 --- a/ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch +++ /dev/null @@ -1,206 +0,0 @@ -From 2aabfcd4c604891ab043649129bb1404e3c311f0 Mon Sep 17 00:00:00 2001 -From: rhe -Date: Thu, 19 May 2016 04:53:05 +0000 -Subject: [PATCH] openssl: register ex_data index for X509_STORE{_CTX,} - respectively - -* ext/openssl/ossl.c (Init_openssl): register an ex_data index for - X509_STORE and X509_STORE_CTX respectively. Since they don't share - the ex_data index registry, we can't use the same index. - (ossl_verify_cb): use the the correct index. - -* ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto. - -* ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto. - (ossl_x509stctx_verify): ditto. - -* ext/openssl/ossl.h (void ossl_clear_error): add extern declarations - of ossl_store_{ctx_,}ex_verify_cb_idx. - -* ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and - X509_STORE_get_ex_data. - -* ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data, - X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - ChangeLog | 21 +++++++++++++++++++++ - ext/openssl/openssl_missing.c | 14 -------------- - ext/openssl/openssl_missing.h | 9 +++++++-- - ext/openssl/ossl.c | 15 +++++++++------ - ext/openssl/ossl.h | 3 ++- - ext/openssl/ossl_ssl.c | 2 +- - ext/openssl/ossl_x509store.c | 4 ++-- - 7 files changed, 42 insertions(+), 26 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index c163123..73ea253 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,24 @@ -+Thu May 19 13:22:44 2016 Kazuki Yamaguchi -+ -+ * ext/openssl/ossl.c (Init_openssl): register an ex_data index for -+ X509_STORE and X509_STORE_CTX respectively. Since they don't share -+ the ex_data index registry, we can't use the same index. -+ (ossl_verify_cb): use the the correct index. -+ -+ * ext/openssl/ossl_ssl.c (ossl_ssl_verify_callback): ditto. -+ -+ * ext/openssl/ossl_x509store.c (ossl_x509store_set_vfy_cb): ditto. -+ (ossl_x509stctx_verify): ditto. -+ -+ * ext/openssl/ossl.h (void ossl_clear_error): add extern declarations -+ of ossl_store_{ctx_,}ex_verify_cb_idx. -+ -+ * ext/openssl/openssl_missing.c: remove X509_STORE_set_ex_data and -+ X509_STORE_get_ex_data. -+ -+ * ext/openssl/openssl_missing.h: implement X509_STORE_get_ex_data, -+ X509_STORE_set_ex_data and X509_STORE_get_ex_new_index as macros. -+ - Tue Apr 26 02:58:51 2016 Marcus Stollsteimer - - * doc/extension.rdoc: Improvements to english grammers. -diff --git a/ext/openssl/openssl_missing.c b/ext/openssl/openssl_missing.c -index bd8eef5..31f2d0a 100644 ---- a/ext/openssl/openssl_missing.c -+++ b/ext/openssl/openssl_missing.c -@@ -34,20 +34,6 @@ HMAC_CTX_copy(HMAC_CTX *out, HMAC_CTX *in) - #endif /* HAVE_HMAC_CTX_COPY */ - #endif /* NO_HMAC */ - --#if !defined(HAVE_X509_STORE_SET_EX_DATA) --int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data) --{ -- return CRYPTO_set_ex_data(&str->ex_data, idx, data); --} --#endif -- --#if !defined(HAVE_X509_STORE_GET_EX_DATA) --void *X509_STORE_get_ex_data(X509_STORE *str, int idx) --{ -- return CRYPTO_get_ex_data(&str->ex_data, idx); --} --#endif -- - #if !defined(HAVE_EVP_MD_CTX_CREATE) - EVP_MD_CTX * - EVP_MD_CTX_create(void) -diff --git a/ext/openssl/openssl_missing.h b/ext/openssl/openssl_missing.h -index 2dc49d3..955579c 100644 ---- a/ext/openssl/openssl_missing.h -+++ b/ext/openssl/openssl_missing.h -@@ -133,11 +133,16 @@ int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, EVP_CIPHER_CTX *in); - #endif - - #if !defined(HAVE_X509_STORE_GET_EX_DATA) --void *X509_STORE_get_ex_data(X509_STORE *str, int idx); -+# define X509_STORE_get_ex_data(x, idx) \ -+ CRYPTO_get_ex_data(&(x)->ex_data, (idx)) - #endif - - #if !defined(HAVE_X509_STORE_SET_EX_DATA) --int X509_STORE_set_ex_data(X509_STORE *str, int idx, void *data); -+# define X509_STORE_set_ex_data(x, idx, data) \ -+ CRYPTO_set_ex_data(&(x)->ex_data, (idx), (data)) -+# define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \ -+ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, (l), (p), \ -+ (newf), (dupf), (freef)) - #endif - - #if !defined(HAVE_X509_CRL_SET_VERSION) -diff --git a/ext/openssl/ossl.c b/ext/openssl/ossl.c -index ac82815..2b5579e 100644 ---- a/ext/openssl/ossl.c -+++ b/ext/openssl/ossl.c -@@ -198,7 +198,8 @@ ossl_pem_passwd_cb(char *buf, int max_len, int flag, void *pwd) - /* - * Verify callback - */ --int ossl_verify_cb_idx; -+int ossl_store_ctx_ex_verify_cb_idx; -+int ossl_store_ex_verify_cb_idx; - - VALUE - ossl_call_verify_cb_proc(struct ossl_verify_cb_args *args) -@@ -214,10 +215,10 @@ ossl_verify_cb(int ok, X509_STORE_CTX *ctx) - struct ossl_verify_cb_args args; - int state = 0; - -- proc = (VALUE)X509_STORE_CTX_get_ex_data(ctx, ossl_verify_cb_idx); -- if ((void*)proc == 0) -- proc = (VALUE)X509_STORE_get_ex_data(ctx->ctx, ossl_verify_cb_idx); -- if ((void*)proc == 0) -+ proc = (VALUE)X509_STORE_CTX_get_ex_data(ctx, ossl_store_ctx_ex_verify_cb_idx); -+ if (!proc) -+ proc = (VALUE)X509_STORE_get_ex_data(ctx->ctx, ossl_store_ex_verify_cb_idx); -+ if (!proc) - return ok; - if (!NIL_P(proc)) { - ret = Qfalse; -@@ -1127,8 +1128,10 @@ Init_openssl(void) - /* - * Verify callback Proc index for ext-data - */ -- if ((ossl_verify_cb_idx = X509_STORE_CTX_get_ex_new_index(0, (void *)"ossl_verify_cb_idx", 0, 0, 0)) < 0) -+ if ((ossl_store_ctx_ex_verify_cb_idx = X509_STORE_CTX_get_ex_new_index(0, (void *)"ossl_store_ctx_ex_verify_cb_idx", 0, 0, 0)) < 0) - ossl_raise(eOSSLError, "X509_STORE_CTX_get_ex_new_index"); -+ if ((ossl_store_ex_verify_cb_idx = X509_STORE_get_ex_new_index(0, (void *)"ossl_store_ex_verify_cb_idx", 0, 0, 0)) < 0) -+ ossl_raise(eOSSLError, "X509_STORE_get_ex_new_index"); - - /* - * Init debug core -diff --git a/ext/openssl/ossl.h b/ext/openssl/ossl.h -index a31ca95..5b2f6e1 100644 ---- a/ext/openssl/ossl.h -+++ b/ext/openssl/ossl.h -@@ -167,7 +167,8 @@ void ossl_clear_error(void); - /* - * Verify callback - */ --extern int ossl_verify_cb_idx; -+extern int ossl_store_ctx_ex_verify_cb_idx; -+extern int ossl_store_ex_verify_cb_idx; - - struct ossl_verify_cb_args { - VALUE proc; -diff --git a/ext/openssl/ossl_ssl.c b/ext/openssl/ossl_ssl.c -index 938e36f..87df7f9 100644 ---- a/ext/openssl/ossl_ssl.c -+++ b/ext/openssl/ossl_ssl.c -@@ -307,7 +307,7 @@ ossl_ssl_verify_callback(int preverify_ok, X509_STORE_CTX *ctx) - - ssl = X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx()); - cb = (VALUE)SSL_get_ex_data(ssl, ossl_ssl_ex_vcb_idx); -- X509_STORE_CTX_set_ex_data(ctx, ossl_verify_cb_idx, (void*)cb); -+ X509_STORE_CTX_set_ex_data(ctx, ossl_store_ctx_ex_verify_cb_idx, (void *)cb); - return ossl_verify_cb(preverify_ok, ctx); - } - -diff --git a/ext/openssl/ossl_x509store.c b/ext/openssl/ossl_x509store.c -index aca25b1..8d6f9de 100644 ---- a/ext/openssl/ossl_x509store.c -+++ b/ext/openssl/ossl_x509store.c -@@ -130,7 +130,7 @@ ossl_x509store_set_vfy_cb(VALUE self, VALUE cb) - X509_STORE *store; - - GetX509Store(self, store); -- X509_STORE_set_ex_data(store, ossl_verify_cb_idx, (void*)cb); -+ X509_STORE_set_ex_data(store, ossl_store_ex_verify_cb_idx, (void *)cb); - rb_iv_set(self, "@verify_callback", cb); - - return cb; -@@ -467,7 +467,7 @@ ossl_x509stctx_verify(VALUE self) - int result; - - GetX509StCtx(self, ctx); -- X509_STORE_CTX_set_ex_data(ctx, ossl_verify_cb_idx, -+ X509_STORE_CTX_set_ex_data(ctx, ossl_store_ctx_ex_verify_cb_idx, - (void*)rb_iv_get(self, "@verify_callback")); - result = X509_verify_cert(ctx); - --- -2.10.0 - diff --git a/ruby.spec b/ruby.spec index 2817201..5b8b02b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 3 -%global teeny_version 1 +%global teeny_version 2 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 59 +%global release 60 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -29,8 +29,8 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.5.1 -%global molinillo_version 0.4.0 +%global rubygems_version 2.5.2 +%global molinillo_version 0.4.1 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 @@ -40,9 +40,9 @@ %global did_you_mean_version 1.0.0 %global io_console_version 0.4.5 %global json_version 1.8.3 -%global minitest_version 5.8.3 +%global minitest_version 5.8.5 %global power_assert_version 0.2.6 -%global psych_version 2.0.17 +%global psych_version 2.1.0 %global rake_version 10.4.2 %global rdoc_version 4.2.1 %global net_telnet_version 0.1.1 @@ -122,16 +122,10 @@ Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch # Use miniruby to regenerate prelude.c. # https://bugs.ruby-lang.org/issues/10554 Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch -# Prevent test failures on ARM. -# https://bugs.ruby-lang.org/issues/12331 -Patch8: ruby-2.4.0-increase-timeout-for-ARMv7.patch # Workaround "an invalid stdio handle" error on PPC, due to recently introduced # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch -# Avoid conflict between OpenSSL 1.0.x and 1.1.x. -# https://bugs.ruby-lang.org/issues/12868 -Patch10: ruby-2.4.0-openssl-register-ex_data-index-for-X509_STORE-_CTX-r.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -479,9 +473,7 @@ rm -rf ext/fiddle/libffi* %patch5 -p1 %patch6 -p1 %patch7 -p1 -%patch8 -p1 %patch9 -p1 -%patch10 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -545,7 +537,8 @@ for cert in \ EntrustnetSecureServerCertificationAuthority.pem \ GeoTrustGlobalCA.pem \ AddTrustExternalCARoot.pem \ - AddTrustExternalCARoot-2048.pem + AddTrustExternalCARoot-2048.pem \ + GlobalSignRootCA.pem do rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert done @@ -971,6 +964,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Fri Nov 18 2016 V鱈t Ondruch - 2.3.2-60 +- Update to Ruby 2.3.2. + * Fri Oct 21 2016 V鱈t Ondruch - 2.3.1-59 - Continue to use OpenSSL 1.0 for the moment. - Add gemspec_add_dep and gemspec_remove_dep macros. diff --git a/sources b/sources index 6eb7405..9f89eaf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -01e9d172a5c33b385e92fc0cc2899766 ruby-2.3.1.tar.xz +37bae2bf9cf6deda3b7d8b0ad61fc0af ruby-2.3.2.tar.xz From 324c2d071e3ab9ccbf4e02002ac7b945a4ec319a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 18 Nov 2016 17:22:30 +0100 Subject: [PATCH 452/529] Ensure there is not forgotten any certificate. --- ruby.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ruby.spec b/ruby.spec index 5b8b02b..e5d1549 100644 --- a/ruby.spec +++ b/ruby.spec @@ -542,6 +542,8 @@ for cert in \ do rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert done +# Ensure there is not forgotten any certificate. +test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)" # Move macros file into proper place and replace the %%{name} macro, since it # would be wrongly evaluated during build of other packages. From b3e0a8c314a6b918f25a870515a6346e83b76431 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 22 Nov 2016 13:25:46 +0100 Subject: [PATCH 453/529] Exclude json.rb from ruby-libs (rhbz#1397370). --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e5d1549..0b14b9b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 60 +%global release 61 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -716,6 +716,7 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/*.rb %exclude %{ruby_libdir}/*-tk.rb %exclude %{ruby_libdir}/irb.rb +%exclude %{ruby_libdir}/json.rb %exclude %{ruby_libdir}/tcltk.rb %exclude %{ruby_libdir}/tk*.rb %exclude %{ruby_libdir}/psych.rb @@ -966,6 +967,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog +* Tue Nov 22 2016 V鱈t Ondruch - 2.3.2-61 +- Exclude json.rb from ruby-libs (rhbz#1397370). + * Fri Nov 18 2016 V鱈t Ondruch - 2.3.2-60 - Update to Ruby 2.3.2. From d14e3f780f68851070c2a5bf08b61327a59d857c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 22 Nov 2016 13:27:42 +0100 Subject: [PATCH 454/529] Update to Ruby 2.3.3. --- ruby.spec | 5 +++-- sources | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 0b14b9b..201961a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 3 -%global teeny_version 2 +%global teeny_version 3 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -967,7 +967,8 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/tkextlib %changelog -* Tue Nov 22 2016 V鱈t Ondruch - 2.3.2-61 +* Tue Nov 22 2016 V鱈t Ondruch - 2.3.3-61 +- Update to Ruby 2.3.3. - Exclude json.rb from ruby-libs (rhbz#1397370). * Fri Nov 18 2016 V鱈t Ondruch - 2.3.2-60 diff --git a/sources b/sources index 9f89eaf..26c008e 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -37bae2bf9cf6deda3b7d8b0ad61fc0af ruby-2.3.2.tar.xz +0cba3d1b677d2695236ace62ca6d2255 ruby-2.3.3.tar.xz From 3130f89edd72b661d3c7bb776241a6bcf771f6c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 9 Jan 2017 15:58:21 +0100 Subject: [PATCH 455/529] Upgrade to Ruby 2.4.0. Move gemified xmlrpc into subpackage. Move gemified openssl into subpackage. Tk is removed from stdlib. Extend 'gem_' macros for pre-release version support. --- macros.rubygems | 12 +- ruby-1.9.3-mkmf-verbose.patch | 4 +- ...-additional-preludes-by-configuratio.patch | 4 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 4 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 8 +- ...2.3-Generate-preludes-using-miniruby.patch | 10 +- ruby-2.3.0-ruby_version.patch | 24 +- ruby.spec | 209 +++++++++++------- sources | 2 +- test_systemtap.rb | 37 ++-- 12 files changed, 183 insertions(+), 135 deletions(-) diff --git a/macros.rubygems b/macros.rubygems index 45c59c4..0652ec6 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -3,12 +3,12 @@ %gem_archdir %{_libdir}/gems # Common gem locations and files. -%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version} -%gem_extdir_mri %{gem_archdir}/%{name}/%{gem_name}-%{version} +%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{?prerelease} +%gem_extdir_mri %{gem_archdir}/%{name}/%{gem_name}-%{version}%{?prerelease} %gem_libdir %{gem_instdir}/lib -%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem -%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec -%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version} +%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}%{?prerelease}.gem +%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}%{?prerelease}.gemspec +%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}%{?prerelease} # %gem_install - Install gem into appropriate directory. @@ -28,7 +28,7 @@ gem install \\\ --build-root %{-d*}%{!?-d:.} \\\ --force \\\ --document=ri,rdoc \\\ - %{-n*}%{!?-n:%{gem_name}-%{version}.gem} \ + %{-n*}%{!?-n:%{gem_name}-%{version}%{?prerelease}.gem} \ %{nil} diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index ccbd972..d94ef7f 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1892,7 +1892,7 @@ def configuration(srcdir) +@@ -1897,7 +1897,7 @@ def configuration(srcdir) SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. @@ -19,7 +19,7 @@ index 682eb46..e6b1445 100644 +V = 1 Q1 = $(V:1=) Q = $(Q1:0=@) - ECHO1 = $(V:1=@#{CONFIG['NULLCMD']}) + ECHO1 = $(V:1=@ #{CONFIG['NULLCMD']}) -- 1.8.3.1 diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 75eb363..af8b9a9 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -26,7 +26,7 @@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -127,7 +127,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) +@@ -144,7 +144,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) DEFAULT_PRELUDES = $(GEM_PRELUDE) @@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -4374,6 +4374,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4536,6 +4536,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 43fa7f6..a4e6c28 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3632,6 +3632,11 @@ if test ${multiarch+set}; then +@@ -3790,6 +3790,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index eb34107..e841569 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index db37cd6..ce8d149 100644 --- a/configure.in +++ b/configure.in -@@ -4228,7 +4228,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -4390,7 +4390,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then @@ -67,7 +67,7 @@ diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 07076d4..35e6c3c 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb -@@ -122,7 +122,7 @@ def config.write(arg) +@@ -113,7 +113,7 @@ val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump case name when /^prefix$/ diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 9d78b05..ba358f3 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -4292,6 +4292,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4454,6 +4454,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index e82f172..44fe4a7 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -4264,6 +4264,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4426,6 +4426,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4288,6 +4292,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4450,6 +4454,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -328,6 +328,7 @@ def CONFIG.[](name, mandatory = false) +@@ -330,6 +330,7 @@ def CONFIG.[](name, mandatory = false) sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -75,7 +75,7 @@ index b47b6e1..0b99408 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -506,7 +507,15 @@ def CONFIG.[](name, mandatory = false) +@@ -517,7 +518,15 @@ def CONFIG.[](name, mandatory = false) install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir noinst = %w[README* *.txt *.rdoc *.gemspec] diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch index aa17411..6e8adc4 100644 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -11,12 +11,12 @@ diff --git a/common.mk b/common.mk index 168dc52..20c218a 100644 --- a/common.mk +++ b/common.mk -@@ -839,9 +839,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) +@@ -873,9 +873,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) + $(srcdir)/template/prelude.c.tmpl + $(PRELUDE_C): $(COMPILE_PRELUDE) \ - {$(srcdir)}lib/rubygems/defaults.rb \ - {$(srcdir)}lib/rubygems/core_ext/kernel_gem.rb \ -- $(PRELUDE_SCRIPTS) $(LIB_SRCS) -+ $(PRELUDE_SCRIPTS) $(PREP) $(LIB_SRCS) +- $(PRELUDE_SCRIPTS) ++ $(PRELUDE_SCRIPTS) $(PREP) $(ECHO) generating $@ - $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ + $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 96d7249..b4d6f76 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -12,15 +12,15 @@ ruby_version_dir_name now specifies custom version string for versioned directories, e.g. instead of default X.Y.Z, you can specify whatever string. --- - configure.in | 68 ++++++++++++++++++++++++++++------------------------- + configure.in | 64 ++++++++++++++++++++++++++++------------------------- template/ruby.pc.in | 1 + - 2 files changed, 37 insertions(+), 32 deletions(-) + 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/configure.in b/configure.in index db37cd6..6e73fae 100644 --- a/configure.in +++ b/configure.in -@@ -4177,9 +4177,6 @@ AS_CASE(["$target_os"], +@@ -4341,9 +4341,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index db37cd6..6e73fae 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -4202,58 +4199,64 @@ AC_ARG_WITH(ridir, +@@ -4366,56 +4363,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -48,11 +48,9 @@ index db37cd6..6e73fae 100644 - echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE" - echo '#define STRINGIZE(x) x' - test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0' -- echo '#include "verconf.h"' - echo '#include "version.h"' - echo 'ruby_version=RUBY_LIB_VERSION' - } > conftest.c -- test -f verconf.h || > verconf.h - ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" - eval $ruby_version -elif test -z "${ruby_version}"; then @@ -65,11 +63,9 @@ index db37cd6..6e73fae 100644 +echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE" +echo '#define STRINGIZE(x) x' +test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0' -+echo '#include "verconf.h"' +echo '#include "version.h"' +echo 'ruby_version=RUBY_LIB_VERSION' +} > conftest.c -+test -f verconf.h || > verconf.h +ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" +eval $ruby_version + @@ -124,7 +120,7 @@ index db37cd6..6e73fae 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -4270,6 +4273,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4432,6 +4435,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -175,7 +171,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index d4c110e..d39c9a6 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -406,7 +406,7 @@ def CONFIG.[](name, mandatory = false) +@@ -417,7 +417,7 @@ def CONFIG.[](name, mandatory = false) install?(:doc, :rdoc) do if $rdocdir @@ -244,12 +240,12 @@ index 55ca080..75eea2b 100644 + RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] end - end + ## diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 0428bea..b6e090e 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -962,7 +962,8 @@ def test_self_use_paths +@@ -1101,7 +1101,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -259,7 +255,7 @@ index 0428bea..b6e090e 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1089,7 +1090,7 @@ def test_self_user_home_user_drive_and_path +@@ -1228,7 +1229,7 @@ def test_self_user_home_user_drive_and_path def test_self_vendor_dir expected = File.join RbConfig::CONFIG['vendordir'], 'gems', @@ -286,7 +282,7 @@ diff --git a/configure.in b/configure.in index 6e73fae..c842725 100644 --- a/configure.in +++ b/configure.in -@@ -275,7 +275,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` +@@ -271,7 +271,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"` AC_SUBST(RUBY_BASE_NAME) AC_SUBST(RUBYW_BASE_NAME) diff --git a/ruby.spec b/ruby.spec index 201961a..d377d4b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,16 +1,16 @@ %global major_version 2 -%global minor_version 3 -%global teeny_version 3 +%global minor_version 4 +%global teeny_version 0 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} %global ruby_release %{ruby_version} # Specify the named version. It has precedense to revision. -#%%global milestone preview2 +#%%global milestone rc1 # Keep the revision enabled for pre-releases from SVN. -#%%global revision 53264 +#%%global revision 57159 %global ruby_archive %{name}-%{ruby_version} @@ -21,7 +21,7 @@ %endif -%global release 61 +%global release 70 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -29,24 +29,26 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.5.2 -%global molinillo_version 0.4.1 +%global rubygems_version 2.6.8 +%global molinillo_version 0.5.3 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version} -%global bigdecimal_version 1.2.8 -%global did_you_mean_version 1.0.0 -%global io_console_version 0.4.5 -%global json_version 1.8.3 -%global minitest_version 5.8.5 -%global power_assert_version 0.2.6 -%global psych_version 2.1.0 -%global rake_version 10.4.2 -%global rdoc_version 4.2.1 +%global bigdecimal_version 1.3.0 +%global did_you_mean_version 1.1.0 +%global io_console_version 0.4.6 +%global json_version 2.0.2 +%global minitest_version 5.10.1 %global net_telnet_version 0.1.1 -%global test_unit_version 3.1.5 +%global openssl_version 2.0.2 +%global power_assert_version 0.4.1 +%global psych_version 2.2.2 +%global rake_version 12.0.0 +%global rdoc_version 5.0.0 +%global test_unit_version 3.2.3 +%global xmlrpc_version 0.2.1 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -132,20 +134,22 @@ Suggests: rubypick Recommends: ruby(rubygems) >= %{rubygems_version} Recommends: rubygem(bigdecimal) >= %{bigdecimal_version} Recommends: rubygem(did_you_mean) >= %{did_you_mean_version} +Recommends: rubygem(openssl) >= %{openssl_version} BuildRequires: autoconf BuildRequires: gdbm-devel BuildRequires: libffi-devel -BuildRequires: compat-openssl10-devel +BuildRequires: openssl-devel BuildRequires: libyaml-devel BuildRequires: readline-devel -BuildRequires: tk-devel # Needed to pass test_set_program_name(TestRubyOptions) BuildRequires: procps BuildRequires: %{_bindir}/dtrace # RubyGems test suite optional dependencies. BuildRequires: git BuildRequires: %{_bindir}/cmake +# Required to test hardening. +BuildRequires: %{_bindir}/checksec # This package provides %%{_bindir}/ruby-mri therefore it is marked by this # virtual provide. It can be installed as dependency of rubypick. @@ -182,6 +186,13 @@ Provides: bundled(ccan-check_type) Provides: bundled(ccan-container_of) Provides: bundled(ccan-list) +# Tcl/Tk support was removed from stdlib in Ruby 2.4, i.e. F27 timeframe +# so lets obsolete it. This is not the best place, but we don't have +# better, unless https://fedorahosted.org/fpc/ticket/645 provides some +# generic solution. +Obsoletes: ruby-tcltk < 2.4.0 + + %description libs This package includes the libruby, necessary to run Ruby. @@ -195,6 +206,7 @@ License: Ruby or MIT Requires: ruby(release) Recommends: rubygem(rdoc) >= %{rdoc_version} Recommends: rubygem(io-console) >= %{io_console_version} +Requires: rubygem(openssl) >= %{openssl_version} Requires: rubygem(psych) >= %{psych_version} Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} @@ -377,6 +389,20 @@ minitest/pride shows pride in testing and adds coloring to your test output. +%package -n rubygem-openssl +Summary: OpenSSL provides SSL, TLS and general purpose cryptography +Version: %{openssl_version} +Group: Development/Libraries +License: Ruby or BSD +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(openssl) = %{version}-%{release} + +%description -n rubygem-openssl +OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the +OpenSSL library. + + %package -n rubygem-power_assert Summary: Power Assert for Ruby Version: %{power_assert_version} @@ -428,10 +454,8 @@ you do use sysread() directly when in telnet mode, you should probably pass the output through preprocess() to extract telnet command sequences. -# The Summary/Description fields are rather poor. -# https://github.com/test-unit/test-unit/issues/73 %package -n rubygem-test-unit -Summary: Improved version of Test::Unit bundled in Ruby 1.8.x +Summary: An xUnit family unit testing framework for Ruby Version: %{test_unit_version} Group: Development/Libraries # lib/test/unit/diff.rb is a double license of the Ruby license and PSF license. @@ -444,19 +468,26 @@ Provides: rubygem(test-unit) = %{version}-%{release} BuildArch: noarch %description -n rubygem-test-unit -Ruby 1.9.x bundles minitest not Test::Unit. Test::Unit -bundled in Ruby 1.8.x had not been improved but unbundled -Test::Unit (test-unit) is improved actively. +Test::Unit (test-unit) is unit testing framework for Ruby, based on xUnit +principles. These were originally designed by Kent Beck, creator of extreme +programming software development methodology, for Smalltalk's SUnit. It allows +writing tests, checking results and automated testing in Ruby. -%package tcltk -Summary: Tcl/Tk interface for scripting language Ruby -Group: Development/Languages -Requires: %{name}-libs%{?_isa} = %{ruby_version} -Provides: ruby(tcltk) = %{ruby_version}-%{release} +%package -n rubygem-xmlrpc +Summary: XMLRPC is a lightweight protocol that enables remote procedure calls over HTTP +Version: %{xmlrpc_version} +Group: Development/Libraries +License: Ruby or BSD +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(xmlrpc) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-xmlrpc +XMLRPC is a lightweight protocol that enables remote procedure calls over +HTTP. -%description tcltk -Tcl/Tk interface for the object-oriented scripting language Ruby. %prep %setup -q -n %{ruby_archive} @@ -486,10 +517,6 @@ cp -a %{SOURCE6} . %build autoconf -# Ruby does not respec LDFLAGS :( -# https://bugs.ruby-lang.org/issues/11863 -export EXTLDFLAGS="%{__global_ldflags}" - %configure \ --with-rubylibprefix='%{ruby_libdir}' \ --with-archlibdir='%{_libdir}' \ @@ -504,6 +531,7 @@ export EXTLDFLAGS="%{__global_ldflags}" --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ --with-rubygemsdir='%{rubygems_dir}' \ --with-ruby-pc='%{name}.pc' \ + --with-compress-debug-sections=no \ --disable-rpath \ --enable-shared \ --with-ruby-version='' \ @@ -532,15 +560,12 @@ sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_li # Kill bundled certificates, as they should be part of ca-certificates. for cert in \ - Class3PublicPrimaryCertificationAuthority.pem \ - DigiCertHighAssuranceEVRootCA.pem \ - EntrustnetSecureServerCertificationAuthority.pem \ - GeoTrustGlobalCA.pem \ - AddTrustExternalCARoot.pem \ - AddTrustExternalCARoot-2048.pem \ - GlobalSignRootCA.pem + rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem \ + rubygems.org/AddTrustExternalCARoot.pem \ + index.rubygems.org/GlobalSignRootCA.pem do rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert + rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert) done # Ensure there is not forgotten any certificate. test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)" @@ -603,6 +628,15 @@ ln -s %{gem_dir}/gems/json-%{json_version}/lib/json.rb %{buildroot}%{ruby_libdir ln -s %{gem_dir}/gems/json-%{json_version}/lib/json %{buildroot}%{ruby_libdir}/json ln -s %{_libdir}/gems/%{name}/json-%{json_version}/json/ %{buildroot}%{ruby_libarchdir}/json +mkdir -p %{buildroot}%{gem_dir}/gems/openssl-%{openssl_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/openssl-%{openssl_version} +mv %{buildroot}%{ruby_libdir}/openssl* %{buildroot}%{gem_dir}/gems/openssl-%{openssl_version}/lib +mv %{buildroot}%{ruby_libarchdir}/openssl.so %{buildroot}%{_libdir}/gems/%{name}/openssl-%{openssl_version}/ +mv %{buildroot}%{gem_dir}/specifications/default/openssl-%{openssl_version}.gemspec %{buildroot}%{gem_dir}/specifications +ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl %{buildroot}%{ruby_libdir}/openssl +ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl.rb %{buildroot}%{ruby_libdir}/openssl.rb +ln -s %{_libdir}/gems/%{name}/openssl-%{openssl_version}/openssl.so %{buildroot}%{ruby_libarchdir}/openssl.so + mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version} mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib @@ -612,6 +646,12 @@ ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_libarchdir}/psych.so +# Move the binary extensions into proper place (if no gem has binary extension, +# the extensions directory might be empty). +find %{buildroot}%{gem_dir}/extensions/*-%{_target_os}/%{ruby_version}/* -maxdepth 0 \ + -exec mv '{}' %{buildroot}%{_libdir}/gems/%{name}/ \; \ + || echo "No gem binary extensions to move." + # Adjust the gemspec files so that the gems will load properly sed -i '/^end$/ i\ s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec @@ -639,6 +679,10 @@ sed -i 's/^/%doc /' .ruby-doc.* sed -i 's/^/%lang(ja) /' .ruby-doc.ja %check +# Check Ruby hardening. +checksec -f libruby.so.%{ruby_version} | \ + grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*Yes.*\d*.*\d*.*libruby.so.%{ruby_version}" + # Check RubyGems version correctness. [ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ] # Check Molinillo version correctness. @@ -670,25 +714,22 @@ make check TESTS="-v $DISABLE_TESTS" %postun libs -p /sbin/ldconfig %files -%doc BSDL -%doc COPYING -%lang(ja) %doc COPYING.ja -%doc GPL -%doc LEGAL +%license BSDL +%license COPYING +%lang(ja) %license COPYING.ja +%license GPL +%license LEGAL %{_bindir}/erb %{_bindir}/%{name}%{?with_rubypick:-mri} %{_mandir}/man1/erb* %{_mandir}/man1/ruby* -# http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries -%exclude %{_libdir}/libruby-static.a - %files devel -%doc BSDL -%doc COPYING -%lang(ja) %doc COPYING.ja -%doc GPL -%doc LEGAL +%license BSDL +%license COPYING +%lang(ja) %license COPYING.ja +%license GPL +%license LEGAL %{_rpmconfigdir}/macros.d/macros.ruby @@ -697,10 +738,10 @@ make check TESTS="-v $DISABLE_TESTS" %{_libdir}/pkgconfig/%{name}.pc %files libs -%doc COPYING -%lang(ja) %doc COPYING.ja -%doc GPL -%doc LEGAL +%license COPYING +%lang(ja) %license COPYING.ja +%license GPL +%license LEGAL %doc README.md %doc NEWS # Exclude /usr/local directory since it is supposed to be managed by @@ -714,20 +755,18 @@ make check TESTS="-v $DISABLE_TESTS" # Platform independent libraries. %dir %{ruby_libdir} %{ruby_libdir}/*.rb -%exclude %{ruby_libdir}/*-tk.rb %exclude %{ruby_libdir}/irb.rb %exclude %{ruby_libdir}/json.rb -%exclude %{ruby_libdir}/tcltk.rb -%exclude %{ruby_libdir}/tk*.rb +%exclude %{ruby_libdir}/openssl.rb %exclude %{ruby_libdir}/psych.rb %{ruby_libdir}/cgi %{ruby_libdir}/digest %{ruby_libdir}/drb %{ruby_libdir}/fiddle +%{ruby_libdir}/forwardable %exclude %{ruby_libdir}/irb %{ruby_libdir}/matrix %{ruby_libdir}/net -%{ruby_libdir}/openssl %{ruby_libdir}/optparse %{ruby_libdir}/racc %{ruby_libdir}/rbconfig @@ -737,12 +776,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/rss %{ruby_libdir}/shell %{ruby_libdir}/syslog -%exclude %{ruby_libdir}/tk -%exclude %{ruby_libdir}/tkextlib %{ruby_libdir}/unicode_normalize %{ruby_libdir}/uri %{ruby_libdir}/webrick -%{ruby_libdir}/xmlrpc %{ruby_libdir}/yaml # Platform specific libraries. @@ -818,6 +854,9 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/enc/windows_1250.so %{ruby_libarchdir}/enc/windows_1251.so %{ruby_libarchdir}/enc/windows_1252.so +%{ruby_libarchdir}/enc/windows_1253.so +%{ruby_libarchdir}/enc/windows_1254.so +%{ruby_libarchdir}/enc/windows_1257.so %{ruby_libarchdir}/enc/windows_31j.so %{ruby_libarchdir}/etc.so %{ruby_libarchdir}/fcntl.so @@ -832,7 +871,6 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/mathn/rational.so %{ruby_libarchdir}/nkf.so %{ruby_libarchdir}/objspace.so -%{ruby_libarchdir}/openssl.so %{ruby_libarchdir}/pathname.so %{ruby_libarchdir}/pty.so %dir %{ruby_libarchdir}/racc @@ -847,9 +885,6 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libarchdir}/stringio.so %{ruby_libarchdir}/strscan.so %{ruby_libarchdir}/syslog.so -%exclude %{ruby_libarchdir}/tcltklib.so -%{ruby_libarchdir}/thread.so -%exclude %{ruby_libarchdir}/tkutil.so %{ruby_libarchdir}/zlib.so %{tapset_root} @@ -935,6 +970,14 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{gem_dir}/gems/minitest-%{minitest_version}/.* %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec +%files -n rubygem-openssl +%{ruby_libdir}/openssl +%{ruby_libdir}/openssl.rb +%{ruby_libarchdir}/openssl.so +%{_libdir}/gems/%{name}/openssl-%{openssl_version} +%{gem_dir}/gems/openssl-%{openssl_version} +%{gem_dir}/specifications/openssl-%{openssl_version}.gemspec + %files -n rubygem-power_assert %{gem_dir}/gems/power_assert-%{power_assert_version} %exclude %{gem_dir}/gems/power_assert-%{power_assert_version}/.* @@ -957,16 +1000,24 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/gems/test-unit-%{test_unit_version} %{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec -%files tcltk -%{ruby_libdir}/*-tk.rb -%{ruby_libdir}/tcltk.rb -%{ruby_libdir}/tk*.rb -%{ruby_libarchdir}/tcltklib.so -%{ruby_libarchdir}/tkutil.so -%{ruby_libdir}/tk -%{ruby_libdir}/tkextlib +%files -n rubygem-xmlrpc +%license %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/LICENSE.txt +%dir %{gem_dir}/gems/xmlrpc-%{xmlrpc_version} +%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Gemfile +%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Rakefile +%doc %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/README.md +%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/bin +%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/lib +%{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Mon Jan 02 2017 V鱈t Ondruch - 2.4.0-70 +- Upgrade to Ruby 2.4.0. +- Move gemified xmlrpc into subpackage. +- Move gemified openssl into subpackage. +- Tk is removed from stdlib. +- Extend 'gem_' macros for pre-release version support. + * Tue Nov 22 2016 V鱈t Ondruch - 2.3.3-61 - Update to Ruby 2.3.3. - Exclude json.rb from ruby-libs (rhbz#1397370). diff --git a/sources b/sources index 26c008e..a541cc8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0cba3d1b677d2695236ace62ca6d2255 ruby-2.3.3.tar.xz +SHA512 (ruby-2.4.0.tar.xz) = 975a5388592adc038461e0acebb6c0efee242891b2ea8621476401458efe2bc0fdd317d3bf99beb745b0b3808410efdff33862da29c95c027f457943721e3ab6 diff --git a/test_systemtap.rb b/test_systemtap.rb index eb518df..5784e2d 100644 --- a/test_systemtap.rb +++ b/test_systemtap.rb @@ -3,8 +3,10 @@ require 'set' LIBRUBY_SO = 'libruby.so' PROBES_D = 'probes.d' -### -# Detect SystemTap section headers presence. +# These probes are excluded by VM_COLLECT_USAGE_DETAILS ifdef. +EXCLUDE_PROBES = Set.new %w(insn insn__operand) + +## Detect SystemTap section headers presence stap_headers = [ '\.stapsdt\.base', @@ -22,43 +24,42 @@ unless detected_stap_headers.size == 2 exit false end -### -# Find if every declared probe is propagated to resulting library. +## Find if every declared probe is propagated to resulting library # Colect probes specified in probes.d file. -probes = [] +probes_declared = [] File.open(PROBES_D) do |file| file.each_line do |line| if probe = line[/probe (\S+)\(.*\);/, 1] - probes << probe + probes_declared << probe end end end -probes = Set.new probes +probes_declared = Set.new probes_declared -# These probes are excluded by VM_COLLECT_USAGE_DETAILS ifdef. -EXCLUDE_PROBES = Set.new %w(insn insn__operand) -unless EXCLUDE_PROBES.subset? probes +unless EXCLUDE_PROBES.subset? probes_declared puts 'ERROR: Change in SystemTap (DTrace) probes definition file detected.' exit false end -probes -= EXCLUDE_PROBES +probes_declared -= EXCLUDE_PROBES # Detect probes in resulting library. -probe_regexp = %r{ -^\s*stapsdt\s*0[xX][0-9a-fA-F]+\tNT_STAPSDT \(SystemTap probe descriptors\)$ -^\s*Provider: ruby$ -^\s*Name: (\S+)$ +get_probes_detected = %r{ +^\s*Provider:\s+ruby,\s+Name:\s+(\S+),\s+.*$ } -notes = `readelf -n "#{LIBRUBY_SO}"` -detected_probes = Set.new notes.scan(probe_regexp).flatten +probes_detected = `eu-readelf -n "#{LIBRUBY_SO}"` + +probes_detected = Set.new probes_detected.scan(get_probes_detected).flatten # Both sets must be equal, otherwise something is wrong. -unless probes == detected_probes +unless probes_declared == probes_detected puts 'ERROR: SystemTap (DTrace) probes were not correctly propagated into resulting library.' + puts " Undetected probes: #{(probes_declared - probes_detected).sort.join(', ')}\n", + " Additional detected probes: #{(probes_detected - probes_declared).sort.join(', ')}" + exit false end From b04585e06441159cbe5facb87d2f30774dad2375 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 9 Jan 2017 18:14:07 +0100 Subject: [PATCH 456/529] Add rubygem-io-console dependency for rubygem-rdoc. The io-console is now the hard requirement and RDoc does not work without it. --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d377d4b..de6c40a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 70 +%global release 71 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -274,6 +274,7 @@ License: GPLv2 and Ruby and MIT and SIL Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} +Requires: rubygem(io-console) >= %{io_console_version} # Hardcode the dependency to keep it compatible with dependencies of the # official rubygem-rdoc gem. Requires: rubygem(json) >= %{json_version} @@ -1011,6 +1012,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Mon Jan 09 2017 V鱈t Ondruch - 2.4.0-71 +- Add rubygem-io-console dependency for rubygem-rdoc. + * Mon Jan 02 2017 V鱈t Ondruch - 2.4.0-70 - Upgrade to Ruby 2.4.0. - Move gemified xmlrpc into subpackage. From 9a0bd11655a81ace9767fa4779c201b59744f69f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 12 Jan 2017 09:00:09 +0100 Subject: [PATCH 457/529] Link files into directory to avoid dir => symlink isues. It is not easy to change the directory to simplink in RPM world. Hence keep everything in the directory and just link back the files. --- ruby.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index de6c40a..12b47d6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 71 +%global release 72 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -634,7 +634,11 @@ mkdir -p %{buildroot}%{_libdir}/gems/%{name}/openssl-%{openssl_version} mv %{buildroot}%{ruby_libdir}/openssl* %{buildroot}%{gem_dir}/gems/openssl-%{openssl_version}/lib mv %{buildroot}%{ruby_libarchdir}/openssl.so %{buildroot}%{_libdir}/gems/%{name}/openssl-%{openssl_version}/ mv %{buildroot}%{gem_dir}/specifications/default/openssl-%{openssl_version}.gemspec %{buildroot}%{gem_dir}/specifications -ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl %{buildroot}%{ruby_libdir}/openssl +# This used to be directory when OpenSSL was integral part of StdLib => Keep +# it as directory and link everything in it to prevent directory => symlink +# conversion RPM issues. +mkdir -p %{buildroot}%{ruby_libdir}/openssl +ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl/* %{buildroot}%{ruby_libdir}/openssl ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl.rb %{buildroot}%{ruby_libdir}/openssl.rb ln -s %{_libdir}/gems/%{name}/openssl-%{openssl_version}/openssl.so %{buildroot}%{ruby_libarchdir}/openssl.so @@ -1012,6 +1016,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Wed Jan 11 2017 V鱈t Ondruch - 2.4.0-72 +- Link files into directory to avoid dir => symlink isues. + * Mon Jan 09 2017 V鱈t Ondruch - 2.4.0-71 - Add rubygem-io-console dependency for rubygem-rdoc. From ab16bf76efcc129fe1fac5966dcb2e7e42f2df92 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Thu, 12 Jan 2017 17:30:40 +0100 Subject: [PATCH 458/529] Rebuild for readline 7.x Signed-off-by: Igor Gnatenko --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 12b47d6..8fc426f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 72 +%global release 73 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1016,6 +1016,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Jan 12 2017 Igor Gnatenko - 2.4.0-73 +- Rebuild for readline 7.x + * Wed Jan 11 2017 V鱈t Ondruch - 2.4.0-72 - Link files into directory to avoid dir => symlink isues. From 277ae4829a525e7235a2b17723f608ea10ca43df Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 13 Jan 2017 06:37:59 +0900 Subject: [PATCH 459/529] Rebuild again for f26-ruby24 sidetag --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 8fc426f..f89276e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 73 +%global release 74 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1016,6 +1016,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Fri Jan 13 2017 Mamoru TASAKA - 2.4.0-74 +- Rebuild again for f26-ruby24 sidetag + * Thu Jan 12 2017 Igor Gnatenko - 2.4.0-73 - Rebuild for readline 7.x From f540c43daed6594f055f27cd4c9f17b90a454743 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 17 Jan 2017 16:22:14 +0100 Subject: [PATCH 460/529] Apply patch fixing rubygem-mongo build failures. --- ...nhelper.c-block-argument-at-tailcall.patch | 36 +++++++++++++++++++ ruby.spec | 9 ++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch diff --git a/ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch b/ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch new file mode 100644 index 0000000..cb8fe26 --- /dev/null +++ b/ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch @@ -0,0 +1,36 @@ +From ff3496b0116ed2ed589d000b7bfca3d8288b009c Mon Sep 17 00:00:00 2001 +From: nobu +Date: Mon, 9 Jan 2017 02:55:39 +0000 +Subject: [PATCH] vm_insnhelper.c: block argument at tailcall + +* vm_insnhelper.c (vm_call_iseq_setup_tailcall): check interrupts + after set up the new frame, not the passed block to be clobbered + by invoked finalizers and so on. [ruby-core:78981] [Bug #13107] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + vm_insnhelper.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/vm_insnhelper.c b/vm_insnhelper.c +index b580412..662a2d6 100644 +--- a/vm_insnhelper.c ++++ b/vm_insnhelper.c +@@ -1538,8 +1538,6 @@ vm_call_iseq_setup_tailcall(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_ + vm_pop_frame(th, cfp, cfp->ep); + cfp = th->cfp; + +- RUBY_VM_CHECK_INTS(th); +- + sp_orig = sp = cfp->sp; + + /* push self */ +@@ -1558,6 +1556,8 @@ vm_call_iseq_setup_tailcall(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_ + iseq->body->stack_max); + + cfp->sp = sp_orig; ++ RUBY_VM_CHECK_INTS(th); ++ + return Qundef; + } + diff --git a/ruby.spec b/ruby.spec index f89276e..cdb2047 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 74 +%global release 75 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -128,6 +128,9 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +# This fixed rubygem-mongo build failures and may be something else as well. +# https://bugs.ruby-lang.org/issues/13107 +Patch10: ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -506,6 +509,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 +%patch10 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1016,6 +1020,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Tue Jan 17 2017 V鱈t Ondruch - 2.4.0-75 +- Apply patch fixing rubygem-mongo build failures. + * Fri Jan 13 2017 Mamoru TASAKA - 2.4.0-74 - Rebuild again for f26-ruby24 sidetag From 415daf8d3b965446d272df04fa8566a3198f51eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Feb 2017 14:53:23 +0100 Subject: [PATCH 461/529] Fix GCC 7.x compatibility (rhbz#1417590). --- ruby.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index cdb2047..0efd54e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 75 +%global release 76 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -131,6 +131,9 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch # This fixed rubygem-mongo build failures and may be something else as well. # https://bugs.ruby-lang.org/issues/13107 Patch10: ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch +# Fix GCC 7.x compatibility (rhbz#1417590). +# https://bugs.ruby-lang.org/issues/13150 +Patch11: ruby-2.4.0-Prevent-GC-by-volatile.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -510,6 +513,7 @@ rm -rf ext/fiddle/libffi* %patch7 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1020,6 +1024,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Fri Feb 03 2017 V鱈t Ondruch - 2.4.0-76 +- Fix GCC 7.x compatibility (rhbz#1417590). + * Tue Jan 17 2017 V鱈t Ondruch - 2.4.0-75 - Apply patch fixing rubygem-mongo build failures. From c467007dbbd08acf62d5749475fbd60c45d1cb7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Feb 2017 15:01:34 +0100 Subject: [PATCH 462/529] Use standardized multilib solution (rhbz#1412274). This helps platform specific difference between builds. --- ruby.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 0efd54e..6efcd61 100644 --- a/ruby.spec +++ b/ruby.spec @@ -156,6 +156,7 @@ BuildRequires: git BuildRequires: %{_bindir}/cmake # Required to test hardening. BuildRequires: %{_bindir}/checksec +BuildRequires: multilib-rpm-config # This package provides %%{_bindir}/ruby-mri therefore it is marked by this # virtual provide. It can be installed as dependency of rubypick. @@ -557,8 +558,7 @@ make install DESTDIR=%{buildroot} # Rename ruby/config.h to ruby/config-.h to avoid file conflicts on # multilib systems and install config.h wrapper -mv %{buildroot}%{_includedir}/%{name}/config.h %{buildroot}%{_includedir}/%{name}/config-%{_arch}.h -install -m644 %{SOURCE7} %{buildroot}%{_includedir}/%{name}/config.h +%multilib_fix_c_header --file %{_includedir}/%{name}/config.h # Rename the ruby executable. It is replaced by RubyPick. %{?with_rubypick:mv %{buildroot}%{_bindir}/%{name}{,-mri}} @@ -1026,6 +1026,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Fri Feb 03 2017 V鱈t Ondruch - 2.4.0-76 - Fix GCC 7.x compatibility (rhbz#1417590). +- Use standardized multilib solution (rhbz#1412274). * Tue Jan 17 2017 V鱈t Ondruch - 2.4.0-75 - Apply patch fixing rubygem-mongo build failures. From 3a2607aa17e07967db626c96882c5dbde4de7149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 3 Feb 2017 15:32:51 +0100 Subject: [PATCH 463/529] Add missing patch. --- ruby-2.4.0-Prevent-GC-by-volatile.patch | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 ruby-2.4.0-Prevent-GC-by-volatile.patch diff --git a/ruby-2.4.0-Prevent-GC-by-volatile.patch b/ruby-2.4.0-Prevent-GC-by-volatile.patch new file mode 100644 index 0000000..302f27b --- /dev/null +++ b/ruby-2.4.0-Prevent-GC-by-volatile.patch @@ -0,0 +1,36 @@ +From 7c1b30a602ab109d8d5388d7dfb3c5b180ba24e1 Mon Sep 17 00:00:00 2001 +From: naruse +Date: Mon, 23 Jan 2017 16:58:27 +0000 +Subject: [PATCH] Prevent GC by volatile [Bug #13150] + +test/ruby/test_marshal.rb test_context_switch (load) and test_gc (dump) +are failed on FreeBSD 10.3 and gcc7 (FreeBSD Ports Collection) 7.0.0 +20170115 (experimental); RB_GC_GUARD looks not worked well. + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + marshal.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/marshal.c b/marshal.c +index a9926ac..d628daa 100644 +--- a/marshal.c ++++ b/marshal.c +@@ -1024,7 +1024,7 @@ VALUE + rb_marshal_dump_limited(VALUE obj, VALUE port, int limit) + { + struct dump_arg *arg; +- VALUE wrapper; /* used to avoid memory leak in case of exception */ ++ volatile VALUE wrapper; /* used to avoid memory leak in case of exception */ + + wrapper = TypedData_Make_Struct(rb_cData, struct dump_arg, &dump_arg_data, arg); + arg->dest = 0; +@@ -2038,7 +2038,7 @@ rb_marshal_load_with_proc(VALUE port, VALUE proc) + { + int major, minor, infection = 0; + VALUE v; +- VALUE wrapper; /* used to avoid memory leak in case of exception */ ++ volatile VALUE wrapper; /* used to avoid memory leak in case of exception */ + struct load_arg *arg; + + v = rb_check_string_type(port); From 8d50b10ccbc99c1a2605d46cbb2930521a61d16a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 11:54:53 +0000 Subject: [PATCH 464/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 6efcd61..b9b046f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 76 +%global release 77 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1024,6 +1024,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 2.4.0-77 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Feb 03 2017 V鱈t Ondruch - 2.4.0-76 - Fix GCC 7.x compatibility (rhbz#1417590). - Use standardized multilib solution (rhbz#1412274). From 101851f2d315b3598063327c2450f20b8ed0623d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 23 Feb 2017 09:23:29 +0100 Subject: [PATCH 465/529] Fix OpenSSL symlinks. --- ruby.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index b9b046f..1dbbcbd 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 77 +%global release 78 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -646,7 +646,8 @@ mv %{buildroot}%{gem_dir}/specifications/default/openssl-%{openssl_version}.gems # it as directory and link everything in it to prevent directory => symlink # conversion RPM issues. mkdir -p %{buildroot}%{ruby_libdir}/openssl -ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl/* %{buildroot}%{ruby_libdir}/openssl +find %{buildroot}%{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl -maxdepth 1 -type f -exec \ + sh -c 'ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl/`basename {}` %{buildroot}%{ruby_libdir}/openssl' \; ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl.rb %{buildroot}%{ruby_libdir}/openssl.rb ln -s %{_libdir}/gems/%{name}/openssl-%{openssl_version}/openssl.so %{buildroot}%{ruby_libarchdir}/openssl.so @@ -1024,6 +1025,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Feb 23 2017 V鱈t Ondruch - 2.4.0-78 +- Fix OpenSSL symlinks. + * Sat Feb 11 2017 Fedora Release Engineering - 2.4.0-77 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 4571daf34e5f971f235a53268ab3ebf73a249b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 8 Mar 2017 18:48:45 +0100 Subject: [PATCH 466/529] Be more careful about RubyGems directory ownership. And make this aligned with independent rubygems package. --- ruby.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 1dbbcbd..6c7b523 100644 --- a/ruby.spec +++ b/ruby.spec @@ -905,7 +905,11 @@ make check TESTS="-v $DISABLE_TESTS" %files -n rubygems %{_bindir}/gem -%{rubygems_dir} +%dir %{rubygems_dir} +%{rubygems_dir}/rbconfig +%{rubygems_dir}/rubygems +%{rubygems_dir}/rubygems.rb +%{rubygems_dir}/ubygems.rb # Explicitly include only RubyGems directory strucure to avoid accidentally # packaged content. From 5c42276905e94f855596b31adca3945b0826204d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 3 Apr 2017 16:10:27 +0200 Subject: [PATCH 467/529] Update to Ruby 2.4.1. --- ruby-2.4.0-Prevent-GC-by-volatile.patch | 36 ------------------- ...nhelper.c-block-argument-at-tailcall.patch | 36 ------------------- ruby.spec | 21 +++++------ sources | 2 +- 4 files changed, 9 insertions(+), 86 deletions(-) delete mode 100644 ruby-2.4.0-Prevent-GC-by-volatile.patch delete mode 100644 ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch diff --git a/ruby-2.4.0-Prevent-GC-by-volatile.patch b/ruby-2.4.0-Prevent-GC-by-volatile.patch deleted file mode 100644 index 302f27b..0000000 --- a/ruby-2.4.0-Prevent-GC-by-volatile.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 7c1b30a602ab109d8d5388d7dfb3c5b180ba24e1 Mon Sep 17 00:00:00 2001 -From: naruse -Date: Mon, 23 Jan 2017 16:58:27 +0000 -Subject: [PATCH] Prevent GC by volatile [Bug #13150] - -test/ruby/test_marshal.rb test_context_switch (load) and test_gc (dump) -are failed on FreeBSD 10.3 and gcc7 (FreeBSD Ports Collection) 7.0.0 -20170115 (experimental); RB_GC_GUARD looks not worked well. - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - marshal.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/marshal.c b/marshal.c -index a9926ac..d628daa 100644 ---- a/marshal.c -+++ b/marshal.c -@@ -1024,7 +1024,7 @@ VALUE - rb_marshal_dump_limited(VALUE obj, VALUE port, int limit) - { - struct dump_arg *arg; -- VALUE wrapper; /* used to avoid memory leak in case of exception */ -+ volatile VALUE wrapper; /* used to avoid memory leak in case of exception */ - - wrapper = TypedData_Make_Struct(rb_cData, struct dump_arg, &dump_arg_data, arg); - arg->dest = 0; -@@ -2038,7 +2038,7 @@ rb_marshal_load_with_proc(VALUE port, VALUE proc) - { - int major, minor, infection = 0; - VALUE v; -- VALUE wrapper; /* used to avoid memory leak in case of exception */ -+ volatile VALUE wrapper; /* used to avoid memory leak in case of exception */ - struct load_arg *arg; - - v = rb_check_string_type(port); diff --git a/ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch b/ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch deleted file mode 100644 index cb8fe26..0000000 --- a/ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch +++ /dev/null @@ -1,36 +0,0 @@ -From ff3496b0116ed2ed589d000b7bfca3d8288b009c Mon Sep 17 00:00:00 2001 -From: nobu -Date: Mon, 9 Jan 2017 02:55:39 +0000 -Subject: [PATCH] vm_insnhelper.c: block argument at tailcall - -* vm_insnhelper.c (vm_call_iseq_setup_tailcall): check interrupts - after set up the new frame, not the passed block to be clobbered - by invoked finalizers and so on. [ruby-core:78981] [Bug #13107] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - vm_insnhelper.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/vm_insnhelper.c b/vm_insnhelper.c -index b580412..662a2d6 100644 ---- a/vm_insnhelper.c -+++ b/vm_insnhelper.c -@@ -1538,8 +1538,6 @@ vm_call_iseq_setup_tailcall(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_ - vm_pop_frame(th, cfp, cfp->ep); - cfp = th->cfp; - -- RUBY_VM_CHECK_INTS(th); -- - sp_orig = sp = cfp->sp; - - /* push self */ -@@ -1558,6 +1556,8 @@ vm_call_iseq_setup_tailcall(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_ - iseq->body->stack_max); - - cfp->sp = sp_orig; -+ RUBY_VM_CHECK_INTS(th); -+ - return Qundef; - } - diff --git a/ruby.spec b/ruby.spec index 6c7b523..82d5781 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 4 -%global teeny_version 0 +%global teeny_version 1 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 78 +%global release 79 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -29,8 +29,8 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.6.8 -%global molinillo_version 0.5.3 +%global rubygems_version 2.6.11 +%global molinillo_version 0.5.7 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 @@ -42,7 +42,7 @@ %global json_version 2.0.2 %global minitest_version 5.10.1 %global net_telnet_version 0.1.1 -%global openssl_version 2.0.2 +%global openssl_version 2.0.3 %global power_assert_version 0.4.1 %global psych_version 2.2.2 %global rake_version 12.0.0 @@ -128,12 +128,6 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch -# This fixed rubygem-mongo build failures and may be something else as well. -# https://bugs.ruby-lang.org/issues/13107 -Patch10: ruby-2.4.0-vm_insnhelper.c-block-argument-at-tailcall.patch -# Fix GCC 7.x compatibility (rhbz#1417590). -# https://bugs.ruby-lang.org/issues/13150 -Patch11: ruby-2.4.0-Prevent-GC-by-volatile.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -513,8 +507,6 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 -%patch10 -p1 -%patch11 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1029,6 +1021,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Mon Apr 03 2017 V鱈t Ondruch - 2.4.1-79 +- Update to Ruby 2.4.1. + * Thu Feb 23 2017 V鱈t Ondruch - 2.4.0-78 - Fix OpenSSL symlinks. diff --git a/sources b/sources index a541cc8..49ed326 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruby-2.4.0.tar.xz) = 975a5388592adc038461e0acebb6c0efee242891b2ea8621476401458efe2bc0fdd317d3bf99beb745b0b3808410efdff33862da29c95c027f457943721e3ab6 +SHA512 (ruby-2.4.1.tar.xz) = e6fd290b6edd166348b70f0f1c56f7ed9d956c4c1eb91d97d0548041ca4196b9b75ec1ad35c745bdbfd4de195899093e7205d7f02b014ecf1c48e6f31cf25903 From 1cf7e67d3b468e9b748837fb923cb6bea8c5bf20 Mon Sep 17 00:00:00 2001 From: Release Configuration Management Date: Mon, 12 Jun 2017 13:25:38 -0400 Subject: [PATCH 468/529] New branch setup --- .gitignore | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 From fde2a68e73dd5bb0e7e59d38754c75bd1f1016c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 20 Jul 2017 16:41:16 +0200 Subject: [PATCH 469/529] OpenSSL 1.1.0f-3 disables some weak ciphers. Adjust the package to pass the tests suite. --- ...her-suites-in-test_sslctx_set_params.patch | 26 +++++++++++++++++++ ruby.spec | 11 +++++++- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch diff --git a/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch b/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch new file mode 100644 index 0000000..9c3e375 --- /dev/null +++ b/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch @@ -0,0 +1,26 @@ +From 261353a42d0dc0e7bf73e5a8fb8ecffd04249d42 Mon Sep 17 00:00:00 2001 +From: Kazuki Yamaguchi +Date: Tue, 27 Jun 2017 14:31:09 +0900 +Subject: [PATCH] test/test_ssl: allow 3DES cipher suites in + test_sslctx_set_params + +Fedora's OpenSSL seems to enable 3DES cipher suites by DEFAULT. + +Fixes: https://github.com/ruby/openssl/issues/127 +--- + test/test_ssl.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb +index 19066566..b3efe95a 100644 +--- a/test/openssl/test_ssl.rb ++++ b/test/openssl/test_ssl.rb +@@ -350,7 +350,7 @@ def test_sslctx_set_params + assert_equal OpenSSL::SSL::VERIFY_PEER, ctx.verify_mode + ciphers_names = ctx.ciphers.collect{|v, _, _, _| v } + assert ciphers_names.all?{|v| /A(EC)?DH/ !~ v }, "anon ciphers are disabled" +- assert ciphers_names.all?{|v| /(RC4|MD5|EXP|DES)/ !~ v }, "weak ciphers are disabled" ++ assert ciphers_names.all?{|v| /(RC4|MD5|EXP|DES(?!-EDE|-CBC3))/ !~ v }, "weak ciphers are disabled" + assert_equal 0, ctx.options & OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS + if defined?(OpenSSL::SSL::OP_NO_COMPRESSION) # >= 1.0.0 + assert_equal OpenSSL::SSL::OP_NO_COMPRESSION, diff --git a/ruby.spec b/ruby.spec index 82d5781..e4f716f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 79 +%global release 80 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -128,6 +128,10 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +# Fix OpenSSL::TestSSL#test_sslctx_set_params failures due to recent changes in +# OpenSSL. +# https://github.com/ruby/openssl/issues/127 +Patch10: ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -507,6 +511,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 +%patch10 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1021,6 +1026,10 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Jul 20 2017 V鱈t Ondruch - 2.4.1-80 +- OpenSSL 1.1.0f-3 disables some weak ciphers. Adjust the package to pass + the tests suite. + * Mon Apr 03 2017 V鱈t Ondruch - 2.4.1-79 - Update to Ruby 2.4.1. From 6e9956416e4616dc157136273562c4e4642bdfa9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 13:20:58 +0000 Subject: [PATCH 470/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index e4f716f..d93d74e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 80 +%global release 81 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1026,6 +1026,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 2.4.1-81 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Thu Jul 20 2017 V鱈t Ondruch - 2.4.1-80 - OpenSSL 1.1.0f-3 disables some weak ciphers. Adjust the package to pass the tests suite. From 7e690d1b1d5467fd7b40bb5ee42bf5e1b47de74b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 07:50:57 +0000 Subject: [PATCH 471/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index d93d74e..53df209 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 81 +%global release 82 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1026,6 +1026,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 2.4.1-82 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 2.4.1-81 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 30f6c6490e560273c0593dfc1f465dd61d9d8c2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 11 Aug 2017 12:34:04 +0200 Subject: [PATCH 472/529] Fix "IOError: stream closed" errors affecting Puma. --- ...-do-not-enqueue-redundant-interrupts.patch | 241 ++++++++++++++++++ ruby.spec | 9 +- 2 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch diff --git a/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch b/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch new file mode 100644 index 0000000..263b532 --- /dev/null +++ b/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch @@ -0,0 +1,241 @@ +From 27251312111b7e25e347773e5777ee6072f9289b Mon Sep 17 00:00:00 2001 +From: nagachika +Date: Sat, 8 Jul 2017 02:21:36 +0000 +Subject: [PATCH] merge revision(s) 58284,58812,59028: [Backport #13632] + + vm_core.h: ruby_error_stream_closed + + * vm_core.h (ruby_special_exceptions): renamed + ruby_error_closed_stream as ruby_error_stream_closed, like the + message. + speed up IO#close with many threads + + Today, it increases IO#close performance with many threads: + + Execution time (sec) + name trunk after + vm_thread_close 4.276 3.018 + + Speedup ratio: compare with the result of `trunk' (greater is better) + name after + vm_thread_close 1.417 + + This speedup comes because rb_notify_fd_close only scans threads + inside rb_thread_io_blocking_region, not all threads in the VM. + + In the future, this type data structure may allow us to notify + waiters of multiple FDs on a single thread (when using + Fibers). + + * thread.c (struct waiting_fd): declare + (rb_thread_io_blocking_region): use on-stack list waiter + (rb_notify_fd_close): walk vm->waiting_fds instead + (call_without_gvl): remove old field setting + (th_init): ditto + * vm_core.h (typedef struct rb_vm_struct): add waiting_fds list + * (typedef struct rb_thread_struct): remove waiting_fd field + (rb_vm_living_threads_init): initialize waiting_fds list + + I am now kicking myself for not thinking about this 3 years ago + when I introduced ccan/list in [Feature #9632] to optimize this + same function :< + IO#close: do not enqueue redundant interrupts (take #2) + + Enqueuing multiple errors for one event causes spurious errors + down the line, as reported by Nikolay Vashchenko in + https://bugs.ruby-lang.org/issues/13632 + + This should fix bad interactions with test_race_gets_and_close + in test/ruby/test_io.rb since we ensure rb_notify_fd_close + continues returning the busy flag after enqueuing the interrupt. + + Backporting changes to 2.4 and earlier releases will be more + challenging... + + * thread.c (rb_notify_fd_close): do not enqueue multiple interrupts + [ruby-core:81581] [Bug #13632] + * test/ruby/test_io.rb (test_single_exception_on_close): + new test based on script from Nikolay + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/ruby/test_io.rb | 22 ++++++++++++++++++++++ + thread.c | 36 +++++++++++++++++++++++++----------- + vm.c | 1 - + vm_core.h | 6 +++--- + 4 files changed, 50 insertions(+), 15 deletions(-) + +diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb +index 61dfba318042..034dac570ce4 100644 +--- a/test/ruby/test_io.rb ++++ b/test/ruby/test_io.rb +@@ -2809,6 +2809,28 @@ def test_cross_thread_close_stdio + end; + end + ++ def test_single_exception_on_close ++ a = [] ++ t = [] ++ 10.times do ++ r, w = IO.pipe ++ a << [r, w] ++ t << Thread.new do ++ while r.gets ++ end rescue IOError ++ Thread.current.pending_interrupt? ++ end ++ end ++ a.each do |r, w| ++ w.write -"\n" ++ w.close ++ r.close ++ end ++ t.each do |th| ++ assert_equal false, th.value, '[ruby-core:81581] [Bug #13632]' ++ end ++ end ++ + def test_open_mode + feature4742 = "[ruby-core:36338]" + bug6055 = '[ruby-dev:45268]' +diff --git a/thread.c b/thread.c +index 7391cf96d284..2691fd835de4 100644 +--- a/thread.c ++++ b/thread.c +@@ -95,7 +95,11 @@ static int rb_threadptr_pending_interrupt_empty_p(rb_thread_t *th); + #define eTerminateSignal INT2FIX(1) + static volatile int system_working = 1; + +-#define closed_stream_error GET_VM()->special_exceptions[ruby_error_closed_stream] ++struct waiting_fd { ++ struct list_node wfd_node; /* <=> vm.waiting_fds */ ++ rb_thread_t *th; ++ int fd; ++}; + + inline static void + st_delete_wrap(st_table *table, st_data_t key) +@@ -1310,7 +1314,6 @@ call_without_gvl(void *(*func)(void *), void *data1, + rb_thread_t *th = GET_THREAD(); + int saved_errno = 0; + +- th->waiting_fd = -1; + if (ubf == RUBY_UBF_IO || ubf == RUBY_UBF_PROCESS) { + ubf = ubf_select; + data2 = th; +@@ -1433,11 +1436,15 @@ VALUE + rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd) + { + volatile VALUE val = Qundef; /* shouldn't be used */ ++ rb_vm_t *vm = GET_VM(); + rb_thread_t *th = GET_THREAD(); + volatile int saved_errno = 0; + int state; ++ struct waiting_fd wfd; + +- th->waiting_fd = fd; ++ wfd.fd = fd; ++ wfd.th = th; ++ list_add(&vm->waiting_fds, &wfd.wfd_node); + + TH_PUSH_TAG(th); + if ((state = EXEC_TAG()) == 0) { +@@ -1448,8 +1455,8 @@ rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd) + } + TH_POP_TAG(); + +- /* clear waiting_fd anytime */ +- th->waiting_fd = -1; ++ /* must be deleted before jump */ ++ list_del(&wfd.wfd_node); + + if (state) { + TH_JUMP_TAG(th, state); +@@ -2195,16 +2202,23 @@ int + rb_notify_fd_close(int fd) + { + rb_vm_t *vm = GET_THREAD()->vm; +- rb_thread_t *th = 0; ++ struct waiting_fd *wfd = 0; + int busy; + + busy = 0; +- list_for_each(&vm->living_threads, th, vmlt_node) { +- if (th->waiting_fd == fd) { +- VALUE err = th->vm->special_exceptions[ruby_error_closed_stream]; ++ list_for_each(&vm->waiting_fds, wfd, wfd_node) { ++ if (wfd->fd == fd) { ++ rb_thread_t *th = wfd->th; ++ VALUE err; ++ ++ busy = 1; ++ if (!th) { ++ continue; ++ } ++ wfd->th = 0; ++ err = th->vm->special_exceptions[ruby_error_stream_closed]; + rb_threadptr_pending_interrupt_enque(th, err); + rb_threadptr_interrupt(th); +- busy = 1; + } + } + return busy; +@@ -4839,7 +4853,7 @@ Init_Thread(void) + rb_define_method(rb_cThread, "name=", rb_thread_setname, 1); + rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0); + +- rb_vm_register_special_exception(ruby_error_closed_stream, rb_eIOError, "stream closed"); ++ rb_vm_register_special_exception(ruby_error_stream_closed, rb_eIOError, "stream closed"); + + cThGroup = rb_define_class("ThreadGroup", rb_cObject); + rb_define_alloc_func(cThGroup, thgroup_s_alloc); +diff --git a/vm.c b/vm.c +index 0544bcc4e573..c8ed39ad1e47 100644 +--- a/vm.c ++++ b/vm.c +@@ -2477,7 +2477,6 @@ th_init(rb_thread_t *th, VALUE self) + th->status = THREAD_RUNNABLE; + th->errinfo = Qnil; + th->last_status = Qnil; +- th->waiting_fd = -1; + th->root_svar = Qfalse; + th->local_storage_recursive_hash = Qnil; + th->local_storage_recursive_hash_for_trace = Qnil; +diff --git a/vm_core.h b/vm_core.h +index d0385d219f82..8e2b93d8e9b2 100644 +--- a/vm_core.h ++++ b/vm_core.h +@@ -427,7 +427,7 @@ enum ruby_special_exceptions { + ruby_error_reenter, + ruby_error_nomemory, + ruby_error_sysstack, +- ruby_error_closed_stream, ++ ruby_error_stream_closed, + ruby_special_error_count + }; + +@@ -490,6 +490,7 @@ typedef struct rb_vm_struct { + struct rb_thread_struct *main_thread; + struct rb_thread_struct *running_thread; + ++ struct list_head waiting_fds; /* <=> struct waiting_fd */ + struct list_head living_threads; + size_t living_thread_num; + VALUE thgroup_default; +@@ -712,8 +713,6 @@ typedef struct rb_thread_struct { + /* passing state */ + int state; + +- int waiting_fd; +- + /* for rb_iterate */ + VALUE passed_block_handler; + +@@ -1445,6 +1444,7 @@ void rb_thread_wakeup_timer_thread(void); + static inline void + rb_vm_living_threads_init(rb_vm_t *vm) + { ++ list_head_init(&vm->waiting_fds); + list_head_init(&vm->living_threads); + vm->living_thread_num = 0; + } diff --git a/ruby.spec b/ruby.spec index 53df209..b279692 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 82 +%global release 83 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -132,6 +132,9 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch # OpenSSL. # https://github.com/ruby/openssl/issues/127 Patch10: ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch +# Fix "IOError: stream closed" errors affecting Puma. +# https://bugs.ruby-lang.org/issues/13632 +Patch11: ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -512,6 +515,7 @@ rm -rf ext/fiddle/libffi* %patch7 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1026,6 +1030,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Fri Aug 11 2017 V鱈t Ondruch - 2.4.1-83 +- Fix "IOError: stream closed" errors affecting Puma. + * Thu Aug 03 2017 Fedora Release Engineering - 2.4.1-82 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From ad2b787feae36c3dcc785cbf00784447714094b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 11 Aug 2017 12:42:38 +0200 Subject: [PATCH 473/529] Temporary disable checksec on PPC64LE (rhbz#1479302). --- ruby.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ruby.spec b/ruby.spec index b279692..4a11b3e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -694,9 +694,17 @@ sed -i 's/^/%doc /' .ruby-doc.* sed -i 's/^/%lang(ja) /' .ruby-doc.ja %check +# Temporary change the hardening check on PPC64LE as long as the checksec is +# is providing incorrect output. +# https://bugzilla.redhat.com/show_bug.cgi?id=1479302 +%ifnarch ppc64le # Check Ruby hardening. checksec -f libruby.so.%{ruby_version} | \ grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*Yes.*\d*.*\d*.*libruby.so.%{ruby_version}" +%else +checksec -f libruby.so.%{ruby_version} | \ + grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*No.*\d*.*\d*.*libruby.so.%{ruby_version}" +%endif # Check RubyGems version correctness. [ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ] @@ -1032,6 +1040,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Fri Aug 11 2017 V鱈t Ondruch - 2.4.1-83 - Fix "IOError: stream closed" errors affecting Puma. +- Temporary disable checksec on PPC64LE (rhbz#1479302). * Thu Aug 03 2017 Fedora Release Engineering - 2.4.1-82 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From 8283e1bc985d012dcbeebbb7b590b8ff2493cd23 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Sun, 20 Aug 2017 05:33:11 -0700 Subject: [PATCH 474/529] Update to Ruby 2.4.1. fed_hash: 5c42276905e94f855596b31adca3945b0826204d --- .gitignore | 1 + abrt_prelude.rb | 8 + config.h | 61 + libruby.stp | 303 +++ macros.ruby | 22 + macros.rubygems | 130 + operating_system.rb | 146 ++ ruby-1.9.3-mkmf-verbose.patch | 25 + ...-additional-preludes-by-configuratio.patch | 58 + ...0-Enable-configuration-of-archlibdir.patch | 28 + ...ed-paths-when-empty-version-string-i.patch | 81 + ruby-2.1.0-always-use-i386.patch | 25 + ruby-2.1.0-custom-rubygems-location.patch | 96 + ...2.3-Generate-preludes-using-miniruby.patch | 28 + ruby-2.3.0-ruby_version.patch | 296 +++ ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch | 119 + ruby-exercise.stp | 39 + ruby.spec | 2274 +++++++++++++++++ rubygems.attr | 5 + rubygems.prov | 36 + rubygems.req | 81 + sources | 1 + test_abrt.rb | 7 + test_systemtap.rb | 65 + 24 files changed, 3935 insertions(+) create mode 100644 abrt_prelude.rb create mode 100644 config.h create mode 100644 libruby.stp create mode 100644 macros.ruby create mode 100644 macros.rubygems create mode 100644 operating_system.rb create mode 100644 ruby-1.9.3-mkmf-verbose.patch create mode 100644 ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch create mode 100644 ruby-2.1.0-Enable-configuration-of-archlibdir.patch create mode 100644 ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch create mode 100644 ruby-2.1.0-always-use-i386.patch create mode 100644 ruby-2.1.0-custom-rubygems-location.patch create mode 100644 ruby-2.2.3-Generate-preludes-using-miniruby.patch create mode 100644 ruby-2.3.0-ruby_version.patch create mode 100644 ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch create mode 100644 ruby-exercise.stp create mode 100644 ruby.spec create mode 100644 rubygems.attr create mode 100644 rubygems.prov create mode 100644 rubygems.req create mode 100644 sources create mode 100644 test_abrt.rb create mode 100644 test_systemtap.rb diff --git a/.gitignore b/.gitignore index e69de29..6e71936 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/ruby-2.4.1.tar.xz diff --git a/abrt_prelude.rb b/abrt_prelude.rb new file mode 100644 index 0000000..587c6a6 --- /dev/null +++ b/abrt_prelude.rb @@ -0,0 +1,8 @@ +if defined?(Gem) + require 'rubygems.rb' + + begin + require 'abrt' + rescue LoadError + end +end diff --git a/config.h b/config.h new file mode 100644 index 0000000..b44f715 --- /dev/null +++ b/config.h @@ -0,0 +1,61 @@ +/* + * This config.h is a wrapper include file for the original ruby/config.h, + * which has been renamed to ruby/config-.h. There are conflicts for the + * original ruby/config.h on multilib systems, which result from arch-specific + * configuration options. Please do not use the arch-specific file directly. + */ + +/* + * This wrapped is addpated from SDL's one: + * http://pkgs.fedoraproject.org/cgit/SDL.git/tree/SDL_config.h + */ + +#ifdef ruby_config_wrapper_h +#error "ruby_config_wrapper_h should not be defined!" +#endif +#define ruby_config_wrapper_h + +#if defined(__i386__) +#include "ruby/config-i386.h" +#elif defined(__ia64__) +#include "ruby/config-ia64.h" +#elif defined(__powerpc64__) +#include +#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +#include "ruby/config-ppc64.h" +#else +#include "ruby/config-ppc64le.h" +#endif +#elif defined(__powerpc__) +#include "ruby/config-ppc.h" +#elif defined(__s390x__) +#include "ruby/config-s390x.h" +#elif defined(__s390__) +#include "ruby/config-s390.h" +#elif defined(__x86_64__) +#include "ruby/config-x86_64.h" +#elif defined(__arm__) +#include "ruby/config-arm.h" +#elif defined(__alpha__) +#include "ruby/config-alpha.h" +#elif defined(__sparc__) && defined (__arch64__) +#include "ruby/config-sparc64.h" +#elif defined(__sparc__) +#include "ruby/config-sparc.h" +#elif defined(__aarch64__) +#include "ruby/config-aarch64.h" +#elif defined(__mips64) && defined(__MIPSEL__) +#include "ruby/config-mips64el.h" +#elif defined(__mips64) +#include "ruby/config-mips64.h" +#elif defined(__mips) && defined(__MIPSEL__) +#include "ruby/config-mipsel.h" +#elif defined(__mips) +#include "ruby/config-mips.h" +#elif defined(__riscv64) +#include "ruby/config-riscv64.h" +#else +#error "The ruby-devel package is not usable with the architecture." +#endif + +#undef ruby_config_wrapper_h diff --git a/libruby.stp b/libruby.stp new file mode 100644 index 0000000..098b39d --- /dev/null +++ b/libruby.stp @@ -0,0 +1,303 @@ +/* SystemTap tapset to make it easier to trace Ruby 2.0 + * + * All probes provided by Ruby can be listed using following command + * (the path to the library must be adjuste appropriately): + * + * stap -L 'process("@LIBRARY_PATH@").mark("*")' + */ + +/** + * probe ruby.array.create - Allocation of new array. + * + * @size: Number of elements (an int) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.array.create = + process("@LIBRARY_PATH@").mark("array__create") +{ + size = $arg1 + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.cmethod.entry - Fired just before a method implemented in C is entered. + * + * @classname: Name of the class (string) + * @methodname: The method about bo be executed (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.cmethod.entry = + process("@LIBRARY_PATH@").mark("cmethod__entry") +{ + classname = user_string($arg1) + methodname = user_string($arg2) + file = user_string($arg3) + line = $arg4 +} + +/** + * probe ruby.cmethod.return - Fired just after a method implemented in C has returned. + * + * @classname: Name of the class (string) + * @methodname: The executed method (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.cmethod.return = + process("@LIBRARY_PATH@").mark("cmethod__return") +{ + classname = user_string($arg1) + methodname = user_string($arg2) + file = user_string($arg3) + line = $arg4 +} + +/** + * probe ruby.find.require.entry - Fired when require starts to search load + * path for suitable file to require. + * + * @requiredfile: The name of the file to be required (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.find.require.entry = + process("@LIBRARY_PATH@").mark("find__require__entry") +{ + requiredfile = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.find.require.return - Fired just after require has finished + * search of load path for suitable file to require. + * + * @requiredfile: The name of the file to be required (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.find.require.return = + process("@LIBRARY_PATH@").mark("find__require__return") +{ + requiredfile = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.gc.mark.begin - Fired when a GC mark phase is about to start. + * + * It takes no arguments. + */ +probe ruby.gc.mark.begin = + process("@LIBRARY_PATH@").mark("gc__mark__begin") +{ +} + +/** + * probe ruby.gc.mark.end - Fired when a GC mark phase has ended. + * + * It takes no arguments. + */ +probe ruby.gc.mark.end = + process("@LIBRARY_PATH@").mark("gc__mark__end") +{ +} + +/** + * probe ruby.gc.sweep.begin - Fired when a GC sweep phase is about to start. + * + * It takes no arguments. + */ +probe ruby.gc.sweep.begin = + process("@LIBRARY_PATH@").mark("gc__sweep__begin") +{ +} + +/** + * probe ruby.gc.sweep.end - Fired when a GC sweep phase has ended. + * + * It takes no arguments. + */ +probe ruby.gc.sweep.end = + process("@LIBRARY_PATH@").mark("gc__sweep__end") +{ +} + +/** + * probe ruby.hash.create - Allocation of new hash. + * + * @size: Number of elements (int) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.hash.create = + process("@LIBRARY_PATH@").mark("hash__create") +{ + size = $arg1 + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.load.entry - Fired when calls to "load" are made. + * + * @loadedfile: The name of the file to be loaded (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.load.entry = + process("@LIBRARY_PATH@").mark("load__entry") +{ + loadedfile = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.load.return - Fired just after require has finished + * search of load path for suitable file to require. + * + * @loadedfile: The name of the file that was loaded (string) + */ +probe ruby.load.return = + process("@LIBRARY_PATH@").mark("load__return") +{ + loadedfile = user_string($arg1) +} + +/** + * probe ruby.method.entry - Fired just before a method implemented in Ruby is entered. + * + * @classname: Name of the class (string) + * @methodname: The method about bo be executed (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.method.entry = + process("@LIBRARY_PATH@").mark("method__entry") +{ + classname = user_string($arg1) + methodname = user_string($arg2) + file = user_string($arg3) + line = $arg4 +} + +/** + * probe ruby.method.return - Fired just after a method implemented in Ruby has returned. + * + * @classname: Name of the class (string) + * @methodname: The executed method (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.method.return = + process("@LIBRARY_PATH@").mark("method__return") +{ + classname = user_string($arg1) + methodname = user_string($arg2) + file = user_string($arg3) + line = $arg4 +} + +/** + * probe ruby.object.create - Allocation of new object. + * + * @classname: Name of the class (string) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.object.create = + process("@LIBRARY_PATH@").mark("object__create") +{ + classname = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.parse.begin - Fired just before a Ruby source file is parsed. + * + * @parsedfile: The name of the file to be parsed (string) + * @parsedline: The line number of beginning of parsing (int) + */ +probe ruby.parse.begin = + process("@LIBRARY_PATH@").mark("parse__begin") +{ + parsedfile = user_string($arg1) + parsedline = $arg2 +} + +/** + * probe ruby.parse.end - Fired just after a Ruby source file was parsed. + * + * @parsedfile: The name of parsed the file (string) + * @parsedline: The line number of beginning of parsing (int) + */ +probe ruby.parse.end = + process("@LIBRARY_PATH@").mark("parse__end") +{ + parsedfile = user_string($arg1) + parsedline = $arg2 +} + +/** + * probe ruby.raise - Fired when an exception is raised. + * + * @classname: The class name of the raised exception (string) + * @file: The name of the file where the exception was raised (string) + * @line: The line number in the file where the exception was raised (int) + */ +probe ruby.raise = + process("@LIBRARY_PATH@").mark("raise") +{ + classname = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.require.entry - Fired on calls to rb_require_safe (when a file + * is required). + * + * @requiredfile: The name of the file to be required (string) + * @file: The file that called "require" (string) + * @line: The line number where the call to require was made(int) + */ +probe ruby.require.entry = + process("@LIBRARY_PATH@").mark("require__entry") +{ + requiredfile = user_string($arg1) + file = user_string($arg2) + line = $arg3 +} + +/** + * probe ruby.require.return - Fired just after require has finished + * search of load path for suitable file to require. + * + * @requiredfile: The file that was required (string) + */ +probe ruby.require.return = + process("@LIBRARY_PATH@").mark("require__return") +{ + requiredfile = user_string($arg1) +} + +/** + * probe ruby.string.create - Allocation of new string. + * + * @size: Number of elements (an int) + * @file: The file name where the method is being called (string) + * @line: The line number where the method is being called (int) + */ +probe ruby.string.create = + process("@LIBRARY_PATH@").mark("string__create") +{ + size = $arg1 + file = user_string($arg2) + line = $arg3 +} diff --git a/macros.ruby b/macros.ruby new file mode 100644 index 0000000..36f4077 --- /dev/null +++ b/macros.ruby @@ -0,0 +1,22 @@ +%ruby_libdir %{_datadir}/%{name} +%ruby_libarchdir %{_libdir}/%{name} + +# This is the local lib/arch and should not be used for packaging. +%ruby_sitedir site_ruby +%ruby_sitelibdir %{_prefix}/local/share/%{name}/%{ruby_sitedir} +%ruby_sitearchdir %{_prefix}/local/%{_lib}/%{name}/%{ruby_sitedir} + +# This is the general location for libs/archs compatible with all +# or most of the Ruby versions available in the Fedora repositories. +%ruby_vendordir vendor_ruby +%ruby_vendorlibdir %{ruby_libdir}/%{ruby_vendordir} +%ruby_vendorarchdir %{ruby_libarchdir}/%{ruby_vendordir} + +# For ruby packages we want to filter out any provides caused by private +# libs in %%{ruby_vendorarchdir}/%%{ruby_sitearchdir}. +# +# Note that this must be invoked in the spec file, preferably as +# "%{?ruby_default_filter}", before any %description block. +%ruby_default_filter %{expand: \ +%global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^(%{ruby_vendorarchdir}|%{ruby_sitearchdir})/.*\\\\.so$ \ +} diff --git a/macros.rubygems b/macros.rubygems new file mode 100644 index 0000000..0652ec6 --- /dev/null +++ b/macros.rubygems @@ -0,0 +1,130 @@ +# The RubyGems root folder. +%gem_dir %{_datadir}/gems +%gem_archdir %{_libdir}/gems + +# Common gem locations and files. +%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{?prerelease} +%gem_extdir_mri %{gem_archdir}/%{name}/%{gem_name}-%{version}%{?prerelease} +%gem_libdir %{gem_instdir}/lib +%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}%{?prerelease}.gem +%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}%{?prerelease}.gemspec +%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}%{?prerelease} + + +# %gem_install - Install gem into appropriate directory. +# +# Usage: %gem_install [options] +# +# -n Overrides gem file name for installation. +# -d Set installation directory. +# +%gem_install(d:n:) \ +mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \ +\ +CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\ +gem install \\\ + -V \\\ + --local \\\ + --build-root %{-d*}%{!?-d:.} \\\ + --force \\\ + --document=ri,rdoc \\\ + %{-n*}%{!?-n:%{gem_name}-%{version}%{?prerelease}.gem} \ +%{nil} + + +# For rubygems packages we want to filter out any provides caused by private +# libs in %%{gem_archdir}. +# +# Note that this must be invoked in the spec file, preferably as +# "%{?rubygems_default_filter}", before any %description block. +%rubygems_default_filter %{expand: \ +%global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \ +} + + +# The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not +# essential, but it is usefull to make the sript appear in build log. + + +# %gemspec_add_dep - Add dependency into .gemspec. +# +# Usage: %gemspec_add_dep -g [options] [requirements] +# +# Add dependency named to .gemspec file. The macro adds runtime +# dependency by default. The [requirements] argument can be used to specify +# the dependency constraints more precisely. It is expected to be valid Ruby +# code. +# +# -s Overrides the default .gemspec location. +# -d Add development dependecy. +# +%gemspec_add_dep(g:s:d) \ +read -d '' gemspec_add_dep_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + \ + name = '%{-g*}' \ + requirements = %{*}%{!?1:nil} \ + \ + type = :%{!?-d:runtime}%{?-d:development} \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \ + if dep \ + dep.requirement.concat requirements \ + else \ + spec.public_send "add_#{type}_dependency", name, requirements \ + end \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_add_dep_script" | ruby \ +unset -v gemspec_add_dep_script \ +%{nil} + + +# %gemspec_remove_dep - Remove dependency from .gemspec. +# +# Usage: %gemspec_remove_dep -g [options] [requirements] +# +# Remove dependency named from .gemspec file. The macro removes runtime +# dependency by default. The [requirements] argument can be used to specify +# the dependency constraints more precisely. It is expected to be valid Ruby +# code. The macro fails if these specific requirements can't be removed. +# +# -s Overrides the default .gemspec location. +# -d Remove development dependecy. +# +%gemspec_remove_dep(g:s:d) \ +read -d '' gemspec_remove_dep_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + \ + name = '%{-g*}' \ + requirements = %{*}%{!?1:nil} \ + \ + type = :%{!?-d:runtime}%{?-d:development} \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \ + if dep \ + if requirements \ + requirements = Gem::Requirement.create(requirements).requirements \ + requirements.each do |r| \ + unless dep.requirement.requirements.reject! { |dependency_requirements| dependency_requirements == r } \ + abort("Requirement '#{r.first} #{r.last}' was not possible to remove for dependency '#{dep}'!") \ + end \ + end \ + spec.dependencies.delete dep if dep.requirement.requirements.empty? \ + else \ + spec.dependencies.delete dep \ + end \ + else \ + abort("Dependency '#{name}' was not found!") \ + end \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_remove_dep_script" | ruby \ +unset -v gemspec_remove_dep_script \ +%{nil} diff --git a/operating_system.rb b/operating_system.rb new file mode 100644 index 0000000..4b2903d --- /dev/null +++ b/operating_system.rb @@ -0,0 +1,146 @@ +module Gem + class << self + + ## + # Returns full path of previous but one directory of dir in path + # E.g. for '/usr/share/ruby', 'ruby', it returns '/usr' + + def previous_but_one_dir_to(path, dir) + return unless path + + split_path = path.split(File::SEPARATOR) + File.join(split_path.take_while { |one_dir| one_dir !~ /^#{dir}$/ }[0..-2]) + end + private :previous_but_one_dir_to + + ## + # Detects --install-dir option specified on command line. + + def opt_install_dir? + @opt_install_dir ||= ARGV.include?('--install-dir') || ARGV.include?('-i') + end + private :opt_install_dir? + + ## + # Detects --build-root option specified on command line. + + def opt_build_root? + @opt_build_root ||= ARGV.include?('--build-root') + end + private :opt_build_root? + + ## + # Tries to detect, if arguments and environment variables suggest that + # 'gem install' is executed from rpmbuild. + + def rpmbuild? + @rpmbuild ||= ENV['RPM_PACKAGE_NAME'] && (opt_install_dir? || opt_build_root?) + end + private :rpmbuild? + + ## + # Default gems locations allowed on FHS system (/usr, /usr/share). + # The locations are derived from directories specified during build + # configuration. + + def default_locations + @default_locations ||= { + :system => previous_but_one_dir_to(RbConfig::CONFIG['vendordir'], RbConfig::CONFIG['RUBY_INSTALL_NAME']), + :local => previous_but_one_dir_to(RbConfig::CONFIG['sitedir'], RbConfig::CONFIG['RUBY_INSTALL_NAME']) + } + end + + ## + # For each location provides set of directories for binaries (:bin_dir) + # platform independent (:gem_dir) and dependent (:ext_dir) files. + + def default_dirs + @libdir ||= case RUBY_PLATFORM + when 'java' + RbConfig::CONFIG['datadir'] + else + RbConfig::CONFIG['libdir'] + end + + @default_dirs ||= default_locations.inject(Hash.new) do |hash, location| + destination, path = location + + hash[destination] = if path + { + :bin_dir => File.join(path, RbConfig::CONFIG['bindir'].split(File::SEPARATOR).last), + :gem_dir => File.join(path, RbConfig::CONFIG['datadir'].split(File::SEPARATOR).last, 'gems'), + :ext_dir => File.join(path, @libdir.split(File::SEPARATOR).last, 'gems') + } + else + { + :bin_dir => '', + :gem_dir => '', + :ext_dir => '' + } + end + + hash + end + end + + ## + # Remove methods we are going to override. This avoids "method redefined;" + # warnings otherwise issued by Ruby. + + remove_method :default_dir if method_defined? :default_dir + remove_method :default_path if method_defined? :default_path + remove_method :default_bindir if method_defined? :default_bindir + remove_method :default_ext_dir_for if method_defined? :default_ext_dir_for + + ## + # RubyGems default overrides. + + def default_dir + if opt_build_root? + Gem.default_dirs[:system][:gem_dir] + elsif Process.uid == 0 + Gem.default_dirs[:local][:gem_dir] + else + Gem.user_dir + end + end + + def default_path + path = default_dirs.collect {|location, paths| paths[:gem_dir]} + path.unshift Gem.user_dir if File.exist? Gem.user_home + end + + def default_bindir + if opt_build_root? + Gem.default_dirs[:system][:bin_dir] + elsif Process.uid == 0 + Gem.default_dirs[:local][:bin_dir] + else + File.join [Dir.home, 'bin'] + end + end + + def default_ext_dir_for base_dir + dir = if rpmbuild? + build_dir = base_dir.chomp Gem.default_dirs[:system][:gem_dir] + if build_dir != base_dir + File.join build_dir, Gem.default_dirs[:system][:ext_dir] + end + else + dirs = Gem.default_dirs.detect {|location, paths| paths[:gem_dir] == base_dir} + dirs && dirs.last[:ext_dir] + end + dir && File.join(dir, RbConfig::CONFIG['RUBY_INSTALL_NAME']) + end + + # This method should be available since RubyGems 2.2 until RubyGems 3.0. + # https://github.com/rubygems/rubygems/issues/749 + if method_defined? :install_extension_in_lib + remove_method :install_extension_in_lib + + def install_extension_in_lib + false + end + end + end +end diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch new file mode 100644 index 0000000..d94ef7f --- /dev/null +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -0,0 +1,25 @@ +From 28cc0749d6729aa2444661ee7b411e183fe220b0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 19 Nov 2012 15:14:51 +0100 +Subject: [PATCH] Verbose mkmf. + +--- + lib/mkmf.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/mkmf.rb b/lib/mkmf.rb +index 682eb46..e6b1445 100644 +--- a/lib/mkmf.rb ++++ b/lib/mkmf.rb +@@ -1897,7 +1897,7 @@ def configuration(srcdir) + SHELL = /bin/sh + + # V=0 quiet, V=1 verbose. other values don't work. +-V = 0 ++V = 1 + Q1 = $(V:1=) + Q = $(Q1:0=@) + ECHO1 = $(V:1=@ #{CONFIG['NULLCMD']}) +-- +1.8.3.1 + diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch new file mode 100644 index 0000000..af8b9a9 --- /dev/null +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -0,0 +1,58 @@ +From 996012f6abe0ce4d68a2de9f249935c6d5b467bc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 4 Oct 2013 22:13:11 +0200 +Subject: [PATCH] Allow to specify addition preludes by configuration option. + +--- + Makefile.in | 2 ++ + common.mk | 2 +- + configure.in | 7 +++++++ + 3 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 7e8ed82..7916993 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -116,6 +116,8 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ + XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ + BOOTSTRAPRUBY = @BOOTSTRAPRUBY@ + ++OPTIONAL_PRELUDES = @OPTIONAL_PRELUDES@ ++ + #### End of system configuration section. #### + + MAJOR= @MAJOR@ +diff --git a/common.mk b/common.mk +index 5cfbc3d..3f0a82e 100644 +--- a/common.mk ++++ b/common.mk +@@ -144,7 +144,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) + GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) + + DEFAULT_PRELUDES = $(GEM_PRELUDE) +-PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) ++PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) + GEM_PRELUDE = $(srcdir)/gem_prelude.rb + PRELUDES = {$(srcdir)}prelude.c {$(srcdir)}miniprelude.c + GOLFPRELUDES = {$(srcdir)}golf_prelude.c +diff --git a/configure.in b/configure.in +index 0e371e2..d4f1dcb 100644 +--- a/configure.in ++++ b/configure.in +@@ -4536,6 +4536,13 @@ AC_SUBST(rubyarchhdrdir)dnl + AC_SUBST(sitearchhdrdir)dnl + AC_SUBST(vendorarchhdrdir)dnl + ++AC_ARG_WITH(prelude, ++ AS_HELP_STRING([--with-prelude=FILE-LIST], [specify additional preludes separated by space]), ++ [prelude=$withval]) ++if test "$prelude" != ""; then ++ AC_SUBST(OPTIONAL_PRELUDES, $prelude) ++fi ++ + AC_ARG_WITH(mantype, + AS_HELP_STRING([--with-mantype=TYPE], [specify man page type; TYPE is one of man and doc]), + [ +-- +1.8.3.1 + diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch new file mode 100644 index 0000000..a4e6c28 --- /dev/null +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -0,0 +1,28 @@ +From 07c666ba5c3360dd6f43605a8ac7c85c99c1721f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 1 Oct 2013 12:22:40 +0200 +Subject: [PATCH] Allow to configure libruby.so placement. + +--- + configure.in | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/configure.in b/configure.in +index 37d9a62..553d4d0 100644 +--- a/configure.in ++++ b/configure.in +@@ -3790,6 +3790,11 @@ if test ${multiarch+set}; then + fi + + archlibdir='${libdir}/${arch}' ++AC_ARG_WITH(archlibdir, ++ AS_HELP_STRING([--with-archlibdir=DIR], ++ [prefix for libruby [[LIBDIR/ARCH]]]), ++ [archlibdir="$withval"]) ++ + sitearchlibdir='${libdir}/${sitearch}' + archincludedir='${includedir}/${arch}' + sitearchincludedir='${includedir}/${sitearch}' +-- +1.8.3.1 + diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch new file mode 100644 index 0000000..e841569 --- /dev/null +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -0,0 +1,81 @@ +From e24d97c938c481450ed80ec83e5399595946c1ae Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 8 Feb 2013 22:48:41 +0100 +Subject: [PATCH] Prevent duplicated paths when empty version string is + configured. + +--- + configure.in | 3 ++- + loadpath.c | 12 ++++++++++++ + tool/mkconfig.rb | 2 +- + 3 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/configure.in b/configure.in +index db37cd6..ce8d149 100644 +--- a/configure.in ++++ b/configure.in +@@ -4390,7 +4390,8 @@ AS_CASE(["$ruby_version_dir_name"], + ruby_version_dir=/'${ruby_version_dir_name}' + + if test -z "${ruby_version_dir_name}"; then +- AC_MSG_ERROR([No ruby version, No place for bundled libraries]) ++ unset ruby_version_dir ++ AC_DEFINE(RUBY_LIB_VERSION_BLANK, 1) + fi + + rubylibdir='${rubylibprefix}'${ruby_version_dir} +diff --git a/loadpath.c b/loadpath.c +index 9160031..0d4d953 100644 +--- a/loadpath.c ++++ b/loadpath.c +@@ -65,22 +65,34 @@ const char ruby_initial_load_paths[] = + RUBY_SEARCH_PATH "\0" + #endif + #ifndef NO_RUBY_SITE_LIB ++#ifdef RUBY_LIB_VERSION_BLANK ++ RUBY_SITE_LIB "\0" ++#else + RUBY_SITE_LIB2 "\0" ++#endif + #ifdef RUBY_THINARCH + RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0" + #endif + RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_SITE_LIB "\0" + #endif ++#endif + + #ifndef NO_RUBY_VENDOR_LIB ++#ifdef RUBY_LIB_VERSION_BLANK ++ RUBY_VENDOR_LIB "\0" ++#else + RUBY_VENDOR_LIB2 "\0" ++#endif + #ifdef RUBY_THINARCH + RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0" + #endif + RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" ++#ifndef RUBY_LIB_VERSION_BLANK + RUBY_VENDOR_LIB "\0" + #endif ++#endif + + RUBY_LIB "\0" + #ifdef RUBY_THINARCH +diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb +index 07076d4..35e6c3c 100755 +--- a/tool/mkconfig.rb ++++ b/tool/mkconfig.rb +@@ -113,7 +113,7 @@ + val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump + case name + when /^prefix$/ +- val = "(TOPDIR || DESTDIR + #{val})" ++ val = "(((TOPDIR && TOPDIR.empty?) ? nil : TOPDIR) || DESTDIR + #{val})" + when /^ARCH_FLAG$/ + val = "arch_flag || #{val}" if universal + when /^UNIVERSAL_ARCHNAMES$/ +-- +1.9.0 + diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch new file mode 100644 index 0000000..ba358f3 --- /dev/null +++ b/ruby-2.1.0-always-use-i386.patch @@ -0,0 +1,25 @@ +From 2089cab72b38d6d5e7ba2b596e41014209acad30 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Mon, 19 Nov 2012 14:37:28 +0100 +Subject: [PATCH] Always use i386. + +--- + configure.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.in b/configure.in +index 553d4d0..03a4152 100644 +--- a/configure.in ++++ b/configure.in +@@ -4454,6 +4454,8 @@ AC_SUBST(vendorarchdir)dnl + AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl + AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl + ++target_cpu=`echo $target_cpu | sed s/i.86/i386/` ++ + if test "${universal_binary-no}" = yes ; then + arch="universal-${target_os}" + if test "${rb_cv_architecture_available}" = yes; then +-- +1.8.3.1 + diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch new file mode 100644 index 0000000..44fe4a7 --- /dev/null +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -0,0 +1,96 @@ +From 94da59aafacc6a9efe829529eb51385588d6f149 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Fri, 11 Nov 2011 13:14:45 +0100 +Subject: [PATCH] Allow to install RubyGems into custom location, outside of + Ruby tree. + +--- + configure.in | 5 +++++ + loadpath.c | 4 ++++ + template/verconf.h.tmpl | 3 +++ + tool/rbinstall.rb | 9 +++++++++ + 4 files changed, 21 insertions(+) + +diff --git a/configure.in b/configure.in +index 03a4152..0e371e2 100644 +--- a/configure.in ++++ b/configure.in +@@ -4426,6 +4426,10 @@ AC_ARG_WITH(vendorarchdir, + [vendorarchdir=$withval], + [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) + ++AC_ARG_WITH(rubygemsdir, ++ AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]), ++ [rubygemsdir=$withval]) ++ + if test "${LOAD_RELATIVE+set}"; then + AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) + RUBY_EXEC_PREFIX='' +@@ -4450,6 +4454,7 @@ AC_SUBST(sitearchdir)dnl + AC_SUBST(vendordir)dnl + AC_SUBST(vendorlibdir)dnl + AC_SUBST(vendorarchdir)dnl ++AC_SUBST(rubygemsdir)dnl + + AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl + AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl +diff --git a/loadpath.c b/loadpath.c +index 623dc9d..74c5d9e 100644 +--- a/loadpath.c ++++ b/loadpath.c +@@ -94,6 +94,10 @@ const char ruby_initial_load_paths[] = + #endif + #endif + ++#ifdef RUBYGEMS_DIR ++ RUBYGEMS_DIR "\0" ++#endif ++ + RUBY_LIB "\0" + #ifdef RUBY_THINARCH + RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0" +diff --git a/template/verconf.h.tmpl b/template/verconf.h.tmpl +index 79c003e..34f2382 100644 +--- a/template/verconf.h.tmpl ++++ b/template/verconf.h.tmpl +@@ -36,6 +36,9 @@ + % if C["RUBY_SEARCH_PATH"] + #define RUBY_SEARCH_PATH "${RUBY_SEARCH_PATH}" + % end ++% if C["rubygemsdir"] ++#define RUBYGEMS_DIR "${rubygemsdir}" ++% end + % + % R = {} + % R["ruby_version"] = '"RUBY_LIB_VERSION"' +diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb +index b47b6e1..0b99408 100755 +--- a/tool/rbinstall.rb ++++ b/tool/rbinstall.rb +@@ -330,6 +330,7 @@ def CONFIG.[](name, mandatory = false) + sitearchlibdir = CONFIG["sitearchdir"] + vendorlibdir = CONFIG["vendorlibdir"] + vendorarchlibdir = CONFIG["vendorarchdir"] ++rubygemsdir = CONFIG["rubygemsdir"] + mandir = CONFIG["mandir", true] + docdir = CONFIG["docdir", true] + configure_args = Shellwords.shellwords(CONFIG["configure_args"]) +@@ -517,7 +518,15 @@ def CONFIG.[](name, mandatory = false) + install?(:local, :comm, :lib) do + prepare "library scripts", rubylibdir + noinst = %w[README* *.txt *.rdoc *.gemspec] ++ noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir + install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode) ++ if rubygemsdir ++ noinst = %w[obsolete.rb] ++ install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode) ++ install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode) ++ install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode) ++ install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode) ++ end + end + + install?(:local, :comm, :hdr, :'comm-hdr') do +-- +1.8.3.1 + diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch new file mode 100644 index 0000000..6e8adc4 --- /dev/null +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -0,0 +1,28 @@ +From 07eb5f5e775dec01a92a8b13910eaced9e8ee0cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 2 Dec 2014 10:56:58 +0100 +Subject: [PATCH] Generate preludes using miniruby. + +--- + common.mk | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/common.mk b/common.mk +index 168dc52..20c218a 100644 +--- a/common.mk ++++ b/common.mk +@@ -873,9 +873,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) + $(srcdir)/template/prelude.c.tmpl + + $(PRELUDE_C): $(COMPILE_PRELUDE) \ +- $(PRELUDE_SCRIPTS) ++ $(PRELUDE_SCRIPTS) $(PREP) + $(ECHO) generating $@ +- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ ++ $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \ + $(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS) + + {$(VPATH)}golf_prelude.c: $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb +-- +2.6.3 + diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch new file mode 100644 index 0000000..b4d6f76 --- /dev/null +++ b/ruby-2.3.0-ruby_version.patch @@ -0,0 +1,296 @@ +From 4fc1be3af3f58621bb751c9e63c208b15c0e8d16 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 31 Mar 2015 16:21:04 +0200 +Subject: [PATCH 1/4] Use ruby_version_dir_name for versioned directories. + +This disallows changing the ruby_version constant by --with-ruby-version +configuration options. The two places version numbers are disallowed as +well, since there are a lot of places which cannot handle this format +properly. + +ruby_version_dir_name now specifies custom version string for versioned +directories, e.g. instead of default X.Y.Z, you can specify whatever +string. +--- + configure.in | 64 ++++++++++++++++++++++++++++------------------------- + template/ruby.pc.in | 1 + + 2 files changed, 35 insertions(+), 30 deletions(-) + +diff --git a/configure.in b/configure.in +index db37cd6..6e73fae 100644 +--- a/configure.in ++++ b/configure.in +@@ -4341,9 +4341,6 @@ AS_CASE(["$target_os"], + rubyw_install_name='$(RUBYW_INSTALL_NAME)' + ]) + +-rubylibdir='${rubylibprefix}/${ruby_version}' +-rubyarchdir=${multiarch+'${rubyarchprefix}/${ruby_version}'}${multiarch-'${rubylibdir}/${arch}'} +- + rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} + AC_ARG_WITH(rubyarchprefix, + AS_HELP_STRING([--with-rubyarchprefix=DIR], +@@ -4366,56 +4363,62 @@ AC_ARG_WITH(ridir, + AC_SUBST(ridir) + AC_SUBST(RI_BASE_NAME) + +-AC_ARG_WITH(ruby-version, +- AS_HELP_STRING([--with-ruby-version=STR], [ruby version string for version specific directories [[full]] (full|minor|STR)]), +- [ruby_version=$withval], +- [ruby_version=full]) + unset RUBY_LIB_VERSION +-unset RUBY_LIB_VERSION_STYLE +-AS_CASE(["$ruby_version"], +- [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], +- [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) +-if test ${RUBY_LIB_VERSION_STYLE+set}; then +- { +- echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE" +- echo '#define STRINGIZE(x) x' +- test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0' +- echo '#include "version.h"' +- echo 'ruby_version=RUBY_LIB_VERSION' +- } > conftest.c +- ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" +- eval $ruby_version +-elif test -z "${ruby_version}"; then +- AC_MSG_ERROR([No ruby version, No place for bundled libraries]) +-else +- RUBY_LIB_VERSION="${ruby_version}" +-fi ++RUBY_LIB_VERSION_STYLE='3 /* full */' ++{ ++echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE" ++echo '#define STRINGIZE(x) x' ++test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0' ++echo '#include "version.h"' ++echo 'ruby_version=RUBY_LIB_VERSION' ++} > conftest.c ++ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" ++eval $ruby_version ++ ++RUBY_LIB_VERSION="${ruby_version}" ++ + AC_SUBST(RUBY_LIB_VERSION_STYLE) + AC_SUBST(RUBY_LIB_VERSION) + ++AC_ARG_WITH(ruby-version, ++ AS_HELP_STRING([--with-ruby-version=STR], [ruby version string for version specific directories [[full]] (full|STR)]), ++ [ruby_version_dir_name=$withval], ++ [ruby_version_dir_name=full]) ++AS_CASE(["$ruby_version_dir_name"], ++ [full], [ruby_version_dir_name='${ruby_version}']) ++ ++ruby_version_dir=/'${ruby_version_dir_name}' ++ ++if test -z "${ruby_version_dir_name}"; then ++ AC_MSG_ERROR([No ruby version, No place for bundled libraries]) ++fi ++ ++rubylibdir='${rubylibprefix}'${ruby_version_dir} ++rubyarchdir=${multiarch+'${rubyarchprefix}'${ruby_version_dir}}${multiarch-'${rubylibdir}/${arch}'} ++ + AC_ARG_WITH(sitedir, + AS_HELP_STRING([--with-sitedir=DIR], [site libraries in DIR [[RUBY_LIB_PREFIX/site_ruby]], "no" to disable site directory]), + [sitedir=$withval], + [sitedir='${rubylibprefix}/site_ruby']) +-sitelibdir='${sitedir}/${ruby_version}' ++sitelibdir='${sitedir}'${ruby_version_dir} + + AC_ARG_WITH(sitearchdir, + AS_HELP_STRING([--with-sitearchdir=DIR], + [architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]), + [sitearchdir=$withval], +- [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}]) ++ [sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby'${ruby_version_dir}}${multiarch-'${sitelibdir}/${sitearch}'}]) + + AC_ARG_WITH(vendordir, + AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]), + [vendordir=$withval], + [vendordir='${rubylibprefix}/vendor_ruby']) +-vendorlibdir='${vendordir}/${ruby_version}' ++vendorlibdir='${vendordir}'${ruby_version_dir} + + AC_ARG_WITH(vendorarchdir, + AS_HELP_STRING([--with-vendorarchdir=DIR], + [architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]), + [vendorarchdir=$withval], +- [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) ++ [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) + + if test "${LOAD_RELATIVE+set}"; then + AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) +@@ -4432,6 +4435,7 @@ AC_SUBST(sitearchincludedir)dnl + AC_SUBST(arch)dnl + AC_SUBST(sitearch)dnl + AC_SUBST(ruby_version)dnl ++AC_SUBST(ruby_version_dir_name)dnl + AC_SUBST(rubylibdir)dnl + AC_SUBST(rubyarchdir)dnl + AC_SUBST(sitedir)dnl +diff --git a/template/ruby.pc.in b/template/ruby.pc.in +index 8a2c066..c81b211 100644 +--- a/template/ruby.pc.in ++++ b/template/ruby.pc.in +@@ -9,6 +9,7 @@ MAJOR=@MAJOR@ + MINOR=@MINOR@ + TEENY=@TEENY@ + ruby_version=@ruby_version@ ++ruby_version_dir_name=@ruby_version_dir_name@ + RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@ + RUBY_BASE_NAME=@RUBY_BASE_NAME@ + RUBY_VERSION_NAME=@RUBY_VERSION_NAME@ +-- +2.1.0 + + +From 518850aba6eee76de7715aae8d37330e34b01983 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 31 Mar 2015 16:37:26 +0200 +Subject: [PATCH 2/4] Add ruby_version_dir_name support for RDoc. + +--- + lib/rdoc/ri/paths.rb | 2 +- + tool/rbinstall.rb | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/rdoc/ri/paths.rb b/lib/rdoc/ri/paths.rb +index 970cb91..5bf8230 100644 +--- a/lib/rdoc/ri/paths.rb ++++ b/lib/rdoc/ri/paths.rb +@@ -10,7 +10,7 @@ module RDoc::RI::Paths + #:stopdoc: + require 'rbconfig' + +- version = RbConfig::CONFIG['ruby_version'] ++ version = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + + BASE = if RbConfig::CONFIG.key? 'ridir' then + File.join RbConfig::CONFIG['ridir'], version +diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb +index d4c110e..d39c9a6 100755 +--- a/tool/rbinstall.rb ++++ b/tool/rbinstall.rb +@@ -417,7 +417,7 @@ def CONFIG.[](name, mandatory = false) + + install?(:doc, :rdoc) do + if $rdocdir +- ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version'], "system") ++ ridatadir = File.join(CONFIG['ridir'], CONFIG['ruby_version_dir_name'] || CONFIG['ruby_version'], "system") + prepare "rdoc", ridatadir + install_recursive($rdocdir, ridatadir, :mode => $data_mode) + end +-- +2.1.0 + + +From f8d136f9a46d1fe87eba622ab9665935d05e981b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 31 Mar 2015 16:37:44 +0200 +Subject: [PATCH 3/4] Add ruby_version_dir_name support for RubyGems. + +--- + lib/rubygems/defaults.rb | 11 ++++++----- + test/rubygems/test_gem.rb | 5 +++-- + 2 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb +index 55ca080..75eea2b 100644 +--- a/lib/rubygems/defaults.rb ++++ b/lib/rubygems/defaults.rb +@@ -32,20 +32,20 @@ def self.default_dir + [ + File.dirname(RbConfig::CONFIG['sitedir']), + 'Gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + ] + elsif RbConfig::CONFIG['rubylibprefix'] then + [ + RbConfig::CONFIG['rubylibprefix'], + 'gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + ] + else + [ + RbConfig::CONFIG['libdir'], + ruby_engine, + 'gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + ] + end + +@@ -75,7 +75,8 @@ def self.default_rubygems_dirs + + def self.user_dir + parts = [Gem.user_home, '.gem', ruby_engine] +- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty? ++ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] ++ parts << ruby_version_dir_name unless ruby_version_dir_name.empty? + File.join parts + end + +@@ -172,7 +173,7 @@ def self.vendor_dir # :nodoc: + return nil unless RbConfig::CONFIG.key? 'vendordir' + + File.join RbConfig::CONFIG['vendordir'], 'gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + end + + ## +diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb +index 0428bea..b6e090e 100644 +--- a/test/rubygems/test_gem.rb ++++ b/test/rubygems/test_gem.rb +@@ -1101,7 +1101,8 @@ def test_self_use_paths + + def test_self_user_dir + parts = [@userhome, '.gem', Gem.ruby_engine] +- parts << RbConfig::CONFIG['ruby_version'] unless RbConfig::CONFIG['ruby_version'].empty? ++ ruby_version_dir_name = RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] ++ parts << ruby_version_dir_name unless ruby_version_dir_name.empty? + + assert_equal File.join(parts), Gem.user_dir + end +@@ -1228,7 +1229,7 @@ def test_self_user_home_user_drive_and_path + def test_self_vendor_dir + expected = + File.join RbConfig::CONFIG['vendordir'], 'gems', +- RbConfig::CONFIG['ruby_version'] ++ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + + assert_equal expected, Gem.vendor_dir + end +-- +2.1.0 + + +From 88c38a030c22dbf9422ece847bdfbf87d6659313 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 1 Apr 2015 14:55:37 +0200 +Subject: [PATCH 4/4] Let headers directories follow the configured version + name. + +--- + configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index 6e73fae..c842725 100644 +--- a/configure.in ++++ b/configure.in +@@ -271,7 +271,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` + RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"` + AC_SUBST(RUBY_BASE_NAME) + AC_SUBST(RUBYW_BASE_NAME) +-AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version}') ++AC_SUBST(RUBY_VERSION_NAME, '${RUBY_BASE_NAME}-${ruby_version_dir_name}') + + AC_CANONICAL_TARGET + test x"$target_alias" = x && +-- +2.1.0 + diff --git a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch new file mode 100644 index 0000000..8765d2a --- /dev/null +++ b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch @@ -0,0 +1,119 @@ +From 346e147ba6480839b87046e9a9efab0bf6ed3660 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Wed, 10 Aug 2016 17:35:48 +0200 +Subject: [PATCH] Rely on ldd to detect glibc. + +This is just workaround, since we know we are quite sure this will be successful +on Red Hat platforms. + +This workaround rhbz#1361037 +--- + test/fiddle/helper.rb | 92 --------------------------------------------------- + 1 file changed, 92 deletions(-) + +diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb +index 1da3d93..65148a1 100644 +--- a/test/fiddle/helper.rb ++++ b/test/fiddle/helper.rb +@@ -6,98 +6,6 @@ + + libc_so = libm_so = nil + +-case RUBY_PLATFORM +-when /cygwin/ +- libc_so = "cygwin1.dll" +- libm_so = "cygwin1.dll" +-when /x86_64-linux/ +- libc_so = "/lib64/libc.so.6" +- libm_so = "/lib64/libm.so.6" +-when /linux/ +- libdir = '/lib' +- case [0].pack('L!').size +- when 4 +- # 32-bit ruby +- libdir = '/lib32' if File.directory? '/lib32' +- when 8 +- # 64-bit ruby +- libdir = '/lib64' if File.directory? '/lib64' +- end +- libc_so = File.join(libdir, "libc.so.6") +- libm_so = File.join(libdir, "libm.so.6") +-when /mingw/, /mswin/ +- require "rbconfig" +- crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase' +- libc_so = libm_so = "#{crtname}.dll" +-when /darwin/ +- libc_so = "/usr/lib/libc.dylib" +- libm_so = "/usr/lib/libm.dylib" +-when /kfreebsd/ +- libc_so = "/lib/libc.so.0.1" +- libm_so = "/lib/libm.so.1" +-when /gnu/ #GNU/Hurd +- libc_so = "/lib/libc.so.0.3" +- libm_so = "/lib/libm.so.6" +-when /mirbsd/ +- libc_so = "/usr/lib/libc.so.41.10" +- libm_so = "/usr/lib/libm.so.7.0" +-when /freebsd/ +- libc_so = "/lib/libc.so.7" +- libm_so = "/lib/libm.so.5" +-when /bsd|dragonfly/ +- libc_so = "/usr/lib/libc.so" +- libm_so = "/usr/lib/libm.so" +-when /solaris/ +- libdir = '/lib' +- case [0].pack('L!').size +- when 4 +- # 32-bit ruby +- libdir = '/lib' if File.directory? '/lib' +- when 8 +- # 64-bit ruby +- libdir = '/lib/64' if File.directory? '/lib/64' +- end +- libc_so = File.join(libdir, "libc.so") +- libm_so = File.join(libdir, "libm.so") +-when /aix/ +- pwd=Dir.pwd +- libc_so = libm_so = "#{pwd}/libaixdltest.so" +- unless File.exist? libc_so +- cobjs=%w!strcpy.o! +- mobjs=%w!floats.o sin.o! +- funcs=%w!sin sinf strcpy strncpy! +- expfile='dltest.exp' +- require 'tmpdir' +- Dir.mktmpdir do |dir| +- begin +- Dir.chdir dir +- %x!/usr/bin/ar x /usr/lib/libc.a #{cobjs.join(' ')}! +- %x!/usr/bin/ar x /usr/lib/libm.a #{mobjs.join(' ')}! +- %x!echo "#{funcs.join("\n")}\n" > #{expfile}! +- require 'rbconfig' +- if RbConfig::CONFIG["GCC"] = 'yes' +- lflag='-Wl,' +- else +- lflag='' +- end +- flags="#{lflag}-bE:#{expfile} #{lflag}-bnoentry -lm" +- %x!#{RbConfig::CONFIG["LDSHARED"]} -o #{libc_so} #{(cobjs+mobjs).join(' ')} #{flags}! +- ensure +- Dir.chdir pwd +- end +- end +- end +-else +- libc_so = ARGV[0] if ARGV[0] && ARGV[0][0] == ?/ +- libm_so = ARGV[1] if ARGV[1] && ARGV[1][0] == ?/ +- if( !(libc_so && libm_so) ) +- $stderr.puts("libc and libm not found: #{$0} ") +- end +-end +- +-libc_so = nil if !libc_so || (libc_so[0] == ?/ && !File.file?(libc_so)) +-libm_so = nil if !libm_so || (libm_so[0] == ?/ && !File.file?(libm_so)) +- + if !libc_so || !libm_so + ruby = EnvUtil.rubybin + ldd = `ldd #{ruby}` +-- +2.9.2 + diff --git a/ruby-exercise.stp b/ruby-exercise.stp new file mode 100644 index 0000000..df9df41 --- /dev/null +++ b/ruby-exercise.stp @@ -0,0 +1,39 @@ +/* Example tapset file. + * + * You can execute the tapset using following command (please adjust the path + * prior running the command, if needed): + * + * stap /usr/share/doc/ruby-2.0.0.0/ruby-exercise.stp -c "ruby -e \"puts 'test'\"" + */ + +probe ruby.cmethod.entry { + printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line); +} + +probe ruby.cmethod.return { + printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line); +} + +probe ruby.method.entry { + printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line); +} + +probe ruby.method.return { + printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line); +} + +probe ruby.gc.mark.begin { printf("%d gc.mark.begin\n", tid()); } + +probe ruby.gc.mark.end { printf("%d gc.mark.end\n", tid()); } + +probe ruby.gc.sweep.begin { printf("%d gc.sweep.begin\n", tid()); } + +probe ruby.gc.sweep.end { printf("%d gc.sweep.end\n", tid()); } + +probe ruby.object.create{ + printf("%d obj.create %s %s:%d\n", tid(), classname, file, line); +} + +probe ruby.raise { + printf("%d raise %s %s:%d\n", tid(), classname, file, line); +} diff --git a/ruby.spec b/ruby.spec new file mode 100644 index 0000000..82d5781 --- /dev/null +++ b/ruby.spec @@ -0,0 +1,2274 @@ +%global major_version 2 +%global minor_version 4 +%global teeny_version 1 +%global major_minor_version %{major_version}.%{minor_version} + +%global ruby_version %{major_minor_version}.%{teeny_version} +%global ruby_release %{ruby_version} + +# Specify the named version. It has precedense to revision. +#%%global milestone rc1 + +# Keep the revision enabled for pre-releases from SVN. +#%%global revision 57159 + +%global ruby_archive %{name}-%{ruby_version} + +# If revision and milestone are removed/commented out, the official release build is expected. +%if 0%{?milestone:1}%{?revision:1} != 0 +%global development_release %{?milestone}%{?!milestone:%{?revision:r%{revision}}} +%global ruby_archive %{ruby_archive}-%{?milestone}%{?!milestone:%{?revision:r%{revision}}} +%endif + + +%global release 79 +%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} + +# The RubyGems library has to stay out of Ruby directory three, since the +# RubyGems should be share by all Ruby implementations. +%global rubygems_dir %{_datadir}/rubygems + +# Bundled libraries versions +%global rubygems_version 2.6.11 +%global molinillo_version 0.5.7 + +# TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. +# http://redmine.ruby-lang.org/issues/5313 +%global irb_version %{ruby_version} + +%global bigdecimal_version 1.3.0 +%global did_you_mean_version 1.1.0 +%global io_console_version 0.4.6 +%global json_version 2.0.2 +%global minitest_version 5.10.1 +%global net_telnet_version 0.1.1 +%global openssl_version 2.0.3 +%global power_assert_version 0.4.1 +%global psych_version 2.2.2 +%global rake_version 12.0.0 +%global rdoc_version 5.0.0 +%global test_unit_version 3.2.3 +%global xmlrpc_version 0.2.1 + +# Might not be needed in the future, if we are lucky enough. +# https://bugzilla.redhat.com/show_bug.cgi?id=888262 +%global tapset_root %{_datadir}/systemtap +%global tapset_dir %{tapset_root}/tapset +%global tapset_libdir %(echo %{_libdir} | sed 's/64//')* + +%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') + +%if 0%{?fedora} >= 19 +%global with_rubypick 1 +%endif + +Summary: An interpreter of object-oriented scripting language +Name: ruby +Version: %{ruby_version} +Release: %{release_string} +Group: Development/Languages +# Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ... +# MIT and CCO: ccan/* +# zlib: ext/digest/md5/md5.*, ext/nkf/nkf-utf8/nkf.c +# UCD: some of enc/trans/**/*.src +License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD +URL: http://ruby-lang.org/ +Source0: ftp://ftp.ruby-lang.org/pub/%{name}/%{major_minor_version}/%{ruby_archive}.tar.xz +Source1: operating_system.rb +# TODO: Try to push SystemTap support upstream. +Source2: libruby.stp +Source3: ruby-exercise.stp +Source4: macros.ruby +Source5: macros.rubygems +Source6: abrt_prelude.rb +# This wrapper fixes https://bugzilla.redhat.com/show_bug.cgi?id=977941 +# Hopefully, it will get removed soon: +# https://fedorahosted.org/fpc/ticket/312 +# https://bugzilla.redhat.com/show_bug.cgi?id=977941 +Source7: config.h +# RPM dependency generators. +Source8: rubygems.attr +Source9: rubygems.req +Source10: rubygems.prov +# ABRT hoook test case. +Source12: test_abrt.rb +# SystemTap tests. +Source13: test_systemtap.rb + +# The load directive is supported since RPM 4.12, i.e. F21+. The build process +# fails on older Fedoras. +%{?load:%{SOURCE4}} +%{?load:%{SOURCE5}} + +# Fix ruby_version abuse. +# https://bugs.ruby-lang.org/issues/11002 +Patch0: ruby-2.3.0-ruby_version.patch +# http://bugs.ruby-lang.org/issues/7807 +Patch1: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +# Allows to override libruby.so placement. Hopefully we will be able to return +# to plain --with-rubyarchprefix. +# http://bugs.ruby-lang.org/issues/8973 +Patch2: ruby-2.1.0-Enable-configuration-of-archlibdir.patch +# Force multiarch directories for i.86 to be always named i386. This solves +# some differencies in build between Fedora and RHEL. +Patch3: ruby-2.1.0-always-use-i386.patch +# Allows to install RubyGems into custom directory, outside of Ruby's tree. +# http://bugs.ruby-lang.org/issues/5617 +Patch4: ruby-2.1.0-custom-rubygems-location.patch +# Make mkmf verbose by default +Patch5: ruby-1.9.3-mkmf-verbose.patch +# Adds support for '--with-prelude' configuration option. This allows to built +# in support for ABRT. +# http://bugs.ruby-lang.org/issues/8566 +Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +# Use miniruby to regenerate prelude.c. +# https://bugs.ruby-lang.org/issues/10554 +Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch +# Workaround "an invalid stdio handle" error on PPC, due to recently introduced +# hardening features of glibc (rhbz#1361037). +# https://bugs.ruby-lang.org/issues/12666 +Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch + +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +Suggests: rubypick +Recommends: ruby(rubygems) >= %{rubygems_version} +Recommends: rubygem(bigdecimal) >= %{bigdecimal_version} +Recommends: rubygem(did_you_mean) >= %{did_you_mean_version} +Recommends: rubygem(openssl) >= %{openssl_version} + +BuildRequires: autoconf +BuildRequires: gdbm-devel +BuildRequires: libffi-devel +BuildRequires: openssl-devel +BuildRequires: libyaml-devel +BuildRequires: readline-devel +# Needed to pass test_set_program_name(TestRubyOptions) +BuildRequires: procps +BuildRequires: %{_bindir}/dtrace +# RubyGems test suite optional dependencies. +BuildRequires: git +BuildRequires: %{_bindir}/cmake +# Required to test hardening. +BuildRequires: %{_bindir}/checksec +BuildRequires: multilib-rpm-config + +# This package provides %%{_bindir}/ruby-mri therefore it is marked by this +# virtual provide. It can be installed as dependency of rubypick. +Provides: ruby(runtime_executable) = %{ruby_release} + +%description +Ruby is the interpreted scripting language for quick and easy +object-oriented programming. It has many features to process text +files and to do system management tasks (as in Perl). It is simple, +straight-forward, and extensible. + + +%package devel +Summary: A Ruby development environment +Group: Development/Languages +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: rubypick +Requires: rubygems + +%description devel +Header files and libraries for building an extension library for the +Ruby or an application embedding Ruby. + +%package libs +Summary: Libraries necessary to run Ruby +Group: Development/Libraries +License: Ruby or BSD +Provides: ruby(release) = %{ruby_release} + +# Virtual provides for CCAN copylibs. +# https://fedorahosted.org/fpc/ticket/364 +Provides: bundled(ccan-build_assert) +Provides: bundled(ccan-check_type) +Provides: bundled(ccan-container_of) +Provides: bundled(ccan-list) + +# Tcl/Tk support was removed from stdlib in Ruby 2.4, i.e. F27 timeframe +# so lets obsolete it. This is not the best place, but we don't have +# better, unless https://fedorahosted.org/fpc/ticket/645 provides some +# generic solution. +Obsoletes: ruby-tcltk < 2.4.0 + + +%description libs +This package includes the libruby, necessary to run Ruby. + + +# TODO: Rename or not rename to ruby-rubygems? +%package -n rubygems +Summary: The Ruby standard for packaging ruby libraries +Version: %{rubygems_version} +Group: Development/Libraries +License: Ruby or MIT +Requires: ruby(release) +Recommends: rubygem(rdoc) >= %{rdoc_version} +Recommends: rubygem(io-console) >= %{io_console_version} +Requires: rubygem(openssl) >= %{openssl_version} +Requires: rubygem(psych) >= %{psych_version} +Provides: gem = %{version}-%{release} +Provides: ruby(rubygems) = %{version}-%{release} +# https://github.com/rubygems/rubygems/pull/1189#issuecomment-121600910 +Provides: bundled(rubygem(molinillo)) = %{molinillo_version} +Provides: bundled(rubygem-molinillo) = %{molinillo_version} +BuildArch: noarch + +%description -n rubygems +RubyGems is the Ruby standard for publishing and managing third party +libraries. + + +%package -n rubygems-devel +Summary: Macros and development tools for packaging RubyGems +Version: %{rubygems_version} +Group: Development/Libraries +License: Ruby or MIT +Requires: ruby(rubygems) = %{version}-%{release} +# Needed for RDoc documentation format generation. +Requires: rubygem(json) >= %{json_version} +Requires: rubygem(rdoc) >= %{rdoc_version} +BuildArch: noarch + +%description -n rubygems-devel +Macros and development tools for packaging RubyGems. + + +%package -n rubygem-rake +Summary: Ruby based make-like utility +Version: %{rake_version} +Group: Development/Libraries +License: MIT +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rake = %{version}-%{release} +Provides: rubygem(rake) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-rake +Rake is a Make-like program implemented in Ruby. Tasks and dependencies are +specified in standard Ruby syntax. + + +%package irb +Summary: The Interactive Ruby +Version: %{irb_version} +Group: Development/Libraries +Requires: %{name}-libs = %{ruby_version} +Provides: irb = %{version}-%{release} +Provides: ruby(irb) = %{version}-%{release} +BuildArch: noarch + +%description irb +The irb is acronym for Interactive Ruby. It evaluates ruby expression +from the terminal. + + +%package -n rubygem-rdoc +Summary: A tool to generate HTML and command-line documentation for Ruby projects +Version: %{rdoc_version} +Group: Development/Libraries +# SIL: lib/rdoc/generator/template/darkfish/css/fonts.css +License: GPLv2 and Ruby and MIT and SIL +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Requires: ruby(irb) = %{irb_version} +Requires: rubygem(io-console) >= %{io_console_version} +# Hardcode the dependency to keep it compatible with dependencies of the +# official rubygem-rdoc gem. +Requires: rubygem(json) >= %{json_version} +Provides: rdoc = %{version}-%{release} +Provides: ri = %{version}-%{release} +Provides: rubygem(rdoc) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-rdoc +RDoc produces HTML and command-line documentation for Ruby projects. RDoc +includes the 'rdoc' and 'ri' tools for generating and displaying online +documentation. + + +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{_bindir}/ri +BuildArch: noarch + +%description doc +This package contains documentation for %{name}. + + +%package -n rubygem-bigdecimal +Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic +Version: %{bigdecimal_version} +Group: Development/Libraries +License: GPL+ or Artistic +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(bigdecimal) = %{version}-%{release} + +%description -n rubygem-bigdecimal +Ruby provides built-in support for arbitrary precision integer arithmetic. +For example: + +42**13 -> 1265437718438866624512 + +BigDecimal provides similar support for very large or very accurate floating +point numbers. Decimal arithmetic is also useful for general calculation, +because it provides the correct answers people expectwhereas normal binary +floating point arithmetic often introduces subtle errors because of the +conversion between base 10 and base 2. + + +%package -n rubygem-did_you_mean +Summary: "Did you mean?" experience in Ruby +Version: %{did_you_mean_version} +Group: Development/Libraries +License: MIT +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(did_you_mean) = %{version}-%{release} + +%description -n rubygem-did_you_mean +"did you mean?" experience in Ruby: the error message will tell you the right +one when you misspelled something. + + +%package -n rubygem-io-console +Summary: IO/Console is a simple console utilizing library +Version: %{io_console_version} +Group: Development/Libraries +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(io-console) = %{version}-%{release} + +%description -n rubygem-io-console +IO/Console provides very simple and portable access to console. It doesn't +provide higher layer features, such like curses and readline. + + +%package -n rubygem-json +Summary: This is a JSON implementation as a Ruby extension in C +Version: %{json_version} +Group: Development/Libraries +# UCD: ext/json/generator/generator.c +License: (Ruby or GPLv2) and UCD +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(json) = %{version}-%{release} + +%description -n rubygem-json +This is a implementation of the JSON specification according to RFC 4627. +You can think of it as a low fat alternative to XML, if you want to store +data to disk or transmit it over a network rather than use a verbose +markup language. + + +%package -n rubygem-minitest +Summary: Minitest provides a complete suite of testing facilities +Version: %{minitest_version} +Group: Development/Libraries +License: MIT +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(minitest) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-minitest +minitest/unit is a small and incredibly fast unit testing framework. + +minitest/spec is a functionally complete spec engine. + +minitest/benchmark is an awesome way to assert the performance of your +algorithms in a repeatable manner. + +minitest/mock by Steven Baker, is a beautifully tiny mock object +framework. + +minitest/pride shows pride in testing and adds coloring to your test +output. + + +%package -n rubygem-openssl +Summary: OpenSSL provides SSL, TLS and general purpose cryptography +Version: %{openssl_version} +Group: Development/Libraries +License: Ruby or BSD +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(openssl) = %{version}-%{release} + +%description -n rubygem-openssl +OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the +OpenSSL library. + + +%package -n rubygem-power_assert +Summary: Power Assert for Ruby +Version: %{power_assert_version} +Group: Development/Libraries +License: Ruby or BSD +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(power_assert) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-power_assert +Power Assert shows each value of variables and method calls in the expression. +It is useful for testing, providing which value wasn't correct when the +condition is not satisfied. + + +%package -n rubygem-psych +Summary: A libyaml wrapper for Ruby +Version: %{psych_version} +Group: Development/Libraries +License: MIT +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(psych) = %{version}-%{release} + +%description -n rubygem-psych +Psych is a YAML parser and emitter. Psych leverages +libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting +capabilities. In addition to wrapping libyaml, Psych also knows how to +serialize and de-serialize most Ruby objects to and from the YAML format. + + +%package -n rubygem-net-telnet +Summary: Provides telnet client functionality +Version: %{net_telnet_version} +Group: Development/Libraries +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(net-telnet) = %{version}-%{release} + +%description -n rubygem-net-telnet +Provides telnet client functionality. + +This class also has, through delegation, all the methods of a socket object +(by default, a TCPSocket, but can be set by the Proxy option to new()). This +provides methods such as close() to end the session and sysread() to read data +directly from the host, instead of via the waitfor() mechanism. Note that if +you do use sysread() directly when in telnet mode, you should probably pass +the output through preprocess() to extract telnet command sequences. + + +%package -n rubygem-test-unit +Summary: An xUnit family unit testing framework for Ruby +Version: %{test_unit_version} +Group: Development/Libraries +# lib/test/unit/diff.rb is a double license of the Ruby license and PSF license. +# lib/test-unit.rb is a dual license of the Ruby license and LGPLv2.1 or later. +License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPLv2+) +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Requires: rubygem(power_assert) +Provides: rubygem(test-unit) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-test-unit +Test::Unit (test-unit) is unit testing framework for Ruby, based on xUnit +principles. These were originally designed by Kent Beck, creator of extreme +programming software development methodology, for Smalltalk's SUnit. It allows +writing tests, checking results and automated testing in Ruby. + + +%package -n rubygem-xmlrpc +Summary: XMLRPC is a lightweight protocol that enables remote procedure calls over HTTP +Version: %{xmlrpc_version} +Group: Development/Libraries +License: Ruby or BSD +Requires: ruby(release) +Requires: ruby(rubygems) >= %{rubygems_version} +Provides: rubygem(xmlrpc) = %{version}-%{release} +BuildArch: noarch + +%description -n rubygem-xmlrpc +XMLRPC is a lightweight protocol that enables remote procedure calls over +HTTP. + + +%prep +%setup -q -n %{ruby_archive} + +# Remove bundled libraries to be sure they are not used. +rm -rf ext/psych/yaml +rm -rf ext/fiddle/libffi* + +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch9 -p1 + +# Provide an example of usage of the tapset: +cp -a %{SOURCE3} . + +# Make abrt_prelude.rb available for compilation process. The prelude must be +# available together with Ruby's source due to +# https://github.com/ruby/ruby/blob/trunk/tool/compile_prelude.rb#L26 +cp -a %{SOURCE6} . + +%build +autoconf + +%configure \ + --with-rubylibprefix='%{ruby_libdir}' \ + --with-archlibdir='%{_libdir}' \ + --with-rubyarchprefix='%{ruby_libarchdir}' \ + --with-sitedir='%{ruby_sitelibdir}' \ + --with-sitearchdir='%{ruby_sitearchdir}' \ + --with-vendordir='%{ruby_vendorlibdir}' \ + --with-vendorarchdir='%{ruby_vendorarchdir}' \ + --with-rubyhdrdir='%{_includedir}' \ + --with-rubyarchhdrdir='%{_includedir}' \ + --with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \ + --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ + --with-rubygemsdir='%{rubygems_dir}' \ + --with-ruby-pc='%{name}.pc' \ + --with-compress-debug-sections=no \ + --disable-rpath \ + --enable-shared \ + --with-ruby-version='' \ + --enable-multiarch \ + --with-prelude=./abrt_prelude.rb \ + +# Q= makes the build output more verbose and allows to check Fedora +# compiler options. +make %{?_smp_mflags} COPY="cp -p" Q= + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} + +# Rename ruby/config.h to ruby/config-.h to avoid file conflicts on +# multilib systems and install config.h wrapper +%multilib_fix_c_header --file %{_includedir}/%{name}/config.h + +# Rename the ruby executable. It is replaced by RubyPick. +%{?with_rubypick:mv %{buildroot}%{_bindir}/%{name}{,-mri}} + +# Version is empty if --with-ruby-version is specified. +# http://bugs.ruby-lang.org/issues/7807 +sed -i 's/Version: \${ruby_version}/Version: %{ruby_version}/' %{buildroot}%{_libdir}/pkgconfig/%{name}.pc + +# Kill bundled certificates, as they should be part of ca-certificates. +for cert in \ + rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem \ + rubygems.org/AddTrustExternalCARoot.pem \ + index.rubygems.org/GlobalSignRootCA.pem +do + rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert + rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert) +done +# Ensure there is not forgotten any certificate. +test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)" + +# Move macros file into proper place and replace the %%{name} macro, since it +# would be wrongly evaluated during build of other packages. +mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d +install -m 644 %{SOURCE4} %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.ruby +install -m 644 %{SOURCE5} %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems +sed -i "s/%%{name}/%{name}/" %{buildroot}%{_rpmconfigdir}/macros.d/macros.rubygems + +# Install dependency generators. +mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs +install -m 644 %{SOURCE8} %{buildroot}%{_rpmconfigdir}/fileattrs +install -m 755 %{SOURCE9} %{buildroot}%{_rpmconfigdir} +install -m 755 %{SOURCE10} %{buildroot}%{_rpmconfigdir} + +# Install custom operating_system.rb. +mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults +cp %{SOURCE1} %{buildroot}%{rubygems_dir}/rubygems/defaults + +# Move gems root into common direcotry, out of Ruby directory structure. +mv %{buildroot}%{ruby_libdir}/gems %{buildroot}%{gem_dir} + +# Create folders for gem binary extensions. +# TODO: These folders should go into rubygem-filesystem but how to achieve it, +# since noarch package cannot provide arch dependent subpackages? +# http://rpm.org/ticket/78 +mkdir -p %{buildroot}%{_exec_prefix}/lib{,64}/gems/%{name} + +# Move bundled rubygems to %%gem_dir and %%gem_extdir_mri +# make symlinks for io-console and bigdecimal, which are considered to be part of stdlib by other Gems +mkdir -p %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib +mv %{buildroot}%{ruby_libdir}/rdoc* %{buildroot}%{gem_dir}/gems/rdoc-%{rdoc_version}/lib +mv %{buildroot}%{gem_dir}/specifications/default/rdoc-%{rdoc_version}.gemspec %{buildroot}%{gem_dir}/specifications + +mkdir -p %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} +mv %{buildroot}%{ruby_libdir}/bigdecimal %{buildroot}%{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib +mv %{buildroot}%{ruby_libarchdir}/bigdecimal.so %{buildroot}%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} +mv %{buildroot}%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_version}.gemspec %{buildroot}%{gem_dir}/specifications +ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}/lib/bigdecimal %{buildroot}%{ruby_libdir}/bigdecimal +ln -s %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}/bigdecimal.so %{buildroot}%{ruby_libarchdir}/bigdecimal.so + +mkdir -p %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/io +mv %{buildroot}%{ruby_libdir}/io %{buildroot}%{gem_dir}/gems/io-console-%{io_console_version}/lib +mv %{buildroot}%{ruby_libarchdir}/io/console.so %{buildroot}%{_libdir}/gems/%{name}/io-console-%{io_console_version}/io +mv %{buildroot}%{gem_dir}/specifications/default/io-console-%{io_console_version}.gemspec %{buildroot}%{gem_dir}/specifications +ln -s %{gem_dir}/gems/io-console-%{io_console_version}/lib/io %{buildroot}%{ruby_libdir}/io +ln -s %{_libdir}/gems/%{name}/io-console-%{io_console_version}/io/console.so %{buildroot}%{ruby_libarchdir}/io/console.so + +mkdir -p %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version} +mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib +mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/ +mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications +ln -s %{gem_dir}/gems/json-%{json_version}/lib/json.rb %{buildroot}%{ruby_libdir}/json.rb +ln -s %{gem_dir}/gems/json-%{json_version}/lib/json %{buildroot}%{ruby_libdir}/json +ln -s %{_libdir}/gems/%{name}/json-%{json_version}/json/ %{buildroot}%{ruby_libarchdir}/json + +mkdir -p %{buildroot}%{gem_dir}/gems/openssl-%{openssl_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/openssl-%{openssl_version} +mv %{buildroot}%{ruby_libdir}/openssl* %{buildroot}%{gem_dir}/gems/openssl-%{openssl_version}/lib +mv %{buildroot}%{ruby_libarchdir}/openssl.so %{buildroot}%{_libdir}/gems/%{name}/openssl-%{openssl_version}/ +mv %{buildroot}%{gem_dir}/specifications/default/openssl-%{openssl_version}.gemspec %{buildroot}%{gem_dir}/specifications +# This used to be directory when OpenSSL was integral part of StdLib => Keep +# it as directory and link everything in it to prevent directory => symlink +# conversion RPM issues. +mkdir -p %{buildroot}%{ruby_libdir}/openssl +find %{buildroot}%{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl -maxdepth 1 -type f -exec \ + sh -c 'ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl/`basename {}` %{buildroot}%{ruby_libdir}/openssl' \; +ln -s %{gem_dir}/gems/openssl-%{openssl_version}/lib/openssl.rb %{buildroot}%{ruby_libdir}/openssl.rb +ln -s %{_libdir}/gems/%{name}/openssl-%{openssl_version}/openssl.so %{buildroot}%{ruby_libarchdir}/openssl.so + +mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib +mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version} +mv %{buildroot}%{ruby_libdir}/psych* %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib +mv %{buildroot}%{ruby_libarchdir}/psych.so %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}/ +mv %{buildroot}%{gem_dir}/specifications/default/psych-%{psych_version}.gemspec %{buildroot}%{gem_dir}/specifications +ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych %{buildroot}%{ruby_libdir}/psych +ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb +ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_libarchdir}/psych.so + +# Move the binary extensions into proper place (if no gem has binary extension, +# the extensions directory might be empty). +find %{buildroot}%{gem_dir}/extensions/*-%{_target_os}/%{ruby_version}/* -maxdepth 0 \ + -exec mv '{}' %{buildroot}%{_libdir}/gems/%{name}/ \; \ + || echo "No gem binary extensions to move." + +# Adjust the gemspec files so that the gems will load properly +sed -i '/^end$/ i\ + s.extensions = ["json/ext/parser.so", "json/ext/generator.so"]' %{buildroot}%{gem_dir}/specifications/json-%{json_version}.gemspec + +# Move man pages into proper location +mv %{buildroot}%{gem_dir}/gems/rake-%{rake_version}/doc/rake.1 %{buildroot}%{_mandir}/man1 + +# Install a tapset and fix up the path to the library. +mkdir -p %{buildroot}%{tapset_dir} +sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \ + %{SOURCE2} > %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp +# Escape '*/' in comment. +sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp + +# Prepare -doc subpackage file lists. +find doc -maxdepth 1 -type f ! -name '.*' ! -name '*.ja*' > .ruby-doc.en +echo 'doc/images' >> .ruby-doc.en +echo 'doc/syntax' >> .ruby-doc.en + +find doc -maxdepth 1 -type f -name '*.ja*' > .ruby-doc.ja +echo 'doc/irb' >> .ruby-doc.ja +echo 'doc/pty' >> .ruby-doc.ja + +sed -i 's/^/%doc /' .ruby-doc.* +sed -i 's/^/%lang(ja) /' .ruby-doc.ja + +%check +# Check Ruby hardening. +checksec -f libruby.so.%{ruby_version} | \ + grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*Yes.*\d*.*\d*.*libruby.so.%{ruby_version}" + +# Check RubyGems version correctness. +[ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ] +# Check Molinillo version correctness. +[ "`make runruby TESTRUN_SCRIPT=\"-e \\\"module Gem; module Resolver; end; end; require 'rubygems/resolver/molinillo/lib/molinillo/gem_metadata'; puts Gem::Resolver::Molinillo::VERSION\\\"\" | tail -1`" \ + == '%{molinillo_version}' ] + +# test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, +# when abrt.rb cannot be required (seems to be easier way then customizing +# the test suite). +touch abrt.rb + +# Check if abrt hook is required (RubyGems are disabled by default when using +# runruby, so re-enable them). +make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE12}" + +# Check if systemtap is supported. +make runruby TESTRUN_SCRIPT=%{SOURCE13} + +DISABLE_TESTS="" + +# https://bugs.ruby-lang.org/issues/11480 +# Once seen: http://koji.fedoraproject.org/koji/taskinfo?taskID=12556650 +DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb" + +make check TESTS="-v $DISABLE_TESTS" + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%files +%license BSDL +%license COPYING +%lang(ja) %license COPYING.ja +%license GPL +%license LEGAL +%{_bindir}/erb +%{_bindir}/%{name}%{?with_rubypick:-mri} +%{_mandir}/man1/erb* +%{_mandir}/man1/ruby* + +%files devel +%license BSDL +%license COPYING +%lang(ja) %license COPYING.ja +%license GPL +%license LEGAL + +%{_rpmconfigdir}/macros.d/macros.ruby + +%{_includedir}/* +%{_libdir}/libruby.so +%{_libdir}/pkgconfig/%{name}.pc + +%files libs +%license COPYING +%lang(ja) %license COPYING.ja +%license GPL +%license LEGAL +%doc README.md +%doc NEWS +# Exclude /usr/local directory since it is supposed to be managed by +# local system administrator. +%exclude %{ruby_sitelibdir} +%exclude %{ruby_sitearchdir} +%dir %{ruby_vendorlibdir} +%dir %{ruby_vendorarchdir} + +# List all these files explicitly to prevent surprises +# Platform independent libraries. +%dir %{ruby_libdir} +%{ruby_libdir}/*.rb +%exclude %{ruby_libdir}/irb.rb +%exclude %{ruby_libdir}/json.rb +%exclude %{ruby_libdir}/openssl.rb +%exclude %{ruby_libdir}/psych.rb +%{ruby_libdir}/cgi +%{ruby_libdir}/digest +%{ruby_libdir}/drb +%{ruby_libdir}/fiddle +%{ruby_libdir}/forwardable +%exclude %{ruby_libdir}/irb +%{ruby_libdir}/matrix +%{ruby_libdir}/net +%{ruby_libdir}/optparse +%{ruby_libdir}/racc +%{ruby_libdir}/rbconfig +%{ruby_libdir}/rexml +%{ruby_libdir}/rinda +%{ruby_libdir}/ripper +%{ruby_libdir}/rss +%{ruby_libdir}/shell +%{ruby_libdir}/syslog +%{ruby_libdir}/unicode_normalize +%{ruby_libdir}/uri +%{ruby_libdir}/webrick +%{ruby_libdir}/yaml + +# Platform specific libraries. +%{_libdir}/libruby.so.* +%dir %{ruby_libarchdir} +%dir %{ruby_libarchdir}/cgi +%{ruby_libarchdir}/cgi/escape.so +%{ruby_libarchdir}/continuation.so +%{ruby_libarchdir}/coverage.so +%{ruby_libarchdir}/date_core.so +%{ruby_libarchdir}/dbm.so +%dir %{ruby_libarchdir}/digest +%{ruby_libarchdir}/digest.so +%{ruby_libarchdir}/digest/bubblebabble.so +%{ruby_libarchdir}/digest/md5.so +%{ruby_libarchdir}/digest/rmd160.so +%{ruby_libarchdir}/digest/sha1.so +%{ruby_libarchdir}/digest/sha2.so +%dir %{ruby_libarchdir}/enc +%{ruby_libarchdir}/enc/big5.so +%{ruby_libarchdir}/enc/cp949.so +%{ruby_libarchdir}/enc/emacs_mule.so +%{ruby_libarchdir}/enc/encdb.so +%{ruby_libarchdir}/enc/euc_jp.so +%{ruby_libarchdir}/enc/euc_kr.so +%{ruby_libarchdir}/enc/euc_tw.so +%{ruby_libarchdir}/enc/gb18030.so +%{ruby_libarchdir}/enc/gb2312.so +%{ruby_libarchdir}/enc/gbk.so +%{ruby_libarchdir}/enc/iso_8859_1.so +%{ruby_libarchdir}/enc/iso_8859_10.so +%{ruby_libarchdir}/enc/iso_8859_11.so +%{ruby_libarchdir}/enc/iso_8859_13.so +%{ruby_libarchdir}/enc/iso_8859_14.so +%{ruby_libarchdir}/enc/iso_8859_15.so +%{ruby_libarchdir}/enc/iso_8859_16.so +%{ruby_libarchdir}/enc/iso_8859_2.so +%{ruby_libarchdir}/enc/iso_8859_3.so +%{ruby_libarchdir}/enc/iso_8859_4.so +%{ruby_libarchdir}/enc/iso_8859_5.so +%{ruby_libarchdir}/enc/iso_8859_6.so +%{ruby_libarchdir}/enc/iso_8859_7.so +%{ruby_libarchdir}/enc/iso_8859_8.so +%{ruby_libarchdir}/enc/iso_8859_9.so +%{ruby_libarchdir}/enc/koi8_r.so +%{ruby_libarchdir}/enc/koi8_u.so +%{ruby_libarchdir}/enc/shift_jis.so +%dir %{ruby_libarchdir}/enc/trans +%{ruby_libarchdir}/enc/trans/big5.so +%{ruby_libarchdir}/enc/trans/chinese.so +%{ruby_libarchdir}/enc/trans/ebcdic.so +%{ruby_libarchdir}/enc/trans/emoji.so +%{ruby_libarchdir}/enc/trans/emoji_iso2022_kddi.so +%{ruby_libarchdir}/enc/trans/emoji_sjis_docomo.so +%{ruby_libarchdir}/enc/trans/emoji_sjis_kddi.so +%{ruby_libarchdir}/enc/trans/emoji_sjis_softbank.so +%{ruby_libarchdir}/enc/trans/escape.so +%{ruby_libarchdir}/enc/trans/gb18030.so +%{ruby_libarchdir}/enc/trans/gbk.so +%{ruby_libarchdir}/enc/trans/iso2022.so +%{ruby_libarchdir}/enc/trans/japanese.so +%{ruby_libarchdir}/enc/trans/japanese_euc.so +%{ruby_libarchdir}/enc/trans/japanese_sjis.so +%{ruby_libarchdir}/enc/trans/korean.so +%{ruby_libarchdir}/enc/trans/single_byte.so +%{ruby_libarchdir}/enc/trans/transdb.so +%{ruby_libarchdir}/enc/trans/utf8_mac.so +%{ruby_libarchdir}/enc/trans/utf_16_32.so +%{ruby_libarchdir}/enc/utf_16be.so +%{ruby_libarchdir}/enc/utf_16le.so +%{ruby_libarchdir}/enc/utf_32be.so +%{ruby_libarchdir}/enc/utf_32le.so +%{ruby_libarchdir}/enc/windows_1250.so +%{ruby_libarchdir}/enc/windows_1251.so +%{ruby_libarchdir}/enc/windows_1252.so +%{ruby_libarchdir}/enc/windows_1253.so +%{ruby_libarchdir}/enc/windows_1254.so +%{ruby_libarchdir}/enc/windows_1257.so +%{ruby_libarchdir}/enc/windows_31j.so +%{ruby_libarchdir}/etc.so +%{ruby_libarchdir}/fcntl.so +%{ruby_libarchdir}/fiber.so +%{ruby_libarchdir}/fiddle.so +%{ruby_libarchdir}/gdbm.so +%dir %{ruby_libarchdir}/io +%{ruby_libarchdir}/io/nonblock.so +%{ruby_libarchdir}/io/wait.so +%dir %{ruby_libarchdir}/mathn +%{ruby_libarchdir}/mathn/complex.so +%{ruby_libarchdir}/mathn/rational.so +%{ruby_libarchdir}/nkf.so +%{ruby_libarchdir}/objspace.so +%{ruby_libarchdir}/pathname.so +%{ruby_libarchdir}/pty.so +%dir %{ruby_libarchdir}/racc +%{ruby_libarchdir}/racc/cparse.so +%dir %{ruby_libarchdir}/rbconfig +%{ruby_libarchdir}/rbconfig.rb +%{ruby_libarchdir}/rbconfig/sizeof.so +%{ruby_libarchdir}/readline.so +%{ruby_libarchdir}/ripper.so +%{ruby_libarchdir}/sdbm.so +%{ruby_libarchdir}/socket.so +%{ruby_libarchdir}/stringio.so +%{ruby_libarchdir}/strscan.so +%{ruby_libarchdir}/syslog.so +%{ruby_libarchdir}/zlib.so + +%{tapset_root} + +%files -n rubygems +%{_bindir}/gem +%dir %{rubygems_dir} +%{rubygems_dir}/rbconfig +%{rubygems_dir}/rubygems +%{rubygems_dir}/rubygems.rb +%{rubygems_dir}/ubygems.rb + +# Explicitly include only RubyGems directory strucure to avoid accidentally +# packaged content. +%dir %{gem_dir} +%dir %{gem_dir}/build_info +%dir %{gem_dir}/cache +%dir %{gem_dir}/doc +%dir %{gem_dir}/extensions +%dir %{gem_dir}/gems +%dir %{gem_dir}/specifications +%dir %{gem_dir}/specifications/default +%dir %{_exec_prefix}/lib*/gems +%dir %{_exec_prefix}/lib*/gems/ruby + +%exclude %{gem_dir}/cache/* + +%files -n rubygems-devel +%{_rpmconfigdir}/macros.d/macros.rubygems +%{_rpmconfigdir}/fileattrs/rubygems.attr +%{_rpmconfigdir}/rubygems.req +%{_rpmconfigdir}/rubygems.prov + +%files -n rubygem-rake +%{_bindir}/rake +%{gem_dir}/gems/rake-%{rake_version} +%{gem_dir}/specifications/rake-%{rake_version}.gemspec +%{_mandir}/man1/rake.1* + +%files irb +%{_bindir}/irb +%{ruby_libdir}/irb.rb +%{ruby_libdir}/irb +%{_mandir}/man1/irb.1* + +%files -n rubygem-rdoc +%{_bindir}/rdoc +%{_bindir}/ri +%{gem_dir}/gems/rdoc-%{rdoc_version} +%{gem_dir}/specifications/rdoc-%{rdoc_version}.gemspec +%{_mandir}/man1/ri* + +%files doc -f .ruby-doc.en -f .ruby-doc.ja +%doc README.md +%doc ChangeLog +%doc ruby-exercise.stp +%{_datadir}/ri + +%files -n rubygem-bigdecimal +%{ruby_libdir}/bigdecimal +%{ruby_libarchdir}/bigdecimal.so +%{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version} +%{gem_dir}/gems/bigdecimal-%{bigdecimal_version} +%{gem_dir}/specifications/bigdecimal-%{bigdecimal_version}.gemspec + +%files -n rubygem-did_you_mean +%{gem_dir}/gems/did_you_mean-%{did_you_mean_version} +%exclude %{gem_dir}/gems/did_you_mean-%{did_you_mean_version}/.* +%{gem_dir}/specifications/did_you_mean-%{did_you_mean_version}.gemspec + +%files -n rubygem-io-console +%{ruby_libdir}/io +%{ruby_libarchdir}/io/console.so +%{_libdir}/gems/%{name}/io-console-%{io_console_version} +%{gem_dir}/gems/io-console-%{io_console_version} +%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec + +%files -n rubygem-json +%{ruby_libdir}/json* +%{ruby_libarchdir}/json* +%{_libdir}/gems/%{name}/json-%{json_version} +%{gem_dir}/gems/json-%{json_version} +%{gem_dir}/specifications/json-%{json_version}.gemspec + +%files -n rubygem-minitest +%{gem_dir}/gems/minitest-%{minitest_version} +%exclude %{gem_dir}/gems/minitest-%{minitest_version}/.* +%{gem_dir}/specifications/minitest-%{minitest_version}.gemspec + +%files -n rubygem-openssl +%{ruby_libdir}/openssl +%{ruby_libdir}/openssl.rb +%{ruby_libarchdir}/openssl.so +%{_libdir}/gems/%{name}/openssl-%{openssl_version} +%{gem_dir}/gems/openssl-%{openssl_version} +%{gem_dir}/specifications/openssl-%{openssl_version}.gemspec + +%files -n rubygem-power_assert +%{gem_dir}/gems/power_assert-%{power_assert_version} +%exclude %{gem_dir}/gems/power_assert-%{power_assert_version}/.* +%{gem_dir}/specifications/power_assert-%{power_assert_version}.gemspec + +%files -n rubygem-psych +%{ruby_libdir}/psych +%{ruby_libdir}/psych.rb +%{ruby_libarchdir}/psych.so +%{_libdir}/gems/%{name}/psych-%{psych_version} +%{gem_dir}/gems/psych-%{psych_version} +%{gem_dir}/specifications/psych-%{psych_version}.gemspec + +%files -n rubygem-net-telnet +%{gem_dir}/gems/net-telnet-%{net_telnet_version} +%exclude %{gem_dir}/gems/net-telnet-%{net_telnet_version}/.* +%{gem_dir}/specifications/net-telnet-%{net_telnet_version}.gemspec + +%files -n rubygem-test-unit +%{gem_dir}/gems/test-unit-%{test_unit_version} +%{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec + +%files -n rubygem-xmlrpc +%license %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/LICENSE.txt +%dir %{gem_dir}/gems/xmlrpc-%{xmlrpc_version} +%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Gemfile +%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Rakefile +%doc %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/README.md +%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/bin +%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/lib +%{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec + +%changelog +* Mon Apr 03 2017 V鱈t Ondruch - 2.4.1-79 +- Update to Ruby 2.4.1. + +* Thu Feb 23 2017 V鱈t Ondruch - 2.4.0-78 +- Fix OpenSSL symlinks. + +* Sat Feb 11 2017 Fedora Release Engineering - 2.4.0-77 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 03 2017 V鱈t Ondruch - 2.4.0-76 +- Fix GCC 7.x compatibility (rhbz#1417590). +- Use standardized multilib solution (rhbz#1412274). + +* Tue Jan 17 2017 V鱈t Ondruch - 2.4.0-75 +- Apply patch fixing rubygem-mongo build failures. + +* Fri Jan 13 2017 Mamoru TASAKA - 2.4.0-74 +- Rebuild again for f26-ruby24 sidetag + +* Thu Jan 12 2017 Igor Gnatenko - 2.4.0-73 +- Rebuild for readline 7.x + +* Wed Jan 11 2017 V鱈t Ondruch - 2.4.0-72 +- Link files into directory to avoid dir => symlink isues. + +* Mon Jan 09 2017 V鱈t Ondruch - 2.4.0-71 +- Add rubygem-io-console dependency for rubygem-rdoc. + +* Mon Jan 02 2017 V鱈t Ondruch - 2.4.0-70 +- Upgrade to Ruby 2.4.0. +- Move gemified xmlrpc into subpackage. +- Move gemified openssl into subpackage. +- Tk is removed from stdlib. +- Extend 'gem_' macros for pre-release version support. + +* Tue Nov 22 2016 V鱈t Ondruch - 2.3.3-61 +- Update to Ruby 2.3.3. +- Exclude json.rb from ruby-libs (rhbz#1397370). + +* Fri Nov 18 2016 V鱈t Ondruch - 2.3.2-60 +- Update to Ruby 2.3.2. + +* Fri Oct 21 2016 V鱈t Ondruch - 2.3.1-59 +- Continue to use OpenSSL 1.0 for the moment. +- Add gemspec_add_dep and gemspec_remove_dep macros. +- Harden package. + +* Wed Aug 10 2016 V鱈t Ondruch - 2.3.1-58 +- Workaround "an invalid stdio handle" error on PPC (rhbz#1361037). + +* Tue Jul 12 2016 V鱈t Ondruch - 2.3.1-57 +- Make symlinks for json gem. + +* Mon May 23 2016 V鱈t Ondruch - 2.3.1-56 +- Requires rubygem(json) for rubygem-rdoc (rhbz#1325022). + +* Fri Apr 29 2016 V鱈t Ondruch - 2.3.1-55 +- Update to Ruby 2.3.1. + +* Wed Feb 3 2016 Peter Robinson 2.3.0-54 +- Add rubypick and rubygems requires to ruby-devel to deal with BuildRequires + +* Fri Jan 15 2016 Mamoru TASAKA - 2.3.0-53 +- Backport trunk@53455 to make ruby-qt build + +* Wed Jan 06 2016 V鱈t Ondruch - 2.3.0-52 +- Explicitly require RDoc, since weak dependencies are ignored by default. + +* Wed Jan 06 2016 V鱈t Ondruch - 2.3.0-51 +- Load RubyGems prior ABRT hook to properly rescue RubyGems exceptions. + +* Mon Jan 04 2016 V鱈t Ondruch - 2.3.0-50 +- Upgrade to Ruby 2.3.0. +- Move gemified net-telnet into subpackage. +- Add did_you_mean subpackage. +- Add virtual provides for CCAN copylibs. +- Use weak dependencies. + +* Tue Dec 22 2015 Pavel Valena - 2.3.0-0.7.preview2 +- Add systemtap tests. + +* Mon Dec 21 2015 V鱈t Ondruch - 2.2.4-47 +- Update to Ruby 2.2.4. + +* Thu Dec 10 2015 V鱈t Ondruch - 2.2.3-46 +- Fix ABRT hook autoloading. + +* Fri Sep 04 2015 Michal Toman - 2.2.3-45 +- Add support for MIPS architecture to config.h + +* Tue Sep 01 2015 V鱈t Ondruch - 2.2.3-44 +- Update to Ruby 2.2.3. + +* Tue Jun 23 2015 V鱈t Ondruch - 2.2.2-43 +- Fix for "dh key too small" error of OpenSSL 1.0.2+. + +* Thu Jun 18 2015 Fedora Release Engineering - 2.2.2-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jun 10 2015 V鱈t Ondruch - 2.2.2-41 +- Fix the git BR following the git package split. + +* Mon May 04 2015 V鱈t Ondruch - 2.2.2-40 +- Fix upgrade path (rubygem-io-console's version was recently bumped in F21 + and makes the higher release to win). + +* Tue Apr 14 2015 Josef Stribny - 2.2.2-11 +- Bump release because of gems + +* Tue Apr 14 2015 Josef Stribny - 2.2.2-1 +- Update to Ruby 2.2.2 + +* Fri Mar 20 2015 V鱈t Ondruch - 2.2.1-10 +- Fix libruby.so versions in SystemTap scripts (rhbz#1202232). + +* Wed Mar 04 2015 V鱈t Ondruch - 2.2.1-9 +- Update to Ruby 2.2.1. + +* Sat Feb 21 2015 Till Maas - 2.2.0-8 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Thu Feb 05 2015 V鱈t Ondruch - 2.2.0-7 +- Fix directory ownership. + +* Wed Feb 04 2015 V鱈t Ondruch - 2.2.0-6 +- Initialize all load paths in operating_system.rb. + +* Tue Feb 03 2015 V鱈t Ondruch - 2.2.0-5 +- Make operating_system.rb more robust. +- Add RubyGems stub headers for bundled gems. + +* Thu Jan 29 2015 V鱈t Ondruch - 2.2.0-4 +- Add missing rubygem-test-unit dependency on rubygem-power_assert. + +* Thu Jan 15 2015 Mamoru TASAKA - 2.2.0-3 +- Bump release to avoid EVR issue on rubygem-test-unit + +* Fri Jan 02 2015 V鱈t Ondruch - 2.2.0-1 +- Upgrade to Ruby 2.2.0. +- Explicitly list RubyGems directories to avoid accidentaly packaged content. +- Split test-unit and power_assert gems into separate sub-packages. +- Drop libdb dependency in favor of gdbm. + +* Fri Dec 26 2014 Orion Poplwski - 2.1.5-26 +- Disbable sse2 on i668 (bug #1101811) + +* Thu Nov 20 2014 V鱈t Ondruch - 2.1.5-25 +- Update to Ruby 2.1.5. + +* Fri Oct 31 2014 V鱈t Ondruch - 2.1.4-24 +- Update to Ruby 2.1.4. +- Include only vendor directories, not their content (rhbz#1114071). +- Fix "invalid regex" warning for non-rubygem packages (rhbz#1154067). +- Use load macro introduced in RPM 4.12. + +* Mon Aug 18 2014 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Tue Jun 24 2014 Peter Robinson 2.1.2-23 +- Fix FTBFS +- Specify tcl/tk 8.6 +- Add upstream patch to build with libffi 3.1 + +* Sun Jun 08 2014 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed May 21 2014 Jaroslav karvada +- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86 + +* Tue May 20 2014 Josef Stribny - 2.1.2-21 +- Update to Ruby 2.1.2 + +* Tue May 06 2014 V鱈t Ondruch - 2.1.1-20 +- Remove useless exclude (rhbz#1065897). +- Extract load macro into external file and include it. +- Kill bundled certificates. + +* Wed Apr 23 2014 V鱈t Ondruch - 2.1.1-19 +- Correctly expand $(prefix) in some Makefiles, e.g. eruby. + +* Tue Apr 08 2014 V鱈t Ondruch - 2.1.1-18 +- Update to Ruby 2.1.1. +- Revert regression of Hash#reject. + +* Mon Mar 03 2014 V鱈t Ondruch - 2.1.0-19 +- Add RPM dependency generators for RubyGems. + +* Mon Feb 10 2014 Josef Stribny - 2.1.0-19 +- Don't link cert.pem explicitely + +* Wed Jan 15 2014 V鱈t Ondruch - 2.1.0-18 +- Don't generate documentation on unexpected places. +- Detect if rubygems are running under rpmbuild and install gem binary + extensions into appropriate place. +- Add support for ppc64le arch (rhbz#1053263). +- Re-enable some test cases, which are passing now with Kernel 3.12.8+. +- Backport fix for floating point issues on i686. + +* Thu Jan 02 2014 V鱈t Ondruch - 2.1.0-17 +- Upgrade to Ruby 2.1.0. +- Move RPM macros into /usr/lib/rpm/macros.d directory. +- Allow MD5 in OpenSSL for tests. + +* Tue Jul 30 2013 V鱈t Ondruch - 2.0.0.247-15 +- Move Psych symlinks to vendor dir, to prevent F18 -> F19 upgrade issues + (rhbz#988490). + +* Mon Jul 15 2013 V鱈t Ondruch - 2.0.0.247-14 +- Add forgotten psych.rb link into rubygem-psych to fix "private method `load' + called for Psych:Moduler" error (rhbz#979133). + +* Thu Jul 11 2013 V鱈t Ondruch - 2.0.0.247-13 +- Fixes multilib conlicts of .gemspec files. +- Make symlinks for psych gem to ruby stdlib dirs (rhbz#979133). +- Use system-wide cert.pem. + +* Thu Jul 04 2013 V鱈t Ondruch - 2.0.0.247-12 +- Fix RubyGems search paths when building gems with native extension + (rhbz#979133). + +* Tue Jul 02 2013 V鱈t Ondruch - 2.0.0.247-11 +- Fix RubyGems version. + +* Tue Jul 02 2013 V鱈t Ondruch - 2.0.0.247-10 +- Better support for build without configuration (rhbz#977941). + +* Mon Jul 01 2013 V鱈t Ondruch - 2.0.0.247-9 +- Update to Ruby 2.0.0-p247 (rhbz#979605). +- Fix CVE-2013-4073. +- Fix for wrong makefiles created by mkmf (rhbz#921650). +- Add support for ABRT autoloading. + +* Fri May 17 2013 V鱈t Ondruch - 2.0.0.195-8 +- Update to Ruby 2.0.0-p195 (rhbz#917374). +- Fix object taint bypassing in DL and Fiddle (CVE-2013-2065). +- Fix build against OpenSSL with enabled ECC curves. +- Add aarch64 support (rhbz#926463). + +* Fri Apr 19 2013 V鱈t Ondruch - 2.0.0.0-7 +- Macro definition moved into macros.ruby and macros.rubygems files. +- Added filtering macros. +- Filter automatically generated provides of private libraries (rhbz#947408). + +* Fri Mar 22 2013 V鱈t Ondruch - 2.0.0.0-6 +- Fix RbConfig::CONFIG['exec_prefix'] returns empty string (rhbz#924851). + +* Thu Mar 21 2013 V鱈t Ondruch - 2.0.0.0-5 +- Make Ruby buildable without rubypick. +- Prevent random test failures. + +* Fri Mar 08 2013 Mamoru TASAKA - 2.0.0.0-4 +- Don't mark rpm config file as %%config (fpc#259) + +* Tue Mar 05 2013 V鱈t Ondruch - 2.0.0.0-3 +- Avoid "method redefined;" warnings due to modified operating_system.rb. +- Fix strange paths created during build of binary gems. + +* Mon Feb 25 2013 V鱈t Ondruch - 2.0.0.0-2 +- Prevent squash of %%gem_install with following line. + +* Mon Feb 25 2013 V鱈t Ondruch - 2.0.0.0-1 +- Update to Ruby 2.0.0-p0. +- Change %%{ruby_extdir} to %%{ruby_extdir_mri} in preparation for better + JRuby support. + +* Mon Feb 25 2013 Mamoru TASAKA - 2.0.0.0-0.3.r39387 +- Move test-unit.gemspec to -libs subpackage for now because rubygems + 2.0.0 does not create this + +* Fri Feb 22 2013 V鱈t Ondruch - 2.0.0.0-0.2.r39387 +- Fix issues with wrong value of Rubygem's shebang introduced in r39267. + +* Fri Feb 22 2013 V鱈t Ondruch - 2.0.0.0-0.1.r39387 +- Upgrade to Ruby 2.0.0 (r39387). +- Introduce %%gem_install macro. +- Build against libdb instead of libdb4 (rhbz#894022). +- Move native extensions from exts to ruby directory. +- Enable most of the PPC test suite. +- Change ruby(abi) -> ruby(release). +- Rename ruby executable to ruby-mri, to be prepared for RubyPick. +- Add ruby(runtime_executable) virtual provide, which is later used + by RubyPick. +- RDoc now depends on JSON. +- Try to make -doc subpackage noarch again, since the new RDoc should resolve + the arch dependent issues (https://github.com/rdoc/rdoc/issues/71). +- Enable SystemTap support. +- Add TapSet for Ruby. +- Split Psych into rubygem-psych subpackage. + +* Mon Feb 11 2013 Mamoru TASAKA - 1.9.3.385-28 +- Update to 1.9.3 p385 + +* Sat Jan 19 2013 Mamoru TASAKA - 1.9.3.374-27 +- Update to 1.9.3 p374 +- Fix provided variables in pkgconfig (bug 789532: + V鱈t Ondruch ) + +* Fri Jan 18 2013 Mamoru TASAKA - 1.9.3.362-26 +- Provide non-versioned pkgconfig file (bug 789532) +- Use db5 on F-19 (bug 894022) + +* Wed Jan 16 2013 Mamoru TASAKA - 1.9.3.362-25 +- Backport fix for the upstream PR7629, save the proc made from the given block + (bug 895173) + +* Wed Jan 2 2013 Mamoru TASAKA - 1.9.3.362-24 +- Update to 1.9.3.362 + +* Mon Dec 03 2012 Jaromir Capik - 1.9.3.327-23 +- Skipping test_parse.rb (fails on ARM at line 787) +- http://bugs.ruby-lang.org/issues/6899 + +* Sun Nov 11 2012 Mamoru TASAKA - 1.9.3.327-23 +- Skip test_str_crypt (on rawhide) for now (upstream bug 7312) + +* Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-22 +- Ignore some network related tests + +* Sat Nov 10 2012 Mamoru TASAKA - 1.9.3.327-21 +- Update to 1.9.3.327 +- Fix Hash-flooding DoS vulnerability on MurmurHash function + (CVE-2012-5371) + +* Sat Oct 13 2012 Mamoru TASAKA - 1.9.3.286-19 +- Update to 1.9.3 p286 +- Don't create files when NUL-containing path name is passed + (bug 865940, CVE-2012-4522) + +* Thu Oct 04 2012 Mamoru Tasaka - 1.9.3.194-18 +- Patch from trunk for CVE-2012-4464, CVE-2012-4466 + +* Thu Sep 06 2012 V鱈t Ondruch - 1.9.3.194-17 +- Split documentation into -doc subpackage (rhbz#854418). + +* Tue Aug 14 2012 V鱈t Ondruch - 1.9.3.194-16 +- Revert the dependency of ruby-libs on rubygems (rhbz#845011, rhbz#847482). + +* Wed Aug 01 2012 V鱈t Ondruch - 1.9.3.194-15 +- ruby-libs must require rubygems (rhbz#845011). + +* Sat Jul 21 2012 Fedora Release Engineering - 1.9.3.194-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jun 11 2012 Bohuslav Kabrda - 1.9.3.194-13 +- Make the bigdecimal gem a runtime dependency of Ruby. + +* Mon Jun 11 2012 Bohuslav Kabrda - 1.9.3.194-12 +- Make symlinks for bigdecimal and io-console gems to ruby stdlib dirs (RHBZ 829209). + +* Tue May 29 2012 Bohuslav Kabrda - 1.9.3.194-11 +- Fix license to contain Public Domain. +- macros.ruby now contains unexpanded macros. + +* Sun Apr 22 2012 Mamoru Tasaka - 1.9.3.194-10.1 +- Bump release + +* Fri Apr 20 2012 V鱈t Ondruch - 1.9.3.194-1 +- Update to Ruby 1.9.3-p194. + +* Mon Apr 09 2012 Karsten Hopp 1.9.3.125-3 +- disable check on ppc(64), RH bugzilla 803698 + +* Wed Feb 29 2012 Peter Robinson - 1.9.3.125-2 +- Temporarily disable make check on ARM until it's fixed upstream. Tracked in RHBZ 789410 + +* Mon Feb 20 2012 V鱈t Ondruch - 1.9.3.125-1 +- Upgrade to Ruby 1.9.3-p125. + +* Sun Jan 29 2012 Mamoru Tasaka - 1.9.3.0-7 +- Make mkmf.rb verbose by default + +* Thu Jan 26 2012 V鱈t Ondruch - 1.9.3.0-6 +- Relax dependencies to allow external updates of bundled gems. + +* Wed Jan 18 2012 V鱈t Ondruch - 1.9.3.0-5 +- Initial release of Ruby 1.9.3. +- Add rubygems dependency on io-console for user interactions. +- Gems license clarification. + +* Tue Jan 17 2012 V鱈t Ondruch - 1.9.3.0-4 +- Bundled gems moved into dedicated directories and subpackages. +- Create and own RubyGems directories for binary extensions. +- Fix build with GCC 4.7. + +* Mon Jan 16 2012 V鱈t Ondruch - 1.9.3.0-3 +- Fix RHEL build. +- Fixed directory ownership. +- Verose build output. + +* Sun Jan 15 2012 V鱈t Ondruch - 1.9.3.0-2 +- Install RubyGems outside of Ruby directory structure. +- RubyGems has not its own -devel subpackage. +- Enhanced macros.ruby and macros.rubygems. +- All tests are green now (bkabrda). + +* Sat Jan 14 2012 V鱈t Ondruch - 1.9.3.0-1 +- Initial package + +* Sat Jan 14 2012 Fedora Release Engineering - 1.8.7.357-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Dec 29 2011 Mamoru Tasaka - 1.8.7.357-1 +- Update to 1.8.7p357 +- Randomize hash on process startup (CVE-2011-4815, bug 750564) + +* Fri Dec 23 2011 Dennis Gilmore - 1.8.7.352-2 +- dont normalise arm cpus to arm +- there is something weird about how ruby choses where to put bits + +* Thu Nov 17 2011 Mamoru Tasaka - 1.8.7.352-3 +- F-17: kill gdbm support for now due to licensing compatibility issue + +* Sat Oct 1 2011 Mamoru Tasaka - 1.8.7.352-2 +- F-17: rebuild against new gdbm + +* Sat Jul 16 2011 Mamoru Tasaka - 1.8.7.352-1 +- Update to 1.8.7 p352 +- CVE-2011-2686 is fixed in this version (bug 722415) +- Update ext/tk to the latest git +- Remove duplicate path entry (bug 718695) + +* Thu Jul 14 2011 Mamoru Tasaka - 1.8.7.334-4 +- Once fix FTBFS (bug 716021) + +* Mon Jul 11 2011 Dennis Gilmore - 1.8.7.334-3 +- normalise arm cpus to arm + +* Mon May 30 2011 Mamoru Tasaka - 1.8.7.334-2 +- Own %%{_normalized_cpu}-%%{_target_os} directory (bug 708816) + +* Sat Feb 19 2011 Mamoru Tasaka - 1.8.7.334-1 +- Update to 1.8.7 p334 + +* Wed Feb 09 2011 Fedora Release Engineering - 1.8.7.330-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Sun Jan 02 2011 Dennis Gilmore - 1.8.7.330-2 +- nomalise the 32 bit sparc archs to sparc + +* Sun Dec 26 2010 Mamoru Tasaka - 1.8.7.330-1 +- Update to 1.8.7 p330 +- ext/tk updated to the newest header + +* Thu Nov 4 2010 Mamoru Tasaka - 1.8.7.302-2 +- Avoid multilib conflict on -libs subpackage (bug 649174) + +* Mon Aug 23 2010 Mamoru Tasaka - 1.8.7.302-1 +- Update to 1.8.7.302 +- CVE-2010-0541 (bug 587731) is fixed in this version +- Update ext/tk to the latest head + +* Mon Aug 2 2010 Mamoru Tasaka - 1.8.7.299-5 +- More cleanup of spec file, expecially for rpmlint issue +- build ri files in %%build + +* Mon Jul 26 2010 Mamoru Tasaka - 1.8.7.299-4 +- Cleanup spec file +- Make -irb, -rdoc subpackage noarch +- Make dependencies between arch-dependent subpackages isa specific +- Improve sample documentation gathering + +* Mon Jul 12 2010 Mohammed Morsi - 1.8.7.299-3 +- updated packaged based on feedback (from mtasaka) +- added comments to all patches / sources +- obsoleted ruby-mode, as it's now provided by the emacs package itself +- readded missing documentation +- various small compatability/regression fixes + +* Tue Jul 06 2010 Mohammed Morsi - 1.8.7.299-2 +- readded bits to pull tk package from upstream source branch +- removed unecessary .tk.old dir +- renamed macros which may cause confusion, removed unused ones + +* Thu Jun 24 2010 Mohammed Morsi - 1.8.7.299-1 +- integrate more of jmeyering's and mtaska's feedback +- removed emacs bits that are now shipped with the emacs package +- various patch and spec cleanup +- rebased to ruby 1.8.7 patch 299, removed patches no longer needed: + ruby-1.8.7-openssl-1.0.patch, ruby-1.8.7-rb_gc_guard_ptr-optimization.patch + +* Wed Jun 23 2010 Mohammed Morsi - 1.8.7.249-5 +- Various fixes + +* Wed Jun 23 2010 Mohammed Morsi - 1.8.7.249-4 +- Fixed incorrect paths in 1.8.7 rpm + +* Tue Jun 22 2010 Mohammed Morsi - 1.8.7.249-3 +- Integrated Jim Meyering's feedback and changes in to: +- remove trailing blanks +- placate rpmlint +- ruby_* definitions: do not use trailing slashes in directory names +- _normalized_cpu: simplify definition + +* Mon Jun 21 2010 Mohammed Morsi - 1.8.7.249-2 +- Integrate mtasaka's feedback and changes +- patch101 ruby_1_8_7-rb_gc_guard_ptr-optimization.patch + +* Tue Jun 15 2010 Mohammed Morsi - 1.8.7.249-1 +- Initial Ruby 1.8.7 specfile + +* Wed May 19 2010 Mamoru Tasaka - 1.8.6.399-5 +- Retry for bug 559158, Simplify the OpenSSL::Digest class + pull more change commits from ruby_1_8 branch + +* Mon May 17 2010 Mamoru Tasaka - 1.8.6.399-4 +- Patch36 (ruby-1.8.x-RHASH_SIZE-rb_hash_lookup-def.patch) + also backport rb_hash_lookup definition (bug 592936) + +* Thu May 13 2010 Mamoru Tasaka - 1.8.6.399-3 +- ruby-1.8.x-null-class-must-be-Qnil.patch (bug 530407) +- Recreate some patches using upstream svn when available, and + add some comments for patches + +* Tue May 11 2010 Mamoru Tasaka - 1.8.6.399-2 +- tcltk: Give up using potentially unmaintained ruby_1_8_6 branch + and instead completely replace with ruby_1_8 branch head + (at this time, using rev 27738) + (seems to fix 560053, 590503) +- Fix Japanese encoding strings under ruby-tcltk/ext/tk/sample/ + +* Tue Apr 27 2010 Mamoru Tasaka - 1.8.6.399-1 +- Update to 1.8.6 p 399 (bug 579675) +- Patch to fix gc bug causing open4 crash (bug 580993) + +* Fri Mar 12 2010 Mamoru Tasaka - 1.8.6.388-9 +- F-14: rebuild against new gdbm + +* Thu Jan 28 2010 Mamoru Tasaka +- Once revert the previous change (patch34) + +* Wed Jan 27 2010 Jeroen van Meeuwen - 1.8.6.388-8 +- Backport openssl/digest functions providing digest and hexdigest functions + directly in OpenSSL::Digest.methods +- Make sure that Red Hat people version their changelog entries +- This is actually release #1, but now needs to be release #7 + +* Mon Jan 18 2010 Akira TAGOH - 1.8.6.388-1 +- Add conditional for RHEL. + +* Wed Jan 13 2010 Mamoru Tasaka - 1.8.6.383-6 +- CVE-2009-4492 ruby WEBrick log escape sequence (bug 554485) + +* Wed Dec 9 2009 Mamoru Tasaka - 1.8.6.383-5 +- Change mkmf.rb to use LIBRUBYARG_SHARED so that have_library() works + without libruby-static.a (bug 428384) +- And move libruby-static.a to -static subpackage + +* Thu Oct 29 2009 Mamoru Tasaka - 1.8.6.383-4 +- Use bison to regenerate parse.c to keep the original format of error + messages (bug 530275 comment 4) + +* Sun Oct 25 2009 Mamoru Tasaka - 1.8.6.383-3 +- Patch so that irb saves its history (bug 518584, ruby issue 1556) + +* Sat Oct 24 2009 Mamoru Tasaka - 1.8.6.383-2 +- Update to 1.8.6 patchlevel 383 (bug 520063) + +* Wed Oct 14 2009 Mamoru Tasaka - 1.8.6.369-5 +- Much better idea for Patch31 provided by Akira TAGOH + +* Wed Oct 14 2009 Mamoru Tasaka - 1.8.6.369-4 +- Fix the search path of ri command for ri manuals installed with gem + (bug 528787) + +* Wed Aug 26 2009 Tomas Mraz - 1.8.6.369-3 +- Rebuild against new openssl + +* Thu Jul 23 2009 Mamoru Tasaka - 1.8.6.369-2 +- Make sure that readline.so is linked against readline 5 because + Ruby is under GPLv2 + +* Sat Jun 20 2009 Jeroen van Meeuwen - 1.8.6.369-1 +- New patchlevel fixing CVE-2009-1904 +- Fix directory on ARM (#506233, Kedar Sovani) + +* Sun May 31 2009 Jeroen van Meeuwen - 1.8.6.368-1 +- New upstream release (p368) + +* Sat Apr 11 2009 Mamoru Tasaka - 1.8.6.287-8 +- Merge Review fix (#226381) + +* Wed Mar 18 2009 Jeroen van Meeuwen - 1.8.6.287-7 +- Fix regression in CVE-2008-3790 (#485383) + +* Mon Mar 16 2009 Mamoru Tasaka - 1.8.6.287-6 +- Again use -O2 optimization level +- i586 should search i386-linux directory (on <= F-11) + +* Thu Mar 05 2009 Jeroen van Meeuwen - 1.8.6.287-5 +- Rebuild for gcc4.4 + +* Fri Feb 27 2009 Jeroen van Meeuwen - 1.8.6.287-3 +- CVE-2008-5189: CGI header injection. + +* Wed Oct 8 2008 Akira TAGOH - 1.8.6.287-2 +- CVE-2008-3790: DoS vulnerability in the REXML module. + +* Sat Aug 23 2008 Akira TAGOH - 1.8.6.287-1 +- New upstream release. +- Security fixes. + - CVE-2008-3655: Ruby does not properly restrict access to critical + variables and methods at various safe levels. + - CVE-2008-3656: DoS vulnerability in WEBrick. + - CVE-2008-3657: Lack of taintness check in dl. + - CVE-2008-1447: DNS spoofing vulnerability in resolv.rb. + - CVE-2008-3443: Memory allocation failure in Ruby regex engine. +- Remove the unnecessary backported patches. + +* Thu Jul 10 2008 Tom "spot" Callaway - 1.8.6.230-5 +- rebuild against db4-4.7 + +* Tue Jul 1 2008 Akira TAGOH - 1.8.6.230-4 +- Backported from upstream SVN to fix a segfault issue with Array#fill. + +* Mon Jun 30 2008 Akira TAGOH - 1.8.6.230-3 +- Backported from upstream SVN to fix a segfault issue. (#452825) +- Backported from upstream SVN to fix an integer overflow in rb_ary_fill. + +* Wed Jun 25 2008 Akira TAGOH - 1.8.6.230-2 +- Fix a segfault issue. (#452810) + +* Tue Jun 24 2008 Akira TAGOH - 1.8.6.230-1 +- New upstream release. +- Security fixes. (#452295) + - CVE-2008-1891: WEBrick CGI source disclosure. + - CVE-2008-2662: Integer overflow in rb_str_buf_append(). + - CVE-2008-2663: Integer overflow in rb_ary_store(). + - CVE-2008-2664: Unsafe use of alloca in rb_str_format(). + - CVE-2008-2725: Integer overflow in rb_ary_splice(). + - CVE-2008-2726: Integer overflow in rb_ary_splice(). +- ruby-1.8.6.111-CVE-2007-5162.patch: removed. +- Build ruby-mode package for all archtectures. + +* Tue Mar 4 2008 Akira TAGOH - 1.8.6.114-1 +- Security fix for CVE-2008-1145. +- Improve a spec file. (#226381) + - Correct License tag. + - Fix a timestamp issue. + - Own a arch-specific directory. + +* Tue Feb 19 2008 Fedora Release Engineering - 1.8.6.111-9 +- Autorebuild for GCC 4.3 + +* Tue Feb 19 2008 Akira TAGOH - 1.8.6.111-8 +- Rebuild for gcc-4.3. + +* Tue Jan 15 2008 Akira TAGOH - 1.8.6.111-7 +- Revert the change of libruby-static.a. (#428384) + +* Fri Jan 11 2008 Akira TAGOH - 1.8.6.111-6 +- Fix an unnecessary replacement for shebang. (#426835) + +* Fri Jan 4 2008 Akira TAGOH - 1.8.6.111-5 +- Rebuild. + +* Fri Dec 28 2007 Akira TAGOH - 1.8.6.111-4 +- Clean up again. + +* Fri Dec 21 2007 Akira TAGOH - 1.8.6.111-3 +- Clean up the spec file. +- Remove ruby-man-1.4.6 stuff. this is entirely the out-dated document. + this could be replaced by ri. +- Disable the static library building. + +* Tue Dec 04 2007 Release Engineering - 1.8.6.111-2 + - Rebuild for openssl bump + +* Wed Oct 31 2007 Akira TAGOH +- Fix the dead link. + +* Mon Oct 29 2007 Akira TAGOH - 1.8.6.111-1 +- New upstream release. +- ruby-1.8.6.111-CVE-2007-5162.patch: Update a bit with backporting the changes + at trunk to enable the fix without any modifications on the users' scripts. + Note that Net::HTTP#enable_post_connection_check isn't available anymore. + If you want to disable this post-check, you should give OpenSSL::SSL::VERIFY_NONE + to Net::HTTP#verify_mode= instead of. + +* Mon Oct 15 2007 Akira TAGOH - 1.8.6.110-2 +- Enable pthread support for ppc too. (#201452) +- Fix unexpected dependencies appears in ruby-libs. (#253325) + +* Wed Oct 10 2007 Akira TAGOH - 1.8.6.110-1 +- New upstream release. + - ruby-r12567.patch: removed. +- ruby-1.8.6-CVE-2007-5162.patch: security fix for Net::HTTP that is + insufficient verification of SSL certificate. + +* Thu Aug 23 2007 Akira TAGOH - 1.8.6.36-4 +- Rebuild + +* Fri Aug 10 2007 Akira TAGOH +- Update License tag. + +* Mon Jun 25 2007 Akira TAGOH - 1.8.6.36-3 +- ruby-r12567.patch: backport patch from upstream svn to get rid of + the unnecessary declarations. (#245446) + +* Wed Jun 20 2007 Akira TAGOH - 1.8.6.36-2 +- New upstream release. + - Fix Etc::getgrgid to get the correct gid as requested. (#236647) + +* Wed Mar 28 2007 Akira TAGOH - 1.8.6-2 +- Fix search path breakage. (#234029) + +* Thu Mar 15 2007 Akira TAGOH - 1.8.6-1 +- New upstream release. +- clean up a spec file. + +* Tue Feb 13 2007 Akira TAGOH - 1.8.5.12-2 +- Rebuild + +* Mon Feb 5 2007 Akira TAGOH - 1.8.5.12-1 +- New upstream release. + +* Mon Dec 11 2006 Akira TAGOH - 1.8.5.2-1 +- security fix release. + +* Fri Oct 27 2006 Akira TAGOH - 1.8.5-4 +- security fix release. +- ruby-1.8.5-cgi-CVE-2006-5467.patch: fix a CGI multipart parsing bug that + causes the denial of service. (#212396) + +* Sun Oct 01 2006 Jesse Keating - 1.8.5-3 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Tue Sep 26 2006 Akira TAGOH - 1.8.5-2 +- fixed rbconfig.rb to refer to DESTDIR for sitearchdir. (#207311) + +* Mon Aug 28 2006 Akira TAGOH - 1.8.5-1 +- New upstream release. +- removed the unnecessary patches: + - ruby-1.8.4-no-eaccess.patch + - ruby-1.8.4-64bit-pack.patch + - ruby-1.8.4-fix-insecure-dir-operation.patch + - ruby-1.8.4-fix-insecure-regexp-modification.patch + - ruby-1.8.4-fix-alias-safe-level.patch +- build with --enable-pthread except on ppc. +- ruby-1.8.5-hash-memory-leak.patch: backported from CVS to fix a memory leak + on Hash. [ruby-talk:211233] + +* Mon Aug 7 2006 Akira TAGOH - 1.8.4-12 +- owns sitearchdir. (#201208) + +* Thu Jul 20 2006 Akira TAGOH - 1.8.4-11 +- security fixes [CVE-2006-3694] + - ruby-1.8.4-fix-insecure-dir-operation.patch: + - ruby-1.8.4-fix-insecure-regexp-modification.patch: fixed the insecure + operations in the certain safe-level restrictions. (#199538) + - ruby-1.8.4-fix-alias-safe-level.patch: fixed to not bypass the certain + safe-level restrictions. (#199543) + +* Wed Jul 12 2006 Jesse Keating - 1.8.4-10.fc6.1 +- rebuild + +* Mon Jun 19 2006 Akira TAGOH - 1.8.4-10 +- fixed the wrong file list again. moved tcltk library into ruby-tcltk. + (#195872) + +* Thu Jun 8 2006 Akira TAGOH - 1.8.4-8 +- ruby-deprecated-sitelib-search-path.patch: correct the order of search path. + +* Wed Jun 7 2006 Akira TAGOH - 1.8.4-7 +- exclude ppc64 to make ruby-mode package. right now emacs.ppc64 isn't provided + and buildsys became much stricter. +- ruby-deprecated-sitelib-search-path.patch: applied to add more search path + for backward compatiblity. +- added byacc to BuildReq. (#194161) + +* Wed May 17 2006 Akira TAGOH - 1.8.4-6 +- ruby-deprecated-search-path.patch: added the deprecated installation paths + to the search path for the backward compatibility. +- added a Provides: ruby(abi) to ruby-libs. +- ruby-1.8.4-64bit-pack.patch: backport patch from upstream to fix unpack("l") + not working on 64bit arch and integer overflow on template "w". (#189350) +- updated License tag to be more comfortable, and with a pointer to get more + details, like Python package does. (#179933) +- clean up. + +* Wed Apr 19 2006 Akira TAGOH +- ruby-rubyprefix.patch: moved all arch-independent modules under /usr/lib/ruby + and keep arch-dependent modules under /usr/lib64/ruby for 64bit archs. + so 'rubylibdir', 'sitelibdir' and 'sitedir' in Config::CONFIG points to + the kind of /usr/lib/ruby now. (#184199) + +* Mon Apr 17 2006 Akira TAGOH - 1.8.4-4 +- correct sitelibdir. (#184198) + +* Fri Feb 10 2006 Jesse Keating - 1.8.4-3.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1.8.4-3.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Mon Feb 6 2006 Akira TAGOH - 1.8.4-3 +- ruby-1.8.4-no-eaccess.patch: backported from ruby CVS to avoid conflict + between newer glibc. (#179835) + +* Wed Jan 4 2006 Akira TAGOH - 1.8.4-2 +- ruby-tcltk-multilib.patch: fixed a typo. + +* Tue Dec 27 2005 Akira TAGOH - 1.8.4-1 +- New upstream release. + - fixed a missing return statement. (#140833) + - fixed an use of uninitialized variable. (#144890) + +* Fri Dec 16 2005 Akira TAGOH - 1.8.4-0.4.preview2 +- updates to 1.8.4-preview2. +- renamed the packages to ruby-* (#175765) + - irb -> ruby-irb + - rdoc -> ruby-rdoc + - ri -> ruby-ri +- added tcl-devel and tk-devel into BuildRequires. + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Thu Nov 10 2005 Akira TAGOH - 1.8.4-0.3.preview1 +- rebuilt against the latest openssl. + +* Tue Nov 1 2005 Akira TAGOH - 1.8.4-0.2.preview1 +- build-deps libX11-devel instead of xorg-x11-devel. + +* Mon Oct 31 2005 Akira TAGOH - 1.8.4-0.1.preview1 +- New upstream release. +- ruby-1.8.2-strscan-memset.patch: removed because it's no longer needed. + +* Tue Oct 4 2005 Akira TAGOH - 1.8.3-4 +- moved the documents from ruby-libs to ruby-docs, which contains the arch + specific thing and to be multilib support. (#168826) + +* Mon Oct 3 2005 Akira TAGOH - 1.8.3-3 +- fixed the wrong file list. the external library for tcl/tk was included + in ruby-libs unexpectedly. + +* Mon Sep 26 2005 Akira TAGOH - 1.8.3-2 +- ruby-multilib.patch: added another chunk for multilib. (#169127) + +* Wed Sep 21 2005 Akira TAGOH - 1.8.3-1 +- New upstream release. +- Build-Requires xorg-x11-devel instead of XFree86-devel. +- ruby-multilib.patch: applied for only 64-bit archs. +- ruby-1.8.2-xmlrpc-CAN-2005-1992.patch: removed. it has already been in upstream. + +* Tue Jun 21 2005 Akira TAGOH - 1.8.2-9 +- ruby-1.8.2-xmlrpc-CAN-2005-1992.patch: fixed the arbitrary command execution + on XMLRPC server. (#161096) + +* Thu Jun 16 2005 Akira TAGOH - 1.8.2-8 +- ruby-1.8.2-tcltk-multilib.patch: applied to get tcltklib.so built. (#160194) + +* Thu Apr 7 2005 Akira TAGOH - 1.8.2-7 +- ruby-1.8.2-deadcode.patch: removed the dead code from the source. (#146108) +- make sure that all documentation files in ruby-docs are the world- + readable. (#147279) + +* Tue Mar 22 2005 Akira TAGOH - 1.8.2-6 +- ruby-1.8.2-strscan-memset.patch: fixed an wrong usage of memset(3). + +* Tue Mar 15 2005 Akira TAGOH - 1.8.2-5 +- rebuilt + +* Tue Jan 25 2005 Akira TAGOH - 1.8.2-4 +- fixed the wrong generation of file manifest. (#146055) +- spec file clean up. + +* Mon Jan 24 2005 Akira TAGOH - 1.8.2-3 +- separated out to rdoc package. +- make the dependency of irb for rdoc. (#144708) + +* Wed Jan 12 2005 Tim Waugh - 1.8.2-2 +- Rebuilt for new readline. + +* Wed Jan 5 2005 Akira TAGOH - 1.8.2-1 +- New upstream release. +- ruby-1.8.1-ia64-stack-limit.patch: removed - it's no longer needed. +- ruby-1.8.1-cgi_session_perms.patch: likewise. +- ruby-1.8.1-cgi-dos.patch: likewise. +- generated Ruby interactive documentation - senarated package. + it's now provided as ri package. (#141806) + +* Thu Nov 11 2004 Jeff Johnson 1.8.1-10 +- rebuild against db-4.3.21. + +* Wed Nov 10 2004 Akira TAGOH - 1.8.1-9 +- ruby-1.8.1-cgi-dos.patch: security fix [CAN-2004-0983] +- ruby-1.8.1-cgi_session_perms.patch: security fix [CAN-2004-0755] + +* Fri Oct 29 2004 Akira TAGOH - 1.8.1-8 +- added openssl-devel and db4-devel into BuildRequires (#137479) + +* Wed Oct 6 2004 Akira TAGOH - 1.8.1-7 +- require emacs-common instead of emacs. + +* Wed Jun 23 2004 Akira TAGOH 1.8.1-4 +- updated the documentation. + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Wed Feb 04 2004 Akira TAGOH 1.8.1-1 +- New upstream release. +- don't use any optimization for ia64 to avoid the build failure. +- ruby-1.8.1-ia64-stack-limit.patch: applied to fix SystemStackError when the optimization is disabled. + +* Sat Dec 13 2003 Jeff Johnson 1.8.0-3 +- rebuild against db-4.2.52. + +* Thu Sep 25 2003 Jeff Johnson 1.8.0-2 +- rebuild against db-4.2.42. + +* Tue Aug 5 2003 Akira TAGOH 1.8.0-1 +- New upstream release. + +* Thu Jul 24 2003 Akira TAGOH 1.6.8-9.1 +- rebuilt + +* Thu Jul 24 2003 Akira TAGOH 1.6.8-9 +- ruby-1.6.8-castnode.patch: handling the nodes with correct cast. + use this patch now instead of ruby-1.6.8-fix-x86_64.patch. + +* Fri Jul 04 2003 Akira TAGOH 1.6.8-8 +- rebuilt + +* Fri Jul 04 2003 Akira TAGOH 1.6.8-7 +- fix the gcc warnings. (#82192) +- ruby-1.6.8-fix-x86_64.patch: correct a patch. + NOTE: DON'T USE THIS PATCH FOR BIG ENDIAN ARCHITECTURE. +- ruby-1.6.7-long2int.patch: removed. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Fri Feb 7 2003 Jens Petersen - 1.6.8-5 +- rebuild against ucs4 tcltk + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Jan 22 2003 Akira TAGOH 1.6.8-3 +- ruby-1.6.8-multilib.patch: applied to fix the search path issue on x86_64 + +* Tue Jan 21 2003 Akira TAGOH 1.6.8-2 +- ruby-1.6.8-require.patch: applied to fix the search bug in require. +- don't apply long2int patch to s390 and s390x. it doesn't work. + +* Wed Jan 15 2003 Akira TAGOH 1.6.8-1 +- New upstream release. +- removed some patches. it's no longer needed. + - ruby-1.6.7-100.patch + - ruby-1.6.7-101.patch + - ruby-1.6.7-102.patch + - ruby-1.6.7-103.patch + - 801_extmk.rb-shellwords.patch + - 801_mkmf.rb-shellwords.patch + - 804_parse.y-new-bison.patch + - 805_uri-bugfix.patch + - ruby-1.6.6-900_XXX_strtod.patch + - ruby-1.6.7-sux0rs.patch + - ruby-1.6.7-libobj.patch + +* Wed Jan 15 2003 Jens Petersen 1.6.7-14 +- rebuild to update tcltk deps + +* Mon Dec 16 2002 Elliot Lee 1.6.7-13 +- Remove ExcludeArch: x86_64 +- Fix x86_64 ruby with long2int.patch (ruby was assuming that sizeof(long) + == sizeof(int). The patch does not fix the source of the problem, just + makes it a non-issue.) +- _smp_mflags + +* Tue Dec 10 2002 Tim Powers 1.6.7-12 +- rebuild to fix broken tcltk deps + +* Tue Oct 22 2002 Akira TAGOH 1.6.7-11 +- use %%configure macro instead of configure script. +- use the latest config.{sub,guess}. +- get archname from rbconfig.rb for %%dir +- applied some patches from Debian: + - 801_extmk.rb-shellwords.patch: use Shellwords + - 801_mkmf.rb-shellwords.patch: mkmf.rb creates bad Makefile. the Makefile + links libruby.a to the target. + - 803_sample-fix-shbang.patch: all sample codes should be + s|/usr/local/bin|/usr/bin|g + - 804_parse.y-new-bison.patch: fix syntax warning. + - 805_uri-bugfix.patch: uri.rb could not handle correctly broken mailto-uri. +- add ExcludeArch x86_64 temporarily to fix Bug#74581. Right now ruby can't be + built on x86_64. + +* Tue Aug 27 2002 Akira TAGOH 1.6.7-10 +- moved sitedir to /usr/lib/ruby/site_ruby again according as our perl and + python. +- ruby-1.6.7-resolv1.patch, ruby-1.6.7-resolv2.patch: applied to fix 'Too many + open files - "/etc/resolv.conf"' issue. (Bug#64830) + +* Thu Jul 18 2002 Akira TAGOH 1.6.7-9 +- add the owned directory. + +* Fri Jul 12 2002 Akira TAGOH 1.6.7-8 +- fix typo. + +* Thu Jul 04 2002 Akira TAGOH 1.6.7-7 +- removed the ruby-mode-xemacs because it's merged to the xemacs sumo. + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Wed Jun 19 2002 Akira TAGOH 1.6.7-5 +- fix the stripped binary. +- use the appropriate macros. + +* Sun May 26 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Akira TAGOH 1.6.7-3 +- ruby-1.6.7-libobj.patch: applied to fix autoconf2.53 error. + +* Mon Mar 18 2002 Akira TAGOH 1.6.7-2 +- ruby-man-1.4.6-jp.tar.bz2: removed. +- ruby-refm-rdp-1.4.7-ja-html.tar.bz2: uses it instead of. +- ruby-1.6.7-500-marshal-proc.patch, ruby-1.6.7-501-class-var.patch: + removed. +- ruby-1.6.7-100.patch: applied a bug fix patch. + (ruby-dev#16274: patch for 'wm state') + (PR#206ja: SEGV handle EXIT) +- ruby-1.6.7-101.patch: applied a bug fix patch. + (ruby-list#34313: singleton should not be Marshal.dump'ed) + (ruby-dev#16411: block local var) +- ruby-1.6.7-102.patch: applied a bug fix patch. + (handling multibyte chars is partially broken) +- ruby-1.6.7-103.patch: applied a bug fix patch. + (ruby-dev#16462: preserve reference for GC, but link should be cut) + +* Fri Mar 8 2002 Akira TAGOH 1.6.7-1 +- New upstream release. +- ruby-1.6.6-100.patch, ruby-1.6.6-501-ruby-mode.patch: + removed. these patches no longer should be needed. +- ruby-1.6.7-500-marshal-proc.patch: applied a fix patch. + (ruby-dev#16178: Marshal::dump should call Proc#call.) +- ruby-1.6.7-501-class-var.patch: applied a fix patch. + (ruby-talk#35157: class vars broken in 1.6.7) + +* Wed Feb 27 2002 Akira TAGOH 1.6.6-5 +- Disable alpha because nothing is xemacs for alpha now. + +* Tue Feb 5 2002 Akira TAGOH 1.6.6-3 +- Fixed the duplicate files. + +* Tue Feb 5 2002 Akira TAGOH 1.6.6-2 +- Fixed the missing %%defattr + +* Fri Feb 1 2002 Akira TAGOH 1.6.6-1 +- New upstream release. +- Applied bug fix patches: + - ruby-1.6.6-501-ruby-mode.patch: ruby-talk#30479: disables font-lock + coloring. + - ruby-1.6.6-100.patch: ruby-talk#30203: Ruby 1.6.6 bug and fix + ruby-list#33047: regex bug + PR#230: problem with -d in 1.6.6 +- Added ruby-mode and ruby-mode-xemacs packages. +- Ruby works fine for ia64. so re-enable to build with ia64. + (probably it should be worked for alpha) + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Thu Jul 19 2001 Bernhard Rosenkraenzer 1.6.4-2 +- Remove Japanese description and summaries; they belong in specspo and + break rpm +- Clean up specfile +- Mark language specific files (README.jp) as such +- bzip2 sources +- rename the libruby package to ruby-libs for consistency +- Exclude ia64 (doesn't build - the code doesn't seem to be 64-bit clean + [has been excluded on alpha forever]) + +* Tue Jul 17 2001 Akira TAGOH 1.6.4-1 +- rebuild for Red Hat 7.2 + +* Mon Jun 04 2001 akira yamada +- upgrade to nwe upstream version 1.6.4. + +* Mon Apr 02 2001 akira yamada +- applied patch: + - fixed method cache bug. etc. (Patch103, Patch104) + +* Tue Mar 27 2001 akira yamada +- applied patch: + - fixed marshal for bignum bug. + - fixed scope of constant variables bug. + +* Tue Mar 20 2001 akira yamada +- upgraded to new upstream version 1.6.3. + +* Fri Feb 09 2001 akira yamada +- fixed bad group for libruby. +- Applied patch: upgraded to cvs version (2001-02-08): + fixed minor bugs. + +* Thu Jan 18 2001 akira yamada +- Applied patch: upgraded to cvs version (2001-01-15): + fixed minor bugs(e.g. ruby makes extention librares too large...). + +* Wed Jan 10 2001 akira yamada +- Applied patch: upgraded to cvs version (2001-01-09): + fixed minor bugs. + +* Sat Dec 30 2000 akira yamada +- Applied bug fix patch. + +* Mon Dec 25 2000 akira yamada +- Updated to new upstream version 1.6.2. + +* Fri Dec 22 2000 akira yamada +- Removed ruby_cvs.2000122019.patch, added ruby_cvs.2000122215.patch + (upgraded ruby to latest cvs version, 1.6.2-preview4). + +* Wed Dec 20 2000 akira yamada +- Removed ruby_cvs.2000121413.patch, added ruby_cvs.2000122019.patch + (upgraded ruby to latest cvs version). +- new package: libruby + +* Thu Dec 14 2000 akira yamada +- Removed ruby_cvs.2000101901.patch, added ruby_cvs.2000121413.patch + (upgraded ruby to latest cvs version). +- Removed ruby-dev.11262.patch, ruby-dev.11265.patch, + and ruby-dev.11268.patch (included into above patch). + +* Sun Nov 12 2000 MACHINO, Satoshi 1.6.1-0vl9 +- build on gcc-2.95.3 + +* Thu Oct 19 2000 akira yamada +- Added ruby-dev.11268.patch. + +* Thu Oct 19 2000 akira yamada +- Removed ruby_cvs.2000101117.patch and added ruby_cvs.2000101901.patch + (upgraded ruby to latest cvs version). +- Added ruby-dev.11262.patch. +- Added ruby-dev.11265.patch. + +* Wed Oct 11 2000 akira yamada +- Removed ruby_cvs.2000100313.patch and added ruby_cvs.2000101117.patch + (upgraded ruby to latest cvs version). + +* Mon Oct 09 2000 akira yamada +- Removed ruby_cvs.2000100313.patch and added ruby_cvs.2000100313.patch + (upgraded ruby to latest cvs version). + +* Tue Oct 03 2000 akira yamada +- Removed ruby_cvs.2000100218.patch and added ruby_cvs.2000100313.patch + (upgraded ruby to latest cvs version). + +* Mon Oct 02 2000 akira yamada +- Removed ruby_cvs.2000092718.patch and added ruby_cvs.2000100218.patch + (upgraded ruby to latest cvs version). + +* Wed Sep 27 2000 akira yamada +- Updated to upstream version 1.6.1. +- Removed ruby_cvs.2000082901.patch and added ruby_cvs.2000092718.patch + (upgraded ruby to latest cvs version). + +* Tue Aug 29 2000 akira yamada +- Updated to version 1.4.6. +- removed ruby-dev.10123.patch(included into ruby-1.4.6). +- Added ruby_cvs.2000082901.patch(upgraded ruby to latest cvs version). + +* Tue Jun 27 2000 akira yamada +- Updated manuals to version 1.4.5. + +* Sun Jun 25 2000 akira yamada +- Added ruby-dev.10123.patch. + +* Sat Jun 24 2000 akira yamada +- Updated to version 1.4.5. +- Removed ruby_cvs.2000062401.patch(included into ruby-1.4.5). + +* Thu Jun 22 2000 akira yamada +- Updated to version 1.4.4(06/22/2000 CVS). +- Removed ruby-dev.10054.patch(included into ruby_cvs.patch). + +* Thu Jun 22 2000 akira yamada +- Renamed to ruby_cvs20000620.patch from ruby_cvs.patch. + +* Tue Jun 20 2000 akira yamada +- Updated to version 1.4.4(06/20/2000 CVS). +- Removed ruby-list.23190.patch(included into ruby_cvs.patch). +- Added ruby-dev.10054.patch. + +* Thu Jun 15 2000 akira yamada +- Updated to version 1.4.4(06/12/2000 CVS). +- Added manuals and FAQs. +- Split into ruby, ruby-devel, ruby-tcltk, ruby-docs, irb. + +* Tue Jun 13 2000 Mitsuo Hamada +- Updated to version 1.4.4 + +* Wed Dec 08 1999 Atsushi Yamagata +- Updated to version 1.4.3 + +* Mon Sep 20 1999 Atsushi Yamagata +- Updated to version 1.4.2 (Sep 18) + +* Fri Sep 17 1999 Atsushi Yamagata +- Updated to version 1.4.2 + +* Tue Aug 17 1999 Atsushi Yamagata +- Updated to version 1.4.0 + +* Fri Jul 23 1999 Atsushi Yamagata +- 2nd release +- Updated to version 1.2.6(15 Jul 1999) +- striped %%{prefix}/bin/ruby + +* Mon Jun 28 1999 Atsushi Yamagata +- Updated to version 1.2.6(21 Jun 1999) + +* Wed Apr 14 1999 Atsushi Yamagata +- Updated to version 1.2.5 + +* Fri Apr 09 1999 Atsushi Yamagata +- Updated to version 1.2.4 + +* Fri Dec 25 1998 Toru Hoshina +- Version up to 1.2 stable. + +* Fri Nov 27 1998 Toru Hoshina +- Version up to 1.1c9. + +* Thu Nov 19 1998 Toru Hoshina +- Version up to 1.1c8, however it appear short life :-P + +* Fri Nov 13 1998 Toru Hoshina +- Version up. + +* Tue Sep 22 1998 Toru Hoshina +- To make a libruby.so. + +* Mon Sep 21 1998 Toru Hoshina +- Modified SPEC in order to install libruby.a so that it should be used by + another ruby entention. +- 2nd release. + +* Mon Mar 9 1998 Shoichi OZAWA +- Added a powerPC arch part. Thanks, MURATA Nobuhiro diff --git a/rubygems.attr b/rubygems.attr new file mode 100644 index 0000000..f033d43 --- /dev/null +++ b/rubygems.attr @@ -0,0 +1,5 @@ +%__rubygems_requires %{_rpmconfigdir}/rubygems.req +%__rubygems_provides %{_rpmconfigdir}/rubygems.prov +# In non-gem packages, the %%{gem_name} macro is not available and the macro +# stays unexpanded which leads to "invalid regex" error (rhbz#1154067). +%__rubygems_path ^%{?gem_name:%{gem_spec}}%{!?gem_name:this_should_never_match_anything}$ diff --git a/rubygems.prov b/rubygems.prov new file mode 100644 index 0000000..b7c9777 --- /dev/null +++ b/rubygems.prov @@ -0,0 +1,36 @@ +#!/usr/bin/ruby + +require 'rubygems/package' + +module RubyGemsProv + module Helpers + # If there is some prelease version files, such as rc1 (i.e. non-numeric + # field), prepend this field by tilde instead of dot. + def self.normalize_prerelease(version) + if version.prerelease? + prerelease = version.version.sub /^#{version.release}\./, '' + "#{version.release}-0.1.#{prerelease}" + else + "#{version.release}-1" + end + end + end + + # Reports all functionality gem provides. + def self.provides + while filename = gets + filename.strip! + begin + specification = Gem::Specification.load filename + + puts "rubygem(#{specification.name}) = #{Helpers::normalize_prerelease(specification.version)}" + rescue => e + # Ignore all errors. + end + end + end +end + +if __FILE__ == $0 + RubyGemsProv::provides +end diff --git a/rubygems.req b/rubygems.req new file mode 100644 index 0000000..4f7a583 --- /dev/null +++ b/rubygems.req @@ -0,0 +1,81 @@ +#!/usr/bin/ruby + +require 'rubygems/package' + +module RubyGemsReq + module Helpers + # Expands '~>' and '!=' gem requirements. + def self.expand_requirement(requirements) + requirements.inject([]) do |output, r| + output.concat case r.first + when '~>' + expand_pessimistic_requirement(r) + when '!=' + expand_not_equal_requirement(r) + else + [r] + end + end + end + + # Expands the pessimistic version operator '~>' into equivalent '>=' and + # '<' pair. + def self.expand_pessimistic_requirement(requirement) + next_version = Gem::Version.create(requirement.last).bump + return ['>=', requirement.last], ['<', next_version] + end + + # Expands the not equal version operator '!=' into equivalent '<' and + # '>' pair. + def self.expand_not_equal_requirement(requirement) + return ['<', requirement.last], ['>', requirement.last] + end + + # Converts Gem::Requirement into array of requirements strings compatible + # with RPM .spec file. + def self.requirement_versions_to_rpm(requirement) + self.expand_requirement(requirement.requirements).map do |op, version| + version == Gem::Version.new(0) ? "" : "#{op} #{version}" + end + end + end + + # Report RubyGems dependency, versioned if required. + def self.rubygems_dependency(specification) + Helpers::requirement_versions_to_rpm(specification.required_rubygems_version).each do |requirement| + dependency_string = "ruby(rubygems)" + dependency_string += " #{specification.required_rubygems_version}" if requirement && requirement.length > 0 + puts dependency_string + end + end + + # Report all gem dependencies including their version. + def self.gem_depenencies(specification) + specification.runtime_dependencies.each do |dependency| + Helpers::requirement_versions_to_rpm(dependency.requirement).each do |requirement| + dependency_string = "rubygem(#{dependency.name})" + dependency_string += " #{requirement}" if requirement && requirement.length > 0 + puts dependency_string + end + end + end + + # Reports all requirements specified by all provided .gemspec files. + def self.requires + while filename = gets + filename.strip! + begin + specification = Gem::Specification.load filename + + rubygems_dependency(specification) + gem_depenencies(specification) + rescue => e + # Ignore all errors. + end + end + end +end + +if __FILE__ == $0 + RubyGemsReq::requires +end diff --git a/sources b/sources new file mode 100644 index 0000000..c1900a8 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +894467211c4ae1dbf8a41bb0d58bbc89 ruby-2.4.1.tar.xz diff --git a/test_abrt.rb b/test_abrt.rb new file mode 100644 index 0000000..6d110ba --- /dev/null +++ b/test_abrt.rb @@ -0,0 +1,7 @@ +if !!$LOADED_FEATURES.detect { |f| f =~ /abrt\.rb/ } + exit true +else + puts 'ERROR: ABRT hook was not loaded.' + + exit false +end diff --git a/test_systemtap.rb b/test_systemtap.rb new file mode 100644 index 0000000..5784e2d --- /dev/null +++ b/test_systemtap.rb @@ -0,0 +1,65 @@ +require 'set' + +LIBRUBY_SO = 'libruby.so' +PROBES_D = 'probes.d' + +# These probes are excluded by VM_COLLECT_USAGE_DETAILS ifdef. +EXCLUDE_PROBES = Set.new %w(insn insn__operand) + +## Detect SystemTap section headers presence + +stap_headers = [ + '\.stapsdt\.base', + '\.note\.stapsdt' +] + +header_regexp = %r{ (#{stap_headers.join('|')}) } + +section_headers = `readelf -S "#{LIBRUBY_SO}"` +detected_stap_headers = section_headers.scan(header_regexp).flatten + +# Assume there are both headers until this is proven wrong ;) +unless detected_stap_headers.size == 2 + puts 'ERROR: SystemTap (DTrace) headers were not detected in resulting library.' + exit false +end + +## Find if every declared probe is propagated to resulting library + +# Colect probes specified in probes.d file. +probes_declared = [] + +File.open(PROBES_D) do |file| + file.each_line do |line| + if probe = line[/probe (\S+)\(.*\);/, 1] + probes_declared << probe + end + end +end + +probes_declared = Set.new probes_declared + +unless EXCLUDE_PROBES.subset? probes_declared + puts 'ERROR: Change in SystemTap (DTrace) probes definition file detected.' + exit false +end + +probes_declared -= EXCLUDE_PROBES + +# Detect probes in resulting library. +get_probes_detected = %r{ +^\s*Provider:\s+ruby,\s+Name:\s+(\S+),\s+.*$ +} + +probes_detected = `eu-readelf -n "#{LIBRUBY_SO}"` + +probes_detected = Set.new probes_detected.scan(get_probes_detected).flatten + +# Both sets must be equal, otherwise something is wrong. +unless probes_declared == probes_detected + puts 'ERROR: SystemTap (DTrace) probes were not correctly propagated into resulting library.' + puts " Undetected probes: #{(probes_declared - probes_detected).sort.join(', ')}\n", + " Additional detected probes: #{(probes_detected - probes_declared).sort.join(', ')}" + + exit false +end From 7a02390aaf16428e490f788d819e8591d04bb0ba Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Thu, 31 Aug 2017 11:33:50 +0000 Subject: [PATCH 475/529] Temporary disable checksec on PPC64LE (rhbz#1479302). fed_hash: ad2b787feae36c3dcc785cbf00784447714094b0 --- ...-do-not-enqueue-redundant-interrupts.patch | 241 ++++++++++++++++++ ...her-suites-in-test_sslctx_set_params.patch | 26 ++ ruby.spec | 33 ++- 3 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch create mode 100644 ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch diff --git a/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch b/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch new file mode 100644 index 0000000..263b532 --- /dev/null +++ b/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch @@ -0,0 +1,241 @@ +From 27251312111b7e25e347773e5777ee6072f9289b Mon Sep 17 00:00:00 2001 +From: nagachika +Date: Sat, 8 Jul 2017 02:21:36 +0000 +Subject: [PATCH] merge revision(s) 58284,58812,59028: [Backport #13632] + + vm_core.h: ruby_error_stream_closed + + * vm_core.h (ruby_special_exceptions): renamed + ruby_error_closed_stream as ruby_error_stream_closed, like the + message. + speed up IO#close with many threads + + Today, it increases IO#close performance with many threads: + + Execution time (sec) + name trunk after + vm_thread_close 4.276 3.018 + + Speedup ratio: compare with the result of `trunk' (greater is better) + name after + vm_thread_close 1.417 + + This speedup comes because rb_notify_fd_close only scans threads + inside rb_thread_io_blocking_region, not all threads in the VM. + + In the future, this type data structure may allow us to notify + waiters of multiple FDs on a single thread (when using + Fibers). + + * thread.c (struct waiting_fd): declare + (rb_thread_io_blocking_region): use on-stack list waiter + (rb_notify_fd_close): walk vm->waiting_fds instead + (call_without_gvl): remove old field setting + (th_init): ditto + * vm_core.h (typedef struct rb_vm_struct): add waiting_fds list + * (typedef struct rb_thread_struct): remove waiting_fd field + (rb_vm_living_threads_init): initialize waiting_fds list + + I am now kicking myself for not thinking about this 3 years ago + when I introduced ccan/list in [Feature #9632] to optimize this + same function :< + IO#close: do not enqueue redundant interrupts (take #2) + + Enqueuing multiple errors for one event causes spurious errors + down the line, as reported by Nikolay Vashchenko in + https://bugs.ruby-lang.org/issues/13632 + + This should fix bad interactions with test_race_gets_and_close + in test/ruby/test_io.rb since we ensure rb_notify_fd_close + continues returning the busy flag after enqueuing the interrupt. + + Backporting changes to 2.4 and earlier releases will be more + challenging... + + * thread.c (rb_notify_fd_close): do not enqueue multiple interrupts + [ruby-core:81581] [Bug #13632] + * test/ruby/test_io.rb (test_single_exception_on_close): + new test based on script from Nikolay + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/ruby/test_io.rb | 22 ++++++++++++++++++++++ + thread.c | 36 +++++++++++++++++++++++++----------- + vm.c | 1 - + vm_core.h | 6 +++--- + 4 files changed, 50 insertions(+), 15 deletions(-) + +diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb +index 61dfba318042..034dac570ce4 100644 +--- a/test/ruby/test_io.rb ++++ b/test/ruby/test_io.rb +@@ -2809,6 +2809,28 @@ def test_cross_thread_close_stdio + end; + end + ++ def test_single_exception_on_close ++ a = [] ++ t = [] ++ 10.times do ++ r, w = IO.pipe ++ a << [r, w] ++ t << Thread.new do ++ while r.gets ++ end rescue IOError ++ Thread.current.pending_interrupt? ++ end ++ end ++ a.each do |r, w| ++ w.write -"\n" ++ w.close ++ r.close ++ end ++ t.each do |th| ++ assert_equal false, th.value, '[ruby-core:81581] [Bug #13632]' ++ end ++ end ++ + def test_open_mode + feature4742 = "[ruby-core:36338]" + bug6055 = '[ruby-dev:45268]' +diff --git a/thread.c b/thread.c +index 7391cf96d284..2691fd835de4 100644 +--- a/thread.c ++++ b/thread.c +@@ -95,7 +95,11 @@ static int rb_threadptr_pending_interrupt_empty_p(rb_thread_t *th); + #define eTerminateSignal INT2FIX(1) + static volatile int system_working = 1; + +-#define closed_stream_error GET_VM()->special_exceptions[ruby_error_closed_stream] ++struct waiting_fd { ++ struct list_node wfd_node; /* <=> vm.waiting_fds */ ++ rb_thread_t *th; ++ int fd; ++}; + + inline static void + st_delete_wrap(st_table *table, st_data_t key) +@@ -1310,7 +1314,6 @@ call_without_gvl(void *(*func)(void *), void *data1, + rb_thread_t *th = GET_THREAD(); + int saved_errno = 0; + +- th->waiting_fd = -1; + if (ubf == RUBY_UBF_IO || ubf == RUBY_UBF_PROCESS) { + ubf = ubf_select; + data2 = th; +@@ -1433,11 +1436,15 @@ VALUE + rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd) + { + volatile VALUE val = Qundef; /* shouldn't be used */ ++ rb_vm_t *vm = GET_VM(); + rb_thread_t *th = GET_THREAD(); + volatile int saved_errno = 0; + int state; ++ struct waiting_fd wfd; + +- th->waiting_fd = fd; ++ wfd.fd = fd; ++ wfd.th = th; ++ list_add(&vm->waiting_fds, &wfd.wfd_node); + + TH_PUSH_TAG(th); + if ((state = EXEC_TAG()) == 0) { +@@ -1448,8 +1455,8 @@ rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd) + } + TH_POP_TAG(); + +- /* clear waiting_fd anytime */ +- th->waiting_fd = -1; ++ /* must be deleted before jump */ ++ list_del(&wfd.wfd_node); + + if (state) { + TH_JUMP_TAG(th, state); +@@ -2195,16 +2202,23 @@ int + rb_notify_fd_close(int fd) + { + rb_vm_t *vm = GET_THREAD()->vm; +- rb_thread_t *th = 0; ++ struct waiting_fd *wfd = 0; + int busy; + + busy = 0; +- list_for_each(&vm->living_threads, th, vmlt_node) { +- if (th->waiting_fd == fd) { +- VALUE err = th->vm->special_exceptions[ruby_error_closed_stream]; ++ list_for_each(&vm->waiting_fds, wfd, wfd_node) { ++ if (wfd->fd == fd) { ++ rb_thread_t *th = wfd->th; ++ VALUE err; ++ ++ busy = 1; ++ if (!th) { ++ continue; ++ } ++ wfd->th = 0; ++ err = th->vm->special_exceptions[ruby_error_stream_closed]; + rb_threadptr_pending_interrupt_enque(th, err); + rb_threadptr_interrupt(th); +- busy = 1; + } + } + return busy; +@@ -4839,7 +4853,7 @@ Init_Thread(void) + rb_define_method(rb_cThread, "name=", rb_thread_setname, 1); + rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0); + +- rb_vm_register_special_exception(ruby_error_closed_stream, rb_eIOError, "stream closed"); ++ rb_vm_register_special_exception(ruby_error_stream_closed, rb_eIOError, "stream closed"); + + cThGroup = rb_define_class("ThreadGroup", rb_cObject); + rb_define_alloc_func(cThGroup, thgroup_s_alloc); +diff --git a/vm.c b/vm.c +index 0544bcc4e573..c8ed39ad1e47 100644 +--- a/vm.c ++++ b/vm.c +@@ -2477,7 +2477,6 @@ th_init(rb_thread_t *th, VALUE self) + th->status = THREAD_RUNNABLE; + th->errinfo = Qnil; + th->last_status = Qnil; +- th->waiting_fd = -1; + th->root_svar = Qfalse; + th->local_storage_recursive_hash = Qnil; + th->local_storage_recursive_hash_for_trace = Qnil; +diff --git a/vm_core.h b/vm_core.h +index d0385d219f82..8e2b93d8e9b2 100644 +--- a/vm_core.h ++++ b/vm_core.h +@@ -427,7 +427,7 @@ enum ruby_special_exceptions { + ruby_error_reenter, + ruby_error_nomemory, + ruby_error_sysstack, +- ruby_error_closed_stream, ++ ruby_error_stream_closed, + ruby_special_error_count + }; + +@@ -490,6 +490,7 @@ typedef struct rb_vm_struct { + struct rb_thread_struct *main_thread; + struct rb_thread_struct *running_thread; + ++ struct list_head waiting_fds; /* <=> struct waiting_fd */ + struct list_head living_threads; + size_t living_thread_num; + VALUE thgroup_default; +@@ -712,8 +713,6 @@ typedef struct rb_thread_struct { + /* passing state */ + int state; + +- int waiting_fd; +- + /* for rb_iterate */ + VALUE passed_block_handler; + +@@ -1445,6 +1444,7 @@ void rb_thread_wakeup_timer_thread(void); + static inline void + rb_vm_living_threads_init(rb_vm_t *vm) + { ++ list_head_init(&vm->waiting_fds); + list_head_init(&vm->living_threads); + vm->living_thread_num = 0; + } diff --git a/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch b/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch new file mode 100644 index 0000000..9c3e375 --- /dev/null +++ b/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch @@ -0,0 +1,26 @@ +From 261353a42d0dc0e7bf73e5a8fb8ecffd04249d42 Mon Sep 17 00:00:00 2001 +From: Kazuki Yamaguchi +Date: Tue, 27 Jun 2017 14:31:09 +0900 +Subject: [PATCH] test/test_ssl: allow 3DES cipher suites in + test_sslctx_set_params + +Fedora's OpenSSL seems to enable 3DES cipher suites by DEFAULT. + +Fixes: https://github.com/ruby/openssl/issues/127 +--- + test/test_ssl.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb +index 19066566..b3efe95a 100644 +--- a/test/openssl/test_ssl.rb ++++ b/test/openssl/test_ssl.rb +@@ -350,7 +350,7 @@ def test_sslctx_set_params + assert_equal OpenSSL::SSL::VERIFY_PEER, ctx.verify_mode + ciphers_names = ctx.ciphers.collect{|v, _, _, _| v } + assert ciphers_names.all?{|v| /A(EC)?DH/ !~ v }, "anon ciphers are disabled" +- assert ciphers_names.all?{|v| /(RC4|MD5|EXP|DES)/ !~ v }, "weak ciphers are disabled" ++ assert ciphers_names.all?{|v| /(RC4|MD5|EXP|DES(?!-EDE|-CBC3))/ !~ v }, "weak ciphers are disabled" + assert_equal 0, ctx.options & OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS + if defined?(OpenSSL::SSL::OP_NO_COMPRESSION) # >= 1.0.0 + assert_equal OpenSSL::SSL::OP_NO_COMPRESSION, diff --git a/ruby.spec b/ruby.spec index 82d5781..4a11b3e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 79 +%global release 83 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -128,6 +128,13 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +# Fix OpenSSL::TestSSL#test_sslctx_set_params failures due to recent changes in +# OpenSSL. +# https://github.com/ruby/openssl/issues/127 +Patch10: ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch +# Fix "IOError: stream closed" errors affecting Puma. +# https://bugs.ruby-lang.org/issues/13632 +Patch11: ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -507,6 +514,8 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 +%patch10 -p1 +%patch11 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -685,9 +694,17 @@ sed -i 's/^/%doc /' .ruby-doc.* sed -i 's/^/%lang(ja) /' .ruby-doc.ja %check +# Temporary change the hardening check on PPC64LE as long as the checksec is +# is providing incorrect output. +# https://bugzilla.redhat.com/show_bug.cgi?id=1479302 +%ifnarch ppc64le # Check Ruby hardening. checksec -f libruby.so.%{ruby_version} | \ grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*Yes.*\d*.*\d*.*libruby.so.%{ruby_version}" +%else +checksec -f libruby.so.%{ruby_version} | \ + grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*No.*\d*.*\d*.*libruby.so.%{ruby_version}" +%endif # Check RubyGems version correctness. [ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ] @@ -1021,6 +1038,20 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Fri Aug 11 2017 V鱈t Ondruch - 2.4.1-83 +- Fix "IOError: stream closed" errors affecting Puma. +- Temporary disable checksec on PPC64LE (rhbz#1479302). + +* Thu Aug 03 2017 Fedora Release Engineering - 2.4.1-82 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 2.4.1-81 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Jul 20 2017 V鱈t Ondruch - 2.4.1-80 +- OpenSSL 1.1.0f-3 disables some weak ciphers. Adjust the package to pass + the tests suite. + * Mon Apr 03 2017 V鱈t Ondruch - 2.4.1-79 - Update to Ruby 2.4.1. From c9dec05f47a2d8efb89feb3f52916331289113b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 8 Sep 2017 14:10:33 +0200 Subject: [PATCH 476/529] Drop ruby-devel dependency on rubypick, which is pulled in transtitively. --- ruby.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 4a11b3e..40efd21 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 83 +%global release 84 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -174,7 +174,8 @@ straight-forward, and extensible. Summary: A Ruby development environment Group: Development/Languages Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: rubypick +# This would not be needed if ~50 packages depending on -devel used +# --disable-gems Requires: rubygems %description devel @@ -1038,6 +1039,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Fri Sep 08 2017 V鱈t Ondruch - 2.4.1-84 +- Drop ruby-devel dependency on rubypick, which is pulled in transtitively. + * Fri Aug 11 2017 V鱈t Ondruch - 2.4.1-83 - Fix "IOError: stream closed" errors affecting Puma. - Temporary disable checksec on PPC64LE (rhbz#1479302). From 535c42e96c117372ef97560a2285b6d2a49412cb Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Mon, 18 Sep 2017 16:45:33 +0200 Subject: [PATCH 477/529] Update to Ruby 2.4.2. Patch10 and Patch11 subsumed. --- ...-do-not-enqueue-redundant-interrupts.patch | 241 ------------------ ...her-suites-in-test_sslctx_set_params.patch | 26 -- ruby.spec | 20 +- sources | 2 +- 4 files changed, 8 insertions(+), 281 deletions(-) delete mode 100644 ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch delete mode 100644 ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch diff --git a/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch b/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch deleted file mode 100644 index 263b532..0000000 --- a/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch +++ /dev/null @@ -1,241 +0,0 @@ -From 27251312111b7e25e347773e5777ee6072f9289b Mon Sep 17 00:00:00 2001 -From: nagachika -Date: Sat, 8 Jul 2017 02:21:36 +0000 -Subject: [PATCH] merge revision(s) 58284,58812,59028: [Backport #13632] - - vm_core.h: ruby_error_stream_closed - - * vm_core.h (ruby_special_exceptions): renamed - ruby_error_closed_stream as ruby_error_stream_closed, like the - message. - speed up IO#close with many threads - - Today, it increases IO#close performance with many threads: - - Execution time (sec) - name trunk after - vm_thread_close 4.276 3.018 - - Speedup ratio: compare with the result of `trunk' (greater is better) - name after - vm_thread_close 1.417 - - This speedup comes because rb_notify_fd_close only scans threads - inside rb_thread_io_blocking_region, not all threads in the VM. - - In the future, this type data structure may allow us to notify - waiters of multiple FDs on a single thread (when using - Fibers). - - * thread.c (struct waiting_fd): declare - (rb_thread_io_blocking_region): use on-stack list waiter - (rb_notify_fd_close): walk vm->waiting_fds instead - (call_without_gvl): remove old field setting - (th_init): ditto - * vm_core.h (typedef struct rb_vm_struct): add waiting_fds list - * (typedef struct rb_thread_struct): remove waiting_fd field - (rb_vm_living_threads_init): initialize waiting_fds list - - I am now kicking myself for not thinking about this 3 years ago - when I introduced ccan/list in [Feature #9632] to optimize this - same function :< - IO#close: do not enqueue redundant interrupts (take #2) - - Enqueuing multiple errors for one event causes spurious errors - down the line, as reported by Nikolay Vashchenko in - https://bugs.ruby-lang.org/issues/13632 - - This should fix bad interactions with test_race_gets_and_close - in test/ruby/test_io.rb since we ensure rb_notify_fd_close - continues returning the busy flag after enqueuing the interrupt. - - Backporting changes to 2.4 and earlier releases will be more - challenging... - - * thread.c (rb_notify_fd_close): do not enqueue multiple interrupts - [ruby-core:81581] [Bug #13632] - * test/ruby/test_io.rb (test_single_exception_on_close): - new test based on script from Nikolay - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/ruby/test_io.rb | 22 ++++++++++++++++++++++ - thread.c | 36 +++++++++++++++++++++++++----------- - vm.c | 1 - - vm_core.h | 6 +++--- - 4 files changed, 50 insertions(+), 15 deletions(-) - -diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb -index 61dfba318042..034dac570ce4 100644 ---- a/test/ruby/test_io.rb -+++ b/test/ruby/test_io.rb -@@ -2809,6 +2809,28 @@ def test_cross_thread_close_stdio - end; - end - -+ def test_single_exception_on_close -+ a = [] -+ t = [] -+ 10.times do -+ r, w = IO.pipe -+ a << [r, w] -+ t << Thread.new do -+ while r.gets -+ end rescue IOError -+ Thread.current.pending_interrupt? -+ end -+ end -+ a.each do |r, w| -+ w.write -"\n" -+ w.close -+ r.close -+ end -+ t.each do |th| -+ assert_equal false, th.value, '[ruby-core:81581] [Bug #13632]' -+ end -+ end -+ - def test_open_mode - feature4742 = "[ruby-core:36338]" - bug6055 = '[ruby-dev:45268]' -diff --git a/thread.c b/thread.c -index 7391cf96d284..2691fd835de4 100644 ---- a/thread.c -+++ b/thread.c -@@ -95,7 +95,11 @@ static int rb_threadptr_pending_interrupt_empty_p(rb_thread_t *th); - #define eTerminateSignal INT2FIX(1) - static volatile int system_working = 1; - --#define closed_stream_error GET_VM()->special_exceptions[ruby_error_closed_stream] -+struct waiting_fd { -+ struct list_node wfd_node; /* <=> vm.waiting_fds */ -+ rb_thread_t *th; -+ int fd; -+}; - - inline static void - st_delete_wrap(st_table *table, st_data_t key) -@@ -1310,7 +1314,6 @@ call_without_gvl(void *(*func)(void *), void *data1, - rb_thread_t *th = GET_THREAD(); - int saved_errno = 0; - -- th->waiting_fd = -1; - if (ubf == RUBY_UBF_IO || ubf == RUBY_UBF_PROCESS) { - ubf = ubf_select; - data2 = th; -@@ -1433,11 +1436,15 @@ VALUE - rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd) - { - volatile VALUE val = Qundef; /* shouldn't be used */ -+ rb_vm_t *vm = GET_VM(); - rb_thread_t *th = GET_THREAD(); - volatile int saved_errno = 0; - int state; -+ struct waiting_fd wfd; - -- th->waiting_fd = fd; -+ wfd.fd = fd; -+ wfd.th = th; -+ list_add(&vm->waiting_fds, &wfd.wfd_node); - - TH_PUSH_TAG(th); - if ((state = EXEC_TAG()) == 0) { -@@ -1448,8 +1455,8 @@ rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd) - } - TH_POP_TAG(); - -- /* clear waiting_fd anytime */ -- th->waiting_fd = -1; -+ /* must be deleted before jump */ -+ list_del(&wfd.wfd_node); - - if (state) { - TH_JUMP_TAG(th, state); -@@ -2195,16 +2202,23 @@ int - rb_notify_fd_close(int fd) - { - rb_vm_t *vm = GET_THREAD()->vm; -- rb_thread_t *th = 0; -+ struct waiting_fd *wfd = 0; - int busy; - - busy = 0; -- list_for_each(&vm->living_threads, th, vmlt_node) { -- if (th->waiting_fd == fd) { -- VALUE err = th->vm->special_exceptions[ruby_error_closed_stream]; -+ list_for_each(&vm->waiting_fds, wfd, wfd_node) { -+ if (wfd->fd == fd) { -+ rb_thread_t *th = wfd->th; -+ VALUE err; -+ -+ busy = 1; -+ if (!th) { -+ continue; -+ } -+ wfd->th = 0; -+ err = th->vm->special_exceptions[ruby_error_stream_closed]; - rb_threadptr_pending_interrupt_enque(th, err); - rb_threadptr_interrupt(th); -- busy = 1; - } - } - return busy; -@@ -4839,7 +4853,7 @@ Init_Thread(void) - rb_define_method(rb_cThread, "name=", rb_thread_setname, 1); - rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0); - -- rb_vm_register_special_exception(ruby_error_closed_stream, rb_eIOError, "stream closed"); -+ rb_vm_register_special_exception(ruby_error_stream_closed, rb_eIOError, "stream closed"); - - cThGroup = rb_define_class("ThreadGroup", rb_cObject); - rb_define_alloc_func(cThGroup, thgroup_s_alloc); -diff --git a/vm.c b/vm.c -index 0544bcc4e573..c8ed39ad1e47 100644 ---- a/vm.c -+++ b/vm.c -@@ -2477,7 +2477,6 @@ th_init(rb_thread_t *th, VALUE self) - th->status = THREAD_RUNNABLE; - th->errinfo = Qnil; - th->last_status = Qnil; -- th->waiting_fd = -1; - th->root_svar = Qfalse; - th->local_storage_recursive_hash = Qnil; - th->local_storage_recursive_hash_for_trace = Qnil; -diff --git a/vm_core.h b/vm_core.h -index d0385d219f82..8e2b93d8e9b2 100644 ---- a/vm_core.h -+++ b/vm_core.h -@@ -427,7 +427,7 @@ enum ruby_special_exceptions { - ruby_error_reenter, - ruby_error_nomemory, - ruby_error_sysstack, -- ruby_error_closed_stream, -+ ruby_error_stream_closed, - ruby_special_error_count - }; - -@@ -490,6 +490,7 @@ typedef struct rb_vm_struct { - struct rb_thread_struct *main_thread; - struct rb_thread_struct *running_thread; - -+ struct list_head waiting_fds; /* <=> struct waiting_fd */ - struct list_head living_threads; - size_t living_thread_num; - VALUE thgroup_default; -@@ -712,8 +713,6 @@ typedef struct rb_thread_struct { - /* passing state */ - int state; - -- int waiting_fd; -- - /* for rb_iterate */ - VALUE passed_block_handler; - -@@ -1445,6 +1444,7 @@ void rb_thread_wakeup_timer_thread(void); - static inline void - rb_vm_living_threads_init(rb_vm_t *vm) - { -+ list_head_init(&vm->waiting_fds); - list_head_init(&vm->living_threads); - vm->living_thread_num = 0; - } diff --git a/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch b/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch deleted file mode 100644 index 9c3e375..0000000 --- a/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 261353a42d0dc0e7bf73e5a8fb8ecffd04249d42 Mon Sep 17 00:00:00 2001 -From: Kazuki Yamaguchi -Date: Tue, 27 Jun 2017 14:31:09 +0900 -Subject: [PATCH] test/test_ssl: allow 3DES cipher suites in - test_sslctx_set_params - -Fedora's OpenSSL seems to enable 3DES cipher suites by DEFAULT. - -Fixes: https://github.com/ruby/openssl/issues/127 ---- - test/test_ssl.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb -index 19066566..b3efe95a 100644 ---- a/test/openssl/test_ssl.rb -+++ b/test/openssl/test_ssl.rb -@@ -350,7 +350,7 @@ def test_sslctx_set_params - assert_equal OpenSSL::SSL::VERIFY_PEER, ctx.verify_mode - ciphers_names = ctx.ciphers.collect{|v, _, _, _| v } - assert ciphers_names.all?{|v| /A(EC)?DH/ !~ v }, "anon ciphers are disabled" -- assert ciphers_names.all?{|v| /(RC4|MD5|EXP|DES)/ !~ v }, "weak ciphers are disabled" -+ assert ciphers_names.all?{|v| /(RC4|MD5|EXP|DES(?!-EDE|-CBC3))/ !~ v }, "weak ciphers are disabled" - assert_equal 0, ctx.options & OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS - if defined?(OpenSSL::SSL::OP_NO_COMPRESSION) # >= 1.0.0 - assert_equal OpenSSL::SSL::OP_NO_COMPRESSION, diff --git a/ruby.spec b/ruby.spec index 40efd21..5102f76 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 4 -%global teeny_version 1 +%global teeny_version 2 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -29,7 +29,7 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.6.11 +%global rubygems_version 2.6.13 %global molinillo_version 0.5.7 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. @@ -39,10 +39,10 @@ %global bigdecimal_version 1.3.0 %global did_you_mean_version 1.1.0 %global io_console_version 0.4.6 -%global json_version 2.0.2 +%global json_version 2.0.4 %global minitest_version 5.10.1 %global net_telnet_version 0.1.1 -%global openssl_version 2.0.3 +%global openssl_version 2.0.5 %global power_assert_version 0.4.1 %global psych_version 2.2.2 %global rake_version 12.0.0 @@ -128,13 +128,6 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch -# Fix OpenSSL::TestSSL#test_sslctx_set_params failures due to recent changes in -# OpenSSL. -# https://github.com/ruby/openssl/issues/127 -Patch10: ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch -# Fix "IOError: stream closed" errors affecting Puma. -# https://bugs.ruby-lang.org/issues/13632 -Patch11: ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -515,8 +508,6 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 -%patch10 -p1 -%patch11 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1039,6 +1030,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Mon Sep 18 2017 Pavel Valena - 2.4.2-84 +- Update to Ruby 2.4.2. + * Fri Sep 08 2017 V鱈t Ondruch - 2.4.1-84 - Drop ruby-devel dependency on rubypick, which is pulled in transtitively. diff --git a/sources b/sources index 49ed326..0ae2520 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruby-2.4.1.tar.xz) = e6fd290b6edd166348b70f0f1c56f7ed9d956c4c1eb91d97d0548041ca4196b9b75ec1ad35c745bdbfd4de195899093e7205d7f02b014ecf1c48e6f31cf25903 +SHA512 (ruby-2.4.2.tar.xz) = c1d42272fb0d94b693452e703b0ea4942bf59cbd4b08ba83bf039f54be97ebc88511632413da0164970b4cf97bc302bccb88aab48edfa8fa147498e7ee741595 From 6beb732b5c5bb59f2f72a5aaefe2143107d99a1c Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Tue, 19 Sep 2017 18:26:41 +0200 Subject: [PATCH 478/529] Apply patches cleanly. --- ...o-specify-additional-preludes-by-configuratio.patch | 2 +- ruby-2.1.0-Enable-configuration-of-archlibdir.patch | 2 +- ...-duplicated-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 ++-- ruby-2.3.0-ruby_version.patch | 10 +++++----- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index af8b9a9..3e29d1b 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -4536,6 +4536,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4563,6 +4563,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index a4e6c28..bc75f5e 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3790,6 +3790,11 @@ if test ${multiarch+set}; then +@@ -3823,6 +3823,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index e841569..489a1b8 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index db37cd6..ce8d149 100644 --- a/configure.in +++ b/configure.in -@@ -4390,7 +4390,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -4417,7 +4417,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index ba358f3..238cd66 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -4454,6 +4454,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4481,6 +4481,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 44fe4a7..1905381 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -4426,6 +4426,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4453,6 +4453,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4450,6 +4454,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4477,6 +4481,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index b4d6f76..80be728 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.in b/configure.in index db37cd6..6e73fae 100644 --- a/configure.in +++ b/configure.in -@@ -4341,9 +4341,6 @@ AS_CASE(["$target_os"], +@@ -4368,9 +4368,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index db37cd6..6e73fae 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -4366,56 +4363,62 @@ AC_ARG_WITH(ridir, +@@ -4393,56 +4390,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index db37cd6..6e73fae 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -4432,6 +4435,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4459,6 +4462,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -245,7 +245,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 0428bea..b6e090e 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1101,7 +1101,8 @@ def test_self_use_paths +@@ -1124,7 +1124,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -255,7 +255,7 @@ index 0428bea..b6e090e 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1228,7 +1229,7 @@ def test_self_user_home_user_drive_and_path +@@ -1251,7 +1252,7 @@ def test_self_user_home_user_drive_and_path def test_self_vendor_dir expected = File.join RbConfig::CONFIG['vendordir'], 'gems', From 491bcd7a5e48fb3911c60f16712cd5f0b8deba06 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Fri, 13 Oct 2017 17:26:58 +0000 Subject: [PATCH 479/529] Apply patches cleanly. fed_hash: 6beb732b5c5bb59f2f72a5aaefe2143107d99a1c --- .gitignore | 2 +- ...-additional-preludes-by-configuratio.patch | 2 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ruby-2.3.0-ruby_version.patch | 10 +- ...-do-not-enqueue-redundant-interrupts.patch | 241 ------------------ ...her-suites-in-test_sslctx_set_params.patch | 26 -- ruby.spec | 28 +- sources | 2 +- 11 files changed, 26 insertions(+), 295 deletions(-) delete mode 100644 ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch delete mode 100644 ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch diff --git a/.gitignore b/.gitignore index 6e71936..d634c70 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/ruby-2.4.1.tar.xz +/ruby-2.4.2.tar.xz diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index af8b9a9..3e29d1b 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in index 0e371e2..d4f1dcb 100644 --- a/configure.in +++ b/configure.in -@@ -4536,6 +4536,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4563,6 +4563,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index a4e6c28..bc75f5e 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 37d9a62..553d4d0 100644 --- a/configure.in +++ b/configure.in -@@ -3790,6 +3790,11 @@ if test ${multiarch+set}; then +@@ -3823,6 +3823,11 @@ if test ${multiarch+set}; then fi archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index e841569..489a1b8 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in index db37cd6..ce8d149 100644 --- a/configure.in +++ b/configure.in -@@ -4390,7 +4390,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -4417,7 +4417,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index ba358f3..238cd66 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in index 553d4d0..03a4152 100644 --- a/configure.in +++ b/configure.in -@@ -4454,6 +4454,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4481,6 +4481,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 44fe4a7..1905381 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in index 03a4152..0e371e2 100644 --- a/configure.in +++ b/configure.in -@@ -4426,6 +4426,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4453,6 +4453,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4450,6 +4454,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4477,6 +4481,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index b4d6f76..80be728 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.in b/configure.in index db37cd6..6e73fae 100644 --- a/configure.in +++ b/configure.in -@@ -4341,9 +4341,6 @@ AS_CASE(["$target_os"], +@@ -4368,9 +4368,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index db37cd6..6e73fae 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -4366,56 +4363,62 @@ AC_ARG_WITH(ridir, +@@ -4393,56 +4390,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index db37cd6..6e73fae 100644 if test "${LOAD_RELATIVE+set}"; then AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -4432,6 +4435,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4459,6 +4462,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -245,7 +245,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 0428bea..b6e090e 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1101,7 +1101,8 @@ def test_self_use_paths +@@ -1124,7 +1124,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -255,7 +255,7 @@ index 0428bea..b6e090e 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1228,7 +1229,7 @@ def test_self_user_home_user_drive_and_path +@@ -1251,7 +1252,7 @@ def test_self_user_home_user_drive_and_path def test_self_vendor_dir expected = File.join RbConfig::CONFIG['vendordir'], 'gems', diff --git a/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch b/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch deleted file mode 100644 index 263b532..0000000 --- a/ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch +++ /dev/null @@ -1,241 +0,0 @@ -From 27251312111b7e25e347773e5777ee6072f9289b Mon Sep 17 00:00:00 2001 -From: nagachika -Date: Sat, 8 Jul 2017 02:21:36 +0000 -Subject: [PATCH] merge revision(s) 58284,58812,59028: [Backport #13632] - - vm_core.h: ruby_error_stream_closed - - * vm_core.h (ruby_special_exceptions): renamed - ruby_error_closed_stream as ruby_error_stream_closed, like the - message. - speed up IO#close with many threads - - Today, it increases IO#close performance with many threads: - - Execution time (sec) - name trunk after - vm_thread_close 4.276 3.018 - - Speedup ratio: compare with the result of `trunk' (greater is better) - name after - vm_thread_close 1.417 - - This speedup comes because rb_notify_fd_close only scans threads - inside rb_thread_io_blocking_region, not all threads in the VM. - - In the future, this type data structure may allow us to notify - waiters of multiple FDs on a single thread (when using - Fibers). - - * thread.c (struct waiting_fd): declare - (rb_thread_io_blocking_region): use on-stack list waiter - (rb_notify_fd_close): walk vm->waiting_fds instead - (call_without_gvl): remove old field setting - (th_init): ditto - * vm_core.h (typedef struct rb_vm_struct): add waiting_fds list - * (typedef struct rb_thread_struct): remove waiting_fd field - (rb_vm_living_threads_init): initialize waiting_fds list - - I am now kicking myself for not thinking about this 3 years ago - when I introduced ccan/list in [Feature #9632] to optimize this - same function :< - IO#close: do not enqueue redundant interrupts (take #2) - - Enqueuing multiple errors for one event causes spurious errors - down the line, as reported by Nikolay Vashchenko in - https://bugs.ruby-lang.org/issues/13632 - - This should fix bad interactions with test_race_gets_and_close - in test/ruby/test_io.rb since we ensure rb_notify_fd_close - continues returning the busy flag after enqueuing the interrupt. - - Backporting changes to 2.4 and earlier releases will be more - challenging... - - * thread.c (rb_notify_fd_close): do not enqueue multiple interrupts - [ruby-core:81581] [Bug #13632] - * test/ruby/test_io.rb (test_single_exception_on_close): - new test based on script from Nikolay - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_4@59286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - test/ruby/test_io.rb | 22 ++++++++++++++++++++++ - thread.c | 36 +++++++++++++++++++++++++----------- - vm.c | 1 - - vm_core.h | 6 +++--- - 4 files changed, 50 insertions(+), 15 deletions(-) - -diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb -index 61dfba318042..034dac570ce4 100644 ---- a/test/ruby/test_io.rb -+++ b/test/ruby/test_io.rb -@@ -2809,6 +2809,28 @@ def test_cross_thread_close_stdio - end; - end - -+ def test_single_exception_on_close -+ a = [] -+ t = [] -+ 10.times do -+ r, w = IO.pipe -+ a << [r, w] -+ t << Thread.new do -+ while r.gets -+ end rescue IOError -+ Thread.current.pending_interrupt? -+ end -+ end -+ a.each do |r, w| -+ w.write -"\n" -+ w.close -+ r.close -+ end -+ t.each do |th| -+ assert_equal false, th.value, '[ruby-core:81581] [Bug #13632]' -+ end -+ end -+ - def test_open_mode - feature4742 = "[ruby-core:36338]" - bug6055 = '[ruby-dev:45268]' -diff --git a/thread.c b/thread.c -index 7391cf96d284..2691fd835de4 100644 ---- a/thread.c -+++ b/thread.c -@@ -95,7 +95,11 @@ static int rb_threadptr_pending_interrupt_empty_p(rb_thread_t *th); - #define eTerminateSignal INT2FIX(1) - static volatile int system_working = 1; - --#define closed_stream_error GET_VM()->special_exceptions[ruby_error_closed_stream] -+struct waiting_fd { -+ struct list_node wfd_node; /* <=> vm.waiting_fds */ -+ rb_thread_t *th; -+ int fd; -+}; - - inline static void - st_delete_wrap(st_table *table, st_data_t key) -@@ -1310,7 +1314,6 @@ call_without_gvl(void *(*func)(void *), void *data1, - rb_thread_t *th = GET_THREAD(); - int saved_errno = 0; - -- th->waiting_fd = -1; - if (ubf == RUBY_UBF_IO || ubf == RUBY_UBF_PROCESS) { - ubf = ubf_select; - data2 = th; -@@ -1433,11 +1436,15 @@ VALUE - rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd) - { - volatile VALUE val = Qundef; /* shouldn't be used */ -+ rb_vm_t *vm = GET_VM(); - rb_thread_t *th = GET_THREAD(); - volatile int saved_errno = 0; - int state; -+ struct waiting_fd wfd; - -- th->waiting_fd = fd; -+ wfd.fd = fd; -+ wfd.th = th; -+ list_add(&vm->waiting_fds, &wfd.wfd_node); - - TH_PUSH_TAG(th); - if ((state = EXEC_TAG()) == 0) { -@@ -1448,8 +1455,8 @@ rb_thread_io_blocking_region(rb_blocking_function_t *func, void *data1, int fd) - } - TH_POP_TAG(); - -- /* clear waiting_fd anytime */ -- th->waiting_fd = -1; -+ /* must be deleted before jump */ -+ list_del(&wfd.wfd_node); - - if (state) { - TH_JUMP_TAG(th, state); -@@ -2195,16 +2202,23 @@ int - rb_notify_fd_close(int fd) - { - rb_vm_t *vm = GET_THREAD()->vm; -- rb_thread_t *th = 0; -+ struct waiting_fd *wfd = 0; - int busy; - - busy = 0; -- list_for_each(&vm->living_threads, th, vmlt_node) { -- if (th->waiting_fd == fd) { -- VALUE err = th->vm->special_exceptions[ruby_error_closed_stream]; -+ list_for_each(&vm->waiting_fds, wfd, wfd_node) { -+ if (wfd->fd == fd) { -+ rb_thread_t *th = wfd->th; -+ VALUE err; -+ -+ busy = 1; -+ if (!th) { -+ continue; -+ } -+ wfd->th = 0; -+ err = th->vm->special_exceptions[ruby_error_stream_closed]; - rb_threadptr_pending_interrupt_enque(th, err); - rb_threadptr_interrupt(th); -- busy = 1; - } - } - return busy; -@@ -4839,7 +4853,7 @@ Init_Thread(void) - rb_define_method(rb_cThread, "name=", rb_thread_setname, 1); - rb_define_method(rb_cThread, "inspect", rb_thread_inspect, 0); - -- rb_vm_register_special_exception(ruby_error_closed_stream, rb_eIOError, "stream closed"); -+ rb_vm_register_special_exception(ruby_error_stream_closed, rb_eIOError, "stream closed"); - - cThGroup = rb_define_class("ThreadGroup", rb_cObject); - rb_define_alloc_func(cThGroup, thgroup_s_alloc); -diff --git a/vm.c b/vm.c -index 0544bcc4e573..c8ed39ad1e47 100644 ---- a/vm.c -+++ b/vm.c -@@ -2477,7 +2477,6 @@ th_init(rb_thread_t *th, VALUE self) - th->status = THREAD_RUNNABLE; - th->errinfo = Qnil; - th->last_status = Qnil; -- th->waiting_fd = -1; - th->root_svar = Qfalse; - th->local_storage_recursive_hash = Qnil; - th->local_storage_recursive_hash_for_trace = Qnil; -diff --git a/vm_core.h b/vm_core.h -index d0385d219f82..8e2b93d8e9b2 100644 ---- a/vm_core.h -+++ b/vm_core.h -@@ -427,7 +427,7 @@ enum ruby_special_exceptions { - ruby_error_reenter, - ruby_error_nomemory, - ruby_error_sysstack, -- ruby_error_closed_stream, -+ ruby_error_stream_closed, - ruby_special_error_count - }; - -@@ -490,6 +490,7 @@ typedef struct rb_vm_struct { - struct rb_thread_struct *main_thread; - struct rb_thread_struct *running_thread; - -+ struct list_head waiting_fds; /* <=> struct waiting_fd */ - struct list_head living_threads; - size_t living_thread_num; - VALUE thgroup_default; -@@ -712,8 +713,6 @@ typedef struct rb_thread_struct { - /* passing state */ - int state; - -- int waiting_fd; -- - /* for rb_iterate */ - VALUE passed_block_handler; - -@@ -1445,6 +1444,7 @@ void rb_thread_wakeup_timer_thread(void); - static inline void - rb_vm_living_threads_init(rb_vm_t *vm) - { -+ list_head_init(&vm->waiting_fds); - list_head_init(&vm->living_threads); - vm->living_thread_num = 0; - } diff --git a/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch b/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch deleted file mode 100644 index 9c3e375..0000000 --- a/ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 261353a42d0dc0e7bf73e5a8fb8ecffd04249d42 Mon Sep 17 00:00:00 2001 -From: Kazuki Yamaguchi -Date: Tue, 27 Jun 2017 14:31:09 +0900 -Subject: [PATCH] test/test_ssl: allow 3DES cipher suites in - test_sslctx_set_params - -Fedora's OpenSSL seems to enable 3DES cipher suites by DEFAULT. - -Fixes: https://github.com/ruby/openssl/issues/127 ---- - test/test_ssl.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/test/openssl/test_ssl.rb b/test/openssl/test_ssl.rb -index 19066566..b3efe95a 100644 ---- a/test/openssl/test_ssl.rb -+++ b/test/openssl/test_ssl.rb -@@ -350,7 +350,7 @@ def test_sslctx_set_params - assert_equal OpenSSL::SSL::VERIFY_PEER, ctx.verify_mode - ciphers_names = ctx.ciphers.collect{|v, _, _, _| v } - assert ciphers_names.all?{|v| /A(EC)?DH/ !~ v }, "anon ciphers are disabled" -- assert ciphers_names.all?{|v| /(RC4|MD5|EXP|DES)/ !~ v }, "weak ciphers are disabled" -+ assert ciphers_names.all?{|v| /(RC4|MD5|EXP|DES(?!-EDE|-CBC3))/ !~ v }, "weak ciphers are disabled" - assert_equal 0, ctx.options & OpenSSL::SSL::OP_DONT_INSERT_EMPTY_FRAGMENTS - if defined?(OpenSSL::SSL::OP_NO_COMPRESSION) # >= 1.0.0 - assert_equal OpenSSL::SSL::OP_NO_COMPRESSION, diff --git a/ruby.spec b/ruby.spec index 4a11b3e..5102f76 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 4 -%global teeny_version 1 +%global teeny_version 2 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 83 +%global release 84 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -29,7 +29,7 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.6.11 +%global rubygems_version 2.6.13 %global molinillo_version 0.5.7 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. @@ -39,10 +39,10 @@ %global bigdecimal_version 1.3.0 %global did_you_mean_version 1.1.0 %global io_console_version 0.4.6 -%global json_version 2.0.2 +%global json_version 2.0.4 %global minitest_version 5.10.1 %global net_telnet_version 0.1.1 -%global openssl_version 2.0.3 +%global openssl_version 2.0.5 %global power_assert_version 0.4.1 %global psych_version 2.2.2 %global rake_version 12.0.0 @@ -128,13 +128,6 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch -# Fix OpenSSL::TestSSL#test_sslctx_set_params failures due to recent changes in -# OpenSSL. -# https://github.com/ruby/openssl/issues/127 -Patch10: ruby-2.5.0-allow-3DES-cipher-suites-in-test_sslctx_set_params.patch -# Fix "IOError: stream closed" errors affecting Puma. -# https://bugs.ruby-lang.org/issues/13632 -Patch11: ruby-2.4.2-IO-close-do-not-enqueue-redundant-interrupts.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -174,7 +167,8 @@ straight-forward, and extensible. Summary: A Ruby development environment Group: Development/Languages Requires: %{name}%{?_isa} = %{version}-%{release} -Requires: rubypick +# This would not be needed if ~50 packages depending on -devel used +# --disable-gems Requires: rubygems %description devel @@ -514,8 +508,6 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 -%patch10 -p1 -%patch11 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1038,6 +1030,12 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Mon Sep 18 2017 Pavel Valena - 2.4.2-84 +- Update to Ruby 2.4.2. + +* Fri Sep 08 2017 V鱈t Ondruch - 2.4.1-84 +- Drop ruby-devel dependency on rubypick, which is pulled in transtitively. + * Fri Aug 11 2017 V鱈t Ondruch - 2.4.1-83 - Fix "IOError: stream closed" errors affecting Puma. - Temporary disable checksec on PPC64LE (rhbz#1479302). diff --git a/sources b/sources index c1900a8..573c343 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -894467211c4ae1dbf8a41bb0d58bbc89 ruby-2.4.1.tar.xz +a991f06ea1a1d421f7888c75f80f12d6 ruby-2.4.2.tar.xz From 26252866ff7d05c23ef253a3094670c8a7436f4b Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Thu, 19 Oct 2017 09:54:36 +0200 Subject: [PATCH 480/529] Add macros to remove systemtap, git and cmake dependencies. --- ruby.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 5102f76..d39f57b 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 84 +%global release 85 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -62,6 +62,10 @@ %global with_rubypick 1 %endif +%bcond_without systemtap +%bcond_without git +%bcond_without cmake + Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version} @@ -144,10 +148,16 @@ BuildRequires: libyaml-devel BuildRequires: readline-devel # Needed to pass test_set_program_name(TestRubyOptions) BuildRequires: procps +%if %{with systemtap} BuildRequires: %{_bindir}/dtrace +%endif # RubyGems test suite optional dependencies. +%if %{with git} BuildRequires: git +%endif +%if %{with cmake} BuildRequires: %{_bindir}/cmake +%endif # Required to test hardening. BuildRequires: %{_bindir}/checksec BuildRequires: multilib-rpm-config @@ -713,8 +723,10 @@ touch abrt.rb # runruby, so re-enable them). make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE12}" +%if %{with systemtap} # Check if systemtap is supported. make runruby TESTRUN_SCRIPT=%{SOURCE13} +%endif DISABLE_TESTS="" @@ -1030,6 +1042,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Oct 19 2017 Jun Aruga - 2.4.2-85 +- Add macros to remove systemtap, git and cmake dependencies. + * Mon Sep 18 2017 Pavel Valena - 2.4.2-84 - Update to Ruby 2.4.2. From 96a3d15ec555919b3e66657bfef22855c969a338 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Tue, 24 Oct 2017 07:58:09 -0700 Subject: [PATCH 481/529] Cleanup spec file conditionals --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 5102f76..b32b86d 100644 --- a/ruby.spec +++ b/ruby.spec @@ -58,14 +58,14 @@ %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') -%if 0%{?fedora} >= 19 +%if 0%{?fedora} >= 19 || 0%{?rhel} > 7 %global with_rubypick 1 %endif Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version} -Release: %{release_string} +Release: %{release_string}.1 Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ... # MIT and CCO: ccan/* @@ -1030,6 +1030,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Tue Oct 24 2017 Troy Dawson - 2.4.2-84.1 +- Cleanup spec file conditionals + * Mon Sep 18 2017 Pavel Valena - 2.4.2-84 - Update to Ruby 2.4.2. From 9f971e4cf2110aa1b8b6d2b26284972575025d78 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Sat, 21 Oct 2017 13:13:14 +0200 Subject: [PATCH 482/529] Add macro to remove rubypick dependency. Because Fedora Ruby modularity is needed to build without rubypick package. --- ruby.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index d39f57b..ee75e1a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 85 +%global release 86 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -59,7 +59,7 @@ %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') %if 0%{?fedora} >= 19 -%global with_rubypick 1 +%bcond_without rubypick %endif %bcond_without systemtap @@ -1042,6 +1042,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Sat Oct 21 2017 Jun Aruga - 2.4.2-86 +- Add macro to remove rubypick dependency. + * Thu Oct 19 2017 Jun Aruga - 2.4.2-85 - Add macros to remove systemtap, git and cmake dependencies. From 9bc7bec4a7528c5e4eb140af9f8ca0dab8b40bdf Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Fri, 27 Oct 2017 12:56:54 +0200 Subject: [PATCH 483/529] Improve "with" conditional statement as inline. --- ruby.spec | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/ruby.spec b/ruby.spec index ee75e1a..99e7534 100644 --- a/ruby.spec +++ b/ruby.spec @@ -148,16 +148,10 @@ BuildRequires: libyaml-devel BuildRequires: readline-devel # Needed to pass test_set_program_name(TestRubyOptions) BuildRequires: procps -%if %{with systemtap} -BuildRequires: %{_bindir}/dtrace -%endif +%{?with_systemtap:BuildRequires: %{_bindir}/dtrace} # RubyGems test suite optional dependencies. -%if %{with git} -BuildRequires: git -%endif -%if %{with cmake} -BuildRequires: %{_bindir}/cmake -%endif +%{?with_git:BuildRequires: git} +%{?with_cmake:BuildRequires: %{_bindir}/cmake} # Required to test hardening. BuildRequires: %{_bindir}/checksec BuildRequires: multilib-rpm-config @@ -723,10 +717,8 @@ touch abrt.rb # runruby, so re-enable them). make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE12}" -%if %{with systemtap} # Check if systemtap is supported. -make runruby TESTRUN_SCRIPT=%{SOURCE13} -%endif +%{?with_systemtap:make runruby TESTRUN_SCRIPT=%{SOURCE13}} DISABLE_TESTS="" @@ -1042,8 +1034,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog -* Sat Oct 21 2017 Jun Aruga - 2.4.2-86 +* Fri Oct 27 2017 Jun Aruga - 2.4.2-86 - Add macro to remove rubypick dependency. +- Improve "with" conditional statement as inline. * Thu Oct 19 2017 Jun Aruga - 2.4.2-85 - Add macros to remove systemtap, git and cmake dependencies. From 150d4f5dc095ff09760a0eb78bd9c87e6aac0d3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 30 Oct 2017 16:40:19 +0100 Subject: [PATCH 484/529] Drop 'config.h' source. This source is not needed since c467007d. --- config.h | 61 ------------------------------------------------------- ruby.spec | 5 ----- 2 files changed, 66 deletions(-) delete mode 100644 config.h diff --git a/config.h b/config.h deleted file mode 100644 index b44f715..0000000 --- a/config.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This config.h is a wrapper include file for the original ruby/config.h, - * which has been renamed to ruby/config-.h. There are conflicts for the - * original ruby/config.h on multilib systems, which result from arch-specific - * configuration options. Please do not use the arch-specific file directly. - */ - -/* - * This wrapped is addpated from SDL's one: - * http://pkgs.fedoraproject.org/cgit/SDL.git/tree/SDL_config.h - */ - -#ifdef ruby_config_wrapper_h -#error "ruby_config_wrapper_h should not be defined!" -#endif -#define ruby_config_wrapper_h - -#if defined(__i386__) -#include "ruby/config-i386.h" -#elif defined(__ia64__) -#include "ruby/config-ia64.h" -#elif defined(__powerpc64__) -#include -#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -#include "ruby/config-ppc64.h" -#else -#include "ruby/config-ppc64le.h" -#endif -#elif defined(__powerpc__) -#include "ruby/config-ppc.h" -#elif defined(__s390x__) -#include "ruby/config-s390x.h" -#elif defined(__s390__) -#include "ruby/config-s390.h" -#elif defined(__x86_64__) -#include "ruby/config-x86_64.h" -#elif defined(__arm__) -#include "ruby/config-arm.h" -#elif defined(__alpha__) -#include "ruby/config-alpha.h" -#elif defined(__sparc__) && defined (__arch64__) -#include "ruby/config-sparc64.h" -#elif defined(__sparc__) -#include "ruby/config-sparc.h" -#elif defined(__aarch64__) -#include "ruby/config-aarch64.h" -#elif defined(__mips64) && defined(__MIPSEL__) -#include "ruby/config-mips64el.h" -#elif defined(__mips64) -#include "ruby/config-mips64.h" -#elif defined(__mips) && defined(__MIPSEL__) -#include "ruby/config-mipsel.h" -#elif defined(__mips) -#include "ruby/config-mips.h" -#elif defined(__riscv64) -#include "ruby/config-riscv64.h" -#else -#error "The ruby-devel package is not usable with the architecture." -#endif - -#undef ruby_config_wrapper_h diff --git a/ruby.spec b/ruby.spec index 99e7534..1a8fa65 100644 --- a/ruby.spec +++ b/ruby.spec @@ -85,11 +85,6 @@ Source3: ruby-exercise.stp Source4: macros.ruby Source5: macros.rubygems Source6: abrt_prelude.rb -# This wrapper fixes https://bugzilla.redhat.com/show_bug.cgi?id=977941 -# Hopefully, it will get removed soon: -# https://fedorahosted.org/fpc/ticket/312 -# https://bugzilla.redhat.com/show_bug.cgi?id=977941 -Source7: config.h # RPM dependency generators. Source8: rubygems.attr Source9: rubygems.req From ad05a88747a3894aa01ad46dd6728d91e8b98e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 1 Nov 2017 16:22:02 +0100 Subject: [PATCH 485/529] Check hardening only on Fedora. --- ruby.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 1a8fa65..6fd2e11 100644 --- a/ruby.spec +++ b/ruby.spec @@ -66,6 +66,10 @@ %bcond_without git %bcond_without cmake +%if 0%{?fedora} +%bcond_without hardening_test +%endif + Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version} @@ -148,7 +152,7 @@ BuildRequires: procps %{?with_git:BuildRequires: git} %{?with_cmake:BuildRequires: %{_bindir}/cmake} # Required to test hardening. -BuildRequires: %{_bindir}/checksec +%{?with_hardening_test:BuildRequires: %{_bindir}/checksec} BuildRequires: multilib-rpm-config # This package provides %%{_bindir}/ruby-mri therefore it is marked by this @@ -685,6 +689,7 @@ sed -i 's/^/%doc /' .ruby-doc.* sed -i 's/^/%lang(ja) /' .ruby-doc.ja %check +%if 0%{?with_hardening_test} # Temporary change the hardening check on PPC64LE as long as the checksec is # is providing incorrect output. # https://bugzilla.redhat.com/show_bug.cgi?id=1479302 @@ -696,6 +701,7 @@ checksec -f libruby.so.%{ruby_version} | \ checksec -f libruby.so.%{ruby_version} | \ grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*No.*\d*.*\d*.*libruby.so.%{ruby_version}" %endif +%endif # Check RubyGems version correctness. [ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ] From c2db65dbc7245bf1e78266ac2c2b1c7e7718dd15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 3 Jan 2018 12:06:40 +0100 Subject: [PATCH 486/529] Upgrade to Ruby 2.5.0. --- operating_system.rb | 37 ++++---- ruby-1.9.3-mkmf-verbose.patch | 2 +- ...-additional-preludes-by-configuratio.patch | 20 ++-- ...0-Enable-configuration-of-archlibdir.patch | 14 +-- ...ed-paths-when-empty-version-string-i.patch | 19 ++-- ruby-2.1.0-always-use-i386.patch | 16 ++-- ruby-2.1.0-custom-rubygems-location.patch | 30 +++--- ...2.3-Generate-preludes-using-miniruby.patch | 2 +- ruby-2.3.0-ruby_version.patch | 44 ++++----- ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch | 5 +- ....0-Add-Gem.operating_system_defaults.patch | 80 ++++++++++++++++ ruby.spec | 92 ++++++++++++------- sources | 2 +- 13 files changed, 232 insertions(+), 131 deletions(-) create mode 100644 ruby-2.5.0-Add-Gem.operating_system_defaults.patch diff --git a/operating_system.rb b/operating_system.rb index 4b2903d..0d4b1f0 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -87,22 +87,33 @@ module Gem # Remove methods we are going to override. This avoids "method redefined;" # warnings otherwise issued by Ruby. + remove_method :operating_system_defaults if method_defined? :operating_system_defaults remove_method :default_dir if method_defined? :default_dir remove_method :default_path if method_defined? :default_path - remove_method :default_bindir if method_defined? :default_bindir remove_method :default_ext_dir_for if method_defined? :default_ext_dir_for + ## + # Regular user installs into user directory, root manages /usr/local. + + def operating_system_defaults + unless opt_build_root? + options = if Process.uid == 0 + "--install-dir=#{Gem.default_dirs[:local][:gem_dir]} --bindir #{Gem.default_dirs[:local][:bin_dir]}" + else + "--user-install --bindir #{File.join [Dir.home, 'bin']}" + end + + {"gem" => options} + else + {} + end + end + ## # RubyGems default overrides. def default_dir - if opt_build_root? - Gem.default_dirs[:system][:gem_dir] - elsif Process.uid == 0 - Gem.default_dirs[:local][:gem_dir] - else - Gem.user_dir - end + Gem.default_dirs[:system][:gem_dir] end def default_path @@ -110,16 +121,6 @@ module Gem path.unshift Gem.user_dir if File.exist? Gem.user_home end - def default_bindir - if opt_build_root? - Gem.default_dirs[:system][:bin_dir] - elsif Process.uid == 0 - Gem.default_dirs[:local][:bin_dir] - else - File.join [Dir.home, 'bin'] - end - end - def default_ext_dir_for base_dir dir = if rpmbuild? build_dir = base_dir.chomp Gem.default_dirs[:system][:gem_dir] diff --git a/ruby-1.9.3-mkmf-verbose.patch b/ruby-1.9.3-mkmf-verbose.patch index d94ef7f..f2a1408 100644 --- a/ruby-1.9.3-mkmf-verbose.patch +++ b/ruby-1.9.3-mkmf-verbose.patch @@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 682eb46..e6b1445 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb -@@ -1897,7 +1897,7 @@ def configuration(srcdir) +@@ -1899,7 +1899,7 @@ def configuration(srcdir) SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 3e29d1b..66cb565 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -6,14 +6,14 @@ Subject: [PATCH] Allow to specify addition preludes by configuration option. --- Makefile.in | 2 ++ common.mk | 2 +- - configure.in | 7 +++++++ + configure.ac | 7 +++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 7e8ed82..7916993 100644 --- a/Makefile.in +++ b/Makefile.in -@@ -116,6 +116,8 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ +@@ -119,6 +119,8 @@ XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@ XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@ BOOTSTRAPRUBY = @BOOTSTRAPRUBY@ @@ -26,20 +26,20 @@ diff --git a/common.mk b/common.mk index 5cfbc3d..3f0a82e 100644 --- a/common.mk +++ b/common.mk -@@ -144,7 +144,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) +@@ -147,7 +147,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT) DEFAULT_PRELUDES = $(GEM_PRELUDE) --PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) -+PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) +-PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES) ++PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(DEFAULT_PRELUDES) $(OPTIONAL_PRELUDES) GEM_PRELUDE = $(srcdir)/gem_prelude.rb PRELUDES = {$(srcdir)}prelude.c {$(srcdir)}miniprelude.c GOLFPRELUDES = {$(srcdir)}golf_prelude.c -diff --git a/configure.in b/configure.in -index 0e371e2..d4f1dcb 100644 ---- a/configure.in -+++ b/configure.in -@@ -4563,6 +4563,13 @@ AC_SUBST(rubyarchhdrdir)dnl +diff --git a/configure.ac b/configure.ac +index 028ef7ca3e..cdeff87871 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4395,6 +4395,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index bc75f5e..41444c5 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -4,15 +4,15 @@ Date: Tue, 1 Oct 2013 12:22:40 +0200 Subject: [PATCH] Allow to configure libruby.so placement. --- - configure.in | 5 +++++ + configure.ac | 5 +++++ 1 file changed, 5 insertions(+) -diff --git a/configure.in b/configure.in -index 37d9a62..553d4d0 100644 ---- a/configure.in -+++ b/configure.in -@@ -3823,6 +3823,11 @@ if test ${multiarch+set}; then - fi +diff --git a/configure.ac b/configure.ac +index 11fc237552..b77e88fc37 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3640,6 +3640,11 @@ AS_IF([test ${multiarch+set}], [ + ]) archlibdir='${libdir}/${arch}' +AC_ARG_WITH(archlibdir, diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index 489a1b8..bdc074d 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -5,16 +5,16 @@ Subject: [PATCH] Prevent duplicated paths when empty version string is configured. --- - configure.in | 3 ++- + configure.ac | 3 ++- loadpath.c | 12 ++++++++++++ tool/mkconfig.rb | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) -diff --git a/configure.in b/configure.in -index db37cd6..ce8d149 100644 ---- a/configure.in -+++ b/configure.in -@@ -4417,7 +4417,8 @@ AS_CASE(["$ruby_version_dir_name"], +diff --git a/configure.ac b/configure.ac +index 999e2d6d5d..11fc237552 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4250,7 +4250,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then @@ -28,7 +28,7 @@ diff --git a/loadpath.c b/loadpath.c index 9160031..0d4d953 100644 --- a/loadpath.c +++ b/loadpath.c -@@ -65,22 +65,34 @@ const char ruby_initial_load_paths[] = +@@ -65,21 +65,33 @@ const char ruby_initial_load_paths[] = RUBY_SEARCH_PATH "\0" #endif #ifndef NO_RUBY_SITE_LIB @@ -58,16 +58,15 @@ index 9160031..0d4d953 100644 RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0" +#ifndef RUBY_LIB_VERSION_BLANK RUBY_VENDOR_LIB "\0" - #endif +#endif + #endif RUBY_LIB "\0" - #ifdef RUBY_THINARCH diff --git a/tool/mkconfig.rb b/tool/mkconfig.rb index 07076d4..35e6c3c 100755 --- a/tool/mkconfig.rb +++ b/tool/mkconfig.rb -@@ -113,7 +113,7 @@ +@@ -111,7 +111,7 @@ val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump case name when /^prefix$/ diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 238cd66..4864741 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -4,22 +4,22 @@ Date: Mon, 19 Nov 2012 14:37:28 +0100 Subject: [PATCH] Always use i386. --- - configure.in | 2 ++ + configure.ac | 2 ++ 1 file changed, 2 insertions(+) -diff --git a/configure.in b/configure.in -index 553d4d0..03a4152 100644 ---- a/configure.in -+++ b/configure.in -@@ -4481,6 +4481,8 @@ AC_SUBST(vendorarchdir)dnl +diff --git a/configure.ac b/configure.ac +index b77e88fc37..6bba453e3c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4314,6 +4314,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl +target_cpu=`echo $target_cpu | sed s/i.86/i386/` + - if test "${universal_binary-no}" = yes ; then + AS_IF([test "${universal_binary-no}" = yes ], [ arch="universal-${target_os}" - if test "${rb_cv_architecture_available}" = yes; then + AS_IF([test "${rb_cv_architecture_available}" = yes], [ -- 1.8.3.1 diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index 1905381..cc55c4a 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Allow to install RubyGems into custom location, outside of Ruby tree. --- - configure.in | 5 +++++ + configure.ac | 5 +++++ loadpath.c | 4 ++++ template/verconf.h.tmpl | 3 +++ - tool/rbinstall.rb | 9 +++++++++ - 4 files changed, 21 insertions(+) + tool/rbinstall.rb | 7 +++++++ + 4 files changed, 19 insertions(+) -diff --git a/configure.in b/configure.in -index 03a4152..0e371e2 100644 ---- a/configure.in -+++ b/configure.in -@@ -4453,6 +4453,10 @@ AC_ARG_WITH(vendorarchdir, +diff --git a/configure.ac b/configure.ac +index 6bba453e3c..028ef7ca3e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4286,6 +4286,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -23,10 +23,10 @@ index 03a4152..0e371e2 100644 + AS_HELP_STRING([--with-rubygemsdir=DIR], [custom rubygems directory]), + [rubygemsdir=$withval]) + - if test "${LOAD_RELATIVE+set}"; then + AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4477,6 +4481,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4310,6 +4314,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -67,7 +67,7 @@ diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index b47b6e1..0b99408 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -330,6 +330,7 @@ def CONFIG.[](name, mandatory = false) +@@ -331,6 +331,7 @@ def CONFIG.[](name, mandatory = false) sitearchlibdir = CONFIG["sitearchdir"] vendorlibdir = CONFIG["vendorlibdir"] vendorarchlibdir = CONFIG["vendorarchdir"] @@ -75,17 +75,15 @@ index b47b6e1..0b99408 100755 mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -517,7 +518,15 @@ def CONFIG.[](name, mandatory = false) +@@ -537,7 +538,13 @@ def install(src, cmd) install?(:local, :comm, :lib) do prepare "library scripts", rubylibdir - noinst = %w[README* *.txt *.rdoc *.gemspec] -+ noinst += %w[*ubygems.rb rubygems/ datadir.rb] if rubygemsdir + noinst = %w[*.txt *.rdoc *.gemspec] ++ noinst += %w[rubygems.rb rubygems/ datadir.rb] if rubygemsdir install_recursive(File.join(srcdir, "lib"), rubylibdir, :no_install => noinst, :mode => $data_mode) + if rubygemsdir + noinst = %w[obsolete.rb] + install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :mode => $data_mode) -+ install_recursive(File.join(srcdir, "lib", "rbconfig"), File.join(rubygemsdir, "rbconfig"), :no_install => noinst, :mode => $data_mode) -+ install(File.join(srcdir, "lib", "ubygems.rb"), File.join(rubygemsdir, "ubygems.rb"), :mode => $data_mode) + install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode) + end end diff --git a/ruby-2.2.3-Generate-preludes-using-miniruby.patch b/ruby-2.2.3-Generate-preludes-using-miniruby.patch index 6e8adc4..ca66d28 100644 --- a/ruby-2.2.3-Generate-preludes-using-miniruby.patch +++ b/ruby-2.2.3-Generate-preludes-using-miniruby.patch @@ -11,7 +11,7 @@ diff --git a/common.mk b/common.mk index 168dc52..20c218a 100644 --- a/common.mk +++ b/common.mk -@@ -873,9 +873,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) +@@ -962,9 +962,9 @@ $(MINIPRELUDE_C): $(COMPILE_PRELUDE) $(srcdir)/template/prelude.c.tmpl $(PRELUDE_C): $(COMPILE_PRELUDE) \ diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 80be728..5e24003 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -12,15 +12,15 @@ ruby_version_dir_name now specifies custom version string for versioned directories, e.g. instead of default X.Y.Z, you can specify whatever string. --- - configure.in | 64 ++++++++++++++++++++++++++++------------------------- + configure.ac | 64 ++++++++++++++++++++++++++++------------------------- template/ruby.pc.in | 1 + 2 files changed, 35 insertions(+), 30 deletions(-) -diff --git a/configure.in b/configure.in -index db37cd6..6e73fae 100644 ---- a/configure.in -+++ b/configure.in -@@ -4368,9 +4368,6 @@ AS_CASE(["$target_os"], +diff --git a/configure.ac b/configure.ac +index 8ea969412f..a00f2b6776 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4201,9 +4201,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index db37cd6..6e73fae 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -4393,56 +4390,62 @@ AC_ARG_WITH(ridir, +@@ -4226,56 +4223,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -43,7 +43,7 @@ index db37cd6..6e73fae 100644 -AS_CASE(["$ruby_version"], - [full], [RUBY_LIB_VERSION_STYLE='3 /* full */'], - [minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */']) --if test ${RUBY_LIB_VERSION_STYLE+set}; then +-AS_IF([test ${RUBY_LIB_VERSION_STYLE+set}], [ - { - echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE" - echo '#define STRINGIZE(x) x' @@ -53,11 +53,11 @@ index db37cd6..6e73fae 100644 - } > conftest.c - ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`" - eval $ruby_version --elif test -z "${ruby_version}"; then +-], [test -z "${ruby_version}"], [ - AC_MSG_ERROR([No ruby version, No place for bundled libraries]) --else +-], [ - RUBY_LIB_VERSION="${ruby_version}" --fi +-]) +RUBY_LIB_VERSION_STYLE='3 /* full */' +{ +echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE" @@ -118,9 +118,9 @@ index db37cd6..6e73fae 100644 - [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}]) + [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) - if test "${LOAD_RELATIVE+set}"; then + AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -4459,6 +4462,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4292,6 +4295,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -137,9 +137,9 @@ index 8a2c066..c81b211 100644 TEENY=@TEENY@ ruby_version=@ruby_version@ +ruby_version_dir_name=@ruby_version_dir_name@ + RUBY_API_VERSION=@RUBY_API_VERSION@ RUBY_PROGRAM_VERSION=@RUBY_PROGRAM_VERSION@ RUBY_BASE_NAME=@RUBY_BASE_NAME@ - RUBY_VERSION_NAME=@RUBY_VERSION_NAME@ -- 2.1.0 @@ -245,7 +245,7 @@ diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index 0428bea..b6e090e 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -1124,7 +1124,8 @@ def test_self_use_paths +@@ -1156,7 +1156,8 @@ def test_self_use_paths def test_self_user_dir parts = [@userhome, '.gem', Gem.ruby_engine] @@ -255,7 +255,7 @@ index 0428bea..b6e090e 100644 assert_equal File.join(parts), Gem.user_dir end -@@ -1251,7 +1252,7 @@ def test_self_user_home_user_drive_and_path +@@ -1283,7 +1284,7 @@ def test_self_user_home_user_drive_and_path def test_self_vendor_dir expected = File.join RbConfig::CONFIG['vendordir'], 'gems', @@ -275,14 +275,14 @@ Subject: [PATCH 4/4] Let headers directories follow the configured version name. --- - configure.in | 2 +- + configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.in b/configure.in -index 6e73fae..c842725 100644 ---- a/configure.in -+++ b/configure.in -@@ -271,7 +271,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` +diff --git a/configure.ac b/configure.ac +index a00f2b6776..999e2d6d5d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -164,7 +164,7 @@ RUBY_BASE_NAME=`echo ruby | sed "$program_transform_name"` RUBYW_BASE_NAME=`echo rubyw | sed "$program_transform_name"` AC_SUBST(RUBY_BASE_NAME) AC_SUBST(RUBYW_BASE_NAME) diff --git a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch index 8765d2a..2dc17e3 100644 --- a/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +++ b/ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch @@ -15,7 +15,7 @@ diff --git a/test/fiddle/helper.rb b/test/fiddle/helper.rb index 1da3d93..65148a1 100644 --- a/test/fiddle/helper.rb +++ b/test/fiddle/helper.rb -@@ -6,98 +6,6 @@ +@@ -6,95 +6,6 @@ libc_so = libm_so = nil @@ -23,9 +23,6 @@ index 1da3d93..65148a1 100644 -when /cygwin/ - libc_so = "cygwin1.dll" - libm_so = "cygwin1.dll" --when /x86_64-linux/ -- libc_so = "/lib64/libc.so.6" -- libm_so = "/lib64/libm.so.6" -when /linux/ - libdir = '/lib' - case [0].pack('L!').size diff --git a/ruby-2.5.0-Add-Gem.operating_system_defaults.patch b/ruby-2.5.0-Add-Gem.operating_system_defaults.patch new file mode 100644 index 0000000..6838701 --- /dev/null +++ b/ruby-2.5.0-Add-Gem.operating_system_defaults.patch @@ -0,0 +1,80 @@ +From 60eb961c25f801ee43ca1be9393ab2f0a0546677 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?V=C3=ADt=20Ondruch?= +Date: Tue, 19 Dec 2017 14:00:20 +0100 +Subject: [PATCH] Add Gem.operating_system_defaults to allow packagers to + override defaults. + +This change allows Ruby packagers to override defaults and lazily query +them. + +This is very much the same change as #1644 to treat the +operating_system defaults the same way as platform defaults. +--- + lib/rubygems/config_file.rb | 2 +- + lib/rubygems/defaults.rb | 21 ++++++++++++++++++++- + test/rubygems/test_gem.rb | 7 +++++++ + 3 files changed, 28 insertions(+), 2 deletions(-) + +diff --git a/lib/rubygems/config_file.rb b/lib/rubygems/config_file.rb +index a4efed0f5a..deee38e6d9 100644 +--- a/lib/rubygems/config_file.rb ++++ b/lib/rubygems/config_file.rb +@@ -48,7 +48,7 @@ class Gem::ConfigFile + # For Ruby packagers to set configuration defaults. Set in + # rubygems/defaults/operating_system.rb + +- OPERATING_SYSTEM_DEFAULTS = {} ++ OPERATING_SYSTEM_DEFAULTS = Gem.operating_system_defaults + + ## + # For Ruby implementers to set configuration defaults. Set in +diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb +index 43d57fc808..b8222877ae 100644 +--- a/lib/rubygems/defaults.rb ++++ b/lib/rubygems/defaults.rb +@@ -177,7 +177,26 @@ def self.vendor_dir # :nodoc: + end + + ## +- # Default options for gem commands. ++ # Default options for gem commands for Ruby packagers. ++ # ++ # The options here should be structured as an array of string "gem" ++ # command names as keys and a string of the default options as values. ++ # ++ # Example: ++ # ++ # def self.operating_system_defaults ++ # { ++ # 'install' => '--no-rdoc --no-ri --env-shebang', ++ # 'update' => '--no-rdoc --no-ri --env-shebang' ++ # } ++ # end ++ ++ def self.operating_system_defaults ++ {} ++ end ++ ++ ## ++ # Default options for gem commands for Ruby implementers. + # + # The options here should be structured as an array of string "gem" + # command names as keys and a string of the default options as values. +diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb +index 3225a05c6b..62b80c4945 100644 +--- a/test/rubygems/test_gem.rb ++++ b/test/rubygems/test_gem.rb +@@ -1802,6 +1802,13 @@ def test_use_gemdeps_specific + ENV['RUBYGEMS_GEMDEPS'] = rubygems_gemdeps + end + ++ def test_operating_system_defaults ++ operating_system_defaults = Gem.operating_system_defaults ++ ++ assert operating_system_defaults != nil ++ assert operating_system_defaults.is_a? Hash ++ end ++ + def test_platform_defaults + platform_defaults = Gem.platform_defaults + diff --git a/ruby.spec b/ruby.spec index 6fd2e11..8bc9686 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 -%global minor_version 4 -%global teeny_version 2 +%global minor_version 5 +%global teeny_version 0 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -10,7 +10,7 @@ #%%global milestone rc1 # Keep the revision enabled for pre-releases from SVN. -#%%global revision 57159 +#%%global revision 61414 %global ruby_archive %{name}-%{ruby_version} @@ -29,26 +29,26 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.6.13 +%global rubygems_version 2.7.3 %global molinillo_version 0.5.7 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. # http://redmine.ruby-lang.org/issues/5313 %global irb_version %{ruby_version} -%global bigdecimal_version 1.3.0 -%global did_you_mean_version 1.1.0 +%global bigdecimal_version 1.3.4 +%global did_you_mean_version 1.2.0 %global io_console_version 0.4.6 -%global json_version 2.0.4 -%global minitest_version 5.10.1 +%global json_version 2.1.0 +%global minitest_version 5.10.3 %global net_telnet_version 0.1.1 -%global openssl_version 2.0.5 -%global power_assert_version 0.4.1 -%global psych_version 2.2.2 -%global rake_version 12.0.0 -%global rdoc_version 5.0.0 -%global test_unit_version 3.2.3 -%global xmlrpc_version 0.2.1 +%global openssl_version 2.1.0 +%global power_assert_version 1.1.1 +%global psych_version 3.0.2 +%global rake_version 12.3.0 +%global rdoc_version 6.0.1 +%global test_unit_version 3.2.7 +%global xmlrpc_version 0.3.0 # Might not be needed in the future, if we are lucky enough. # https://bugzilla.redhat.com/show_bug.cgi?id=888262 @@ -131,6 +131,9 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch # hardening features of glibc (rhbz#1361037). # https://bugs.ruby-lang.org/issues/12666 Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch +# Add Gem.operating_system_defaults to allow packagers to override defaults. +# https://github.com/rubygems/rubygems/pull/2116 +Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -216,7 +219,6 @@ Requires: rubygem(psych) >= %{psych_version} Provides: gem = %{version}-%{release} Provides: ruby(rubygems) = %{version}-%{release} # https://github.com/rubygems/rubygems/pull/1189#issuecomment-121600910 -Provides: bundled(rubygem(molinillo)) = %{molinillo_version} Provides: bundled(rubygem-molinillo) = %{molinillo_version} BuildArch: noarch @@ -334,6 +336,7 @@ License: MIT Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(did_you_mean) = %{version}-%{release} +BuildArch: noarch %description -n rubygem-did_you_mean "did you mean?" experience in Ruby: the error message will tell you the right @@ -448,6 +451,7 @@ Group: Development/Libraries Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(net-telnet) = %{version}-%{release} +BuildArch: noarch %description -n rubygem-net-telnet Provides telnet client functionality. @@ -511,6 +515,7 @@ rm -rf ext/fiddle/libffi* %patch6 -p1 %patch7 -p1 %patch9 -p1 +%patch10 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -690,25 +695,24 @@ sed -i 's/^/%lang(ja) /' .ruby-doc.ja %check %if 0%{?with_hardening_test} -# Temporary change the hardening check on PPC64LE as long as the checksec is -# is providing incorrect output. -# https://bugzilla.redhat.com/show_bug.cgi?id=1479302 -%ifnarch ppc64le # Check Ruby hardening. checksec -f libruby.so.%{ruby_version} | \ grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*Yes.*\d*.*\d*.*libruby.so.%{ruby_version}" -%else -checksec -f libruby.so.%{ruby_version} | \ - grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*No.*\d*.*\d*.*libruby.so.%{ruby_version}" -%endif %endif -# Check RubyGems version correctness. +# Check RubyGems version. [ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ] -# Check Molinillo version correctness. -[ "`make runruby TESTRUN_SCRIPT=\"-e \\\"module Gem; module Resolver; end; end; require 'rubygems/resolver/molinillo/lib/molinillo/gem_metadata'; puts Gem::Resolver::Molinillo::VERSION\\\"\" | tail -1`" \ + +# Check Rubygems bundled dependencies versions. + +# Molinillo. +[ "`make runruby TESTRUN_SCRIPT=\"-e \\\" \ + module Gem; module Resolver; end; end; \ + require 'rubygems/resolver/molinillo/lib/molinillo/gem_metadata'; \ + puts Gem::Resolver::Molinillo::VERSION\\\"\" | tail -1`" \ == '%{molinillo_version}' ] + # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing # the test suite). @@ -727,6 +731,11 @@ DISABLE_TESTS="" # Once seen: http://koji.fedoraproject.org/koji/taskinfo?taskID=12556650 DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb" +# Disable failing TestResolvMDNS#test_mdns_each_address test, +# which fails on Koji. +# https://bugs.ruby-lang.org/issues/14175 +sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb + make check TESTS="-v $DISABLE_TESTS" %post libs -p /sbin/ldconfig @@ -789,7 +798,6 @@ make check TESTS="-v $DISABLE_TESTS" %{ruby_libdir}/net %{ruby_libdir}/optparse %{ruby_libdir}/racc -%{ruby_libdir}/rbconfig %{ruby_libdir}/rexml %{ruby_libdir}/rinda %{ruby_libdir}/ripper @@ -886,9 +894,6 @@ make check TESTS="-v $DISABLE_TESTS" %dir %{ruby_libarchdir}/io %{ruby_libarchdir}/io/nonblock.so %{ruby_libarchdir}/io/wait.so -%dir %{ruby_libarchdir}/mathn -%{ruby_libarchdir}/mathn/complex.so -%{ruby_libarchdir}/mathn/rational.so %{ruby_libarchdir}/nkf.so %{ruby_libarchdir}/objspace.so %{ruby_libarchdir}/pathname.so @@ -912,10 +917,8 @@ make check TESTS="-v $DISABLE_TESTS" %files -n rubygems %{_bindir}/gem %dir %{rubygems_dir} -%{rubygems_dir}/rbconfig %{rubygems_dir}/rubygems %{rubygems_dir}/rubygems.rb -%{rubygems_dir}/ubygems.rb # Explicitly include only RubyGems directory strucure to avoid accidentally # packaged content. @@ -932,6 +935,24 @@ make check TESTS="-v $DISABLE_TESTS" %exclude %{gem_dir}/cache/* +# TODO: Gemify these libraries +%{gem_dir}/specifications/default/cmath-1.0.0.gemspec +%{gem_dir}/specifications/default/csv-1.0.0.gemspec +%{gem_dir}/specifications/default/date-1.0.0.gemspec +%{gem_dir}/specifications/default/dbm-1.0.0.gemspec +%{gem_dir}/specifications/default/etc-1.0.0.gemspec +%{gem_dir}/specifications/default/fcntl-1.0.0.gemspec +%{gem_dir}/specifications/default/fiddle-1.0.0.gemspec +%{gem_dir}/specifications/default/fileutils-1.0.2.gemspec +%{gem_dir}/specifications/default/gdbm-2.0.0.gemspec +%{gem_dir}/specifications/default/ipaddr-1.2.0.gemspec +%{gem_dir}/specifications/default/scanf-1.0.0.gemspec +%{gem_dir}/specifications/default/sdbm-1.0.0.gemspec +%{gem_dir}/specifications/default/stringio-0.0.1.gemspec +%{gem_dir}/specifications/default/strscan-1.0.0.gemspec +%{gem_dir}/specifications/default/webrick-1.4.2.gemspec +%{gem_dir}/specifications/default/zlib-1.0.0.gemspec + %files -n rubygems-devel %{_rpmconfigdir}/macros.d/macros.rubygems %{_rpmconfigdir}/fileattrs/rubygems.attr @@ -1027,14 +1048,19 @@ make check TESTS="-v $DISABLE_TESTS" %files -n rubygem-xmlrpc %license %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/LICENSE.txt %dir %{gem_dir}/gems/xmlrpc-%{xmlrpc_version} +%exclude %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/.* %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Gemfile %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/Rakefile %doc %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/README.md %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/bin %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/lib +%{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/xmlrpc.gemspec %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Tue Jan 02 2018 V鱈t Ondruch - 2.5.0-1 +- Upgrade to Ruby 2.5.0. + * Fri Oct 27 2017 Jun Aruga - 2.4.2-86 - Add macro to remove rubypick dependency. - Improve "with" conditional statement as inline. diff --git a/sources b/sources index 0ae2520..a289e4c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruby-2.4.2.tar.xz) = c1d42272fb0d94b693452e703b0ea4942bf59cbd4b08ba83bf039f54be97ebc88511632413da0164970b4cf97bc302bccb88aab48edfa8fa147498e7ee741595 +SHA512 (ruby-2.5.0.tar.xz) = 55714a33d7661fe8b432f73c34fd67b49699f8b79df1cbd680a74899124d31111ab0f444677672aac1ba725820182940d485efb2db0bf2bc96737c5d40c54578 From 45b099cf0563f6cf62878cb379d1159b6c4d6a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 3 Jan 2018 12:10:23 +0100 Subject: [PATCH 487/529] Temporary bump rubygem-json release. This allow to rebuild independent rubygem-json package, which would have otherwise higher release and caused issues with build of other packages. --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index 8bc9686..49e4e2a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -359,6 +359,7 @@ provide higher layer features, such like curses and readline. %package -n rubygem-json Summary: This is a JSON implementation as a Ruby extension in C Version: %{json_version} +Release: 102%{?dist} Group: Development/Libraries # UCD: ext/json/generator/generator.c License: (Ruby or GPLv2) and UCD From 9436f5bc42e722be4f604cb4bd057fcf61db50ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 3 Jan 2018 16:16:03 +0100 Subject: [PATCH 488/529] Revert "Temporary bump rubygem-json release." This reverts commit 45b099cf0563f6cf62878cb379d1159b6c4d6a19. --- ruby.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 49e4e2a..8bc9686 100644 --- a/ruby.spec +++ b/ruby.spec @@ -359,7 +359,6 @@ provide higher layer features, such like curses and readline. %package -n rubygem-json Summary: This is a JSON implementation as a Ruby extension in C Version: %{json_version} -Release: 102%{?dist} Group: Development/Libraries # UCD: ext/json/generator/generator.c License: (Ruby or GPLv2) and UCD From b1741da5b78890dda27bb312dca07fa42dd7356b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 9 Jan 2018 12:49:58 +0100 Subject: [PATCH 489/529] Fix segfaults during generating of documentation. This caused issued during build of rubygem-{webmock,ffi} and was fixed as part of https://bugs.ruby-lang.org/issues/14261. --- ruby-2.5.0-parse.y-assignable_error.patch | 80 +++++++++++++++++++++++ ruby.spec | 9 ++- 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 ruby-2.5.0-parse.y-assignable_error.patch diff --git a/ruby-2.5.0-parse.y-assignable_error.patch b/ruby-2.5.0-parse.y-assignable_error.patch new file mode 100644 index 0000000..ea7dad9 --- /dev/null +++ b/ruby-2.5.0-parse.y-assignable_error.patch @@ -0,0 +1,80 @@ +From: nobu +Date: Sun, 31 Dec 2017 11:25:38 +0000 +Subject: [PATCH] parse.y: assignable_error + +* parse.y (assignable_gen): should return valid NODE always even + on errors. [ruby-core:84565] [Bug #14261] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + parse.c | 14 ++++---------- + test/ruby/test_parse.rb | 6 ++++++ + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/parse.c b/parse.c +index 08c3461f7096..c260a046dc33 100644 +--- a/parse.c ++++ b/parse.c +@@ -6593,10 +6593,6 @@ + #line 1984 "parse.y" /* yacc.c:1646 */ + { + (yyval.node) = assignable(var_field((yyvsp[0].id)), 0, &(yyloc)); +- /*%%%*/ +- if (!(yyval.node)) (yyval.node) = new_begin(0, &(yyloc)); +- /*% +- %*/ + } + #line 6598 "parse.c" /* yacc.c:1646 */ + break; +@@ -6605,10 +6601,6 @@ + #line 1992 "parse.y" /* yacc.c:1646 */ + { + (yyval.node) = assignable(var_field((yyvsp[0].id)), 0, &(yyloc)); +- /*%%%*/ +- if (!(yyval.node)) (yyval.node) = new_begin(0, &(yyloc)); +- /*% +- %*/ + } + #line 6610 "parse.c" /* yacc.c:1646 */ + break; +@@ -16034,11 +16026,13 @@ + #ifdef RIPPER + ID id = get_id(lhs); + # define assignable_result(x) (lhs) ++# define assignable_error() (lhs) + # define parser_yyerror(parser, x) (lhs = assign_error_gen(parser, lhs)) + #else + # define assignable_result(x) assignable_result0(x, location) ++# define assignable_error() new_begin(0, location) + #endif +- if (!id) return assignable_result(0); ++ if (!id) return assignable_error(); + switch (id) { + case keyword_self: + yyerror0("Can't change the value of self"); +@@ -16101,7 +16095,7 @@ + compile_error(PARSER_ARG "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id)); + } + error: +- return assignable_result(0); ++ return assignable_error(); + #undef assignable_result + #undef parser_yyerror + } +diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb +index e26bcdc07e19..15c6245bac2e 100644 +--- a/test/ruby/test_parse.rb ++++ b/test/ruby/test_parse.rb +@@ -746,6 +746,12 @@ def foo + end + END + end ++ assert_raise(SyntaxError) do ++ eval "#{<<~"begin;"}\n#{<<~'end;'}", nil, __FILE__, __LINE__+1 ++ begin; ++ x, true ++ end; ++ end + end + + def test_block_dup diff --git a/ruby.spec b/ruby.spec index 8bc9686..c8263e5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 86 +%global release 87 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -134,6 +134,9 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch # Add Gem.operating_system_defaults to allow packagers to override defaults. # https://github.com/rubygems/rubygems/pull/2116 Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch +# Fix segfault during generating documentation. +# https://bugs.ruby-lang.org/issues/14343 +Patch11: ruby-2.5.0-parse.y-assignable_error.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -516,6 +519,7 @@ rm -rf ext/fiddle/libffi* %patch7 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1058,6 +1062,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Tue Jan 09 2018 V鱈t Ondruch - 2.5.0-87 +- Fix segfaults during generating of documentation. + * Tue Jan 02 2018 V鱈t Ondruch - 2.5.0-1 - Upgrade to Ruby 2.5.0. From 10a4e45e8985ea6b56df06d353ccfa42a61e53c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 9 Jan 2018 13:09:39 +0100 Subject: [PATCH 490/529] Fix wrong changelog release. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index c8263e5..6eff5d9 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1065,7 +1065,7 @@ make check TESTS="-v $DISABLE_TESTS" * Tue Jan 09 2018 V鱈t Ondruch - 2.5.0-87 - Fix segfaults during generating of documentation. -* Tue Jan 02 2018 V鱈t Ondruch - 2.5.0-1 +* Tue Jan 02 2018 V鱈t Ondruch - 2.5.0-86 - Upgrade to Ruby 2.5.0. * Fri Oct 27 2017 Jun Aruga - 2.4.2-86 From 64ef57b28aef1557a826261ae0394ff2d73736ae Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Thu, 18 Jan 2018 13:39:07 -0600 Subject: [PATCH 491/529] Fixing check for ppc64le --- ruby.spec | 8 -------- 1 file changed, 8 deletions(-) diff --git a/ruby.spec b/ruby.spec index b32b86d..4ce9d64 100644 --- a/ruby.spec +++ b/ruby.spec @@ -686,17 +686,9 @@ sed -i 's/^/%doc /' .ruby-doc.* sed -i 's/^/%lang(ja) /' .ruby-doc.ja %check -# Temporary change the hardening check on PPC64LE as long as the checksec is -# is providing incorrect output. -# https://bugzilla.redhat.com/show_bug.cgi?id=1479302 -%ifnarch ppc64le # Check Ruby hardening. checksec -f libruby.so.%{ruby_version} | \ grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*Yes.*\d*.*\d*.*libruby.so.%{ruby_version}" -%else -checksec -f libruby.so.%{ruby_version} | \ - grep "Full RELRO.*Canary found.*NX enabled.*DSO.*No RPATH.*No RUNPATH.*No.*\d*.*\d*.*libruby.so.%{ruby_version}" -%endif # Check RubyGems version correctness. [ "`make runruby TESTRUN_SCRIPT='bin/gem -v' | tail -1`" == '%{rubygems_version}' ] From 138a8a192cc62b4f2f4712a5252ad8b24091b521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 20 Jan 2018 23:07:50 +0100 Subject: [PATCH 492/529] Rebuilt for switch to libxcrypt --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 6eff5d9..dc2aed6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 87 +%global release 88 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1062,6 +1062,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Sat Jan 20 2018 Bj旦rn Esser - 2.5.0-88 +- Rebuilt for switch to libxcrypt + * Tue Jan 09 2018 V鱈t Ondruch - 2.5.0-87 - Fix segfaults during generating of documentation. From f49edf212fc0d8efce90860a0c4094fb30f173a5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 13:25:27 +0000 Subject: [PATCH 493/529] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index dc2aed6..e8cf911 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 88 +%global release 89 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1062,6 +1062,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 2.5.0-89 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Sat Jan 20 2018 Bj旦rn Esser - 2.5.0-88 - Rebuilt for switch to libxcrypt From 72c55bdcb29463642399ea365230a8b11c5c7842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 30 Jan 2018 08:38:56 +0100 Subject: [PATCH 494/529] Drop obsolete ldconfig scriptlets. https://fedoraproject.org/wiki/Changes/Removing_ldconfig_scriptlets --- ruby.spec | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index e8cf911..ea7abe6 100644 --- a/ruby.spec +++ b/ruby.spec @@ -742,10 +742,6 @@ sed -i '/def test_mdns_each_address$/,/^ end$/ s/^/#/' test/resolv/test_mdns.rb make check TESTS="-v $DISABLE_TESTS" -%post libs -p /sbin/ldconfig - -%postun libs -p /sbin/ldconfig - %files %license BSDL %license COPYING @@ -1062,6 +1058,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Tue Feb 13 2018 V鱈t Ondruch - 2.5.0-89 +- Drop obsolete ldconfig scriptlets. + * Fri Feb 09 2018 Fedora Release Engineering - 2.5.0-89 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 5624addc78a1a8b4a4d5dd31d76624249ce3a46d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 1 Feb 2018 13:53:25 +0100 Subject: [PATCH 495/529] Add GMP dependency. This improves performance of some mathematical operations. https://bugs.ruby-lang.org/issues/8796 --- ruby.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruby.spec b/ruby.spec index ea7abe6..2ff939f 100644 --- a/ruby.spec +++ b/ruby.spec @@ -65,6 +65,7 @@ %bcond_without systemtap %bcond_without git %bcond_without cmake +%bcond_without gmp %if 0%{?fedora} %bcond_without hardening_test @@ -147,6 +148,7 @@ Recommends: rubygem(openssl) >= %{openssl_version} BuildRequires: autoconf BuildRequires: gdbm-devel +%{?with_hardening_test:BuildRequires: gmp-devel} BuildRequires: libffi-devel BuildRequires: openssl-devel BuildRequires: libyaml-devel @@ -1060,6 +1062,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Tue Feb 13 2018 V鱈t Ondruch - 2.5.0-89 - Drop obsolete ldconfig scriptlets. +- Add GMP dependency. * Fri Feb 09 2018 Fedora Release Engineering - 2.5.0-89 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From b15350c441c94446abdc27773e713b624ec257f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 1 Feb 2018 17:27:39 +0100 Subject: [PATCH 496/529] Use 'with' operator in RPM dependency generator. --- ruby.spec | 1 + rubygems.req | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ruby.spec b/ruby.spec index 2ff939f..9b07aa2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1063,6 +1063,7 @@ make check TESTS="-v $DISABLE_TESTS" * Tue Feb 13 2018 V鱈t Ondruch - 2.5.0-89 - Drop obsolete ldconfig scriptlets. - Add GMP dependency. +- Use 'with' operator in RPM dependency generator. * Fri Feb 09 2018 Fedora Release Engineering - 2.5.0-89 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/rubygems.req b/rubygems.req index 4f7a583..64c572b 100644 --- a/rubygems.req +++ b/rubygems.req @@ -52,11 +52,14 @@ module RubyGemsReq # Report all gem dependencies including their version. def self.gem_depenencies(specification) specification.runtime_dependencies.each do |dependency| - Helpers::requirement_versions_to_rpm(dependency.requirement).each do |requirement| - dependency_string = "rubygem(#{dependency.name})" - dependency_string += " #{requirement}" if requirement && requirement.length > 0 - puts dependency_string + dependency_strings = Helpers::requirement_versions_to_rpm(dependency.requirement).map do |requirement| + requirement_string = "rubygem(#{dependency.name})" + requirement_string += " #{requirement}" if requirement && requirement.length > 0 + requirement_string end + dependency_string = dependency_strings.join(' with ') + dependency_string.prepend('(').concat(')') if dependency_strings.length > 1 + puts dependency_string end end From 75ea12f0a3113c75f63f9ec703bf5226e4fec2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 1 Feb 2018 17:29:46 +0100 Subject: [PATCH 497/529] Use safe navigation operator. This operator is available since Ruby 2.3 and we are not going to use this generator with older Ruby. --- rubygems.req | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rubygems.req b/rubygems.req index 64c572b..8e032c9 100644 --- a/rubygems.req +++ b/rubygems.req @@ -44,7 +44,7 @@ module RubyGemsReq def self.rubygems_dependency(specification) Helpers::requirement_versions_to_rpm(specification.required_rubygems_version).each do |requirement| dependency_string = "ruby(rubygems)" - dependency_string += " #{specification.required_rubygems_version}" if requirement && requirement.length > 0 + dependency_string += " #{specification.required_rubygems_version}" if requirement&.length > 0 puts dependency_string end end @@ -54,7 +54,7 @@ module RubyGemsReq specification.runtime_dependencies.each do |dependency| dependency_strings = Helpers::requirement_versions_to_rpm(dependency.requirement).map do |requirement| requirement_string = "rubygem(#{dependency.name})" - requirement_string += " #{requirement}" if requirement && requirement.length > 0 + requirement_string += " #{requirement}" if requirement&.length > 0 requirement_string end dependency_string = dependency_strings.join(' with ') From 637f46e17d3275b12e017051eab56db2b2c32eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 1 Feb 2018 19:22:44 +0100 Subject: [PATCH 498/529] Add conflicts RPM generator. This leverages RPM Conflicts instead of expanding the version ranges, which does not work as reliably for this purpose. --- ruby.spec | 12 ++++++++---- rubygems.attr | 1 + rubygems.con | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ rubygems.req | 10 ++-------- 4 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 rubygems.con diff --git a/ruby.spec b/ruby.spec index 9b07aa2..a4fecc0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -94,10 +94,11 @@ Source6: abrt_prelude.rb Source8: rubygems.attr Source9: rubygems.req Source10: rubygems.prov +Source11: rubygems.con # ABRT hoook test case. -Source12: test_abrt.rb +Source13: test_abrt.rb # SystemTap tests. -Source13: test_systemtap.rb +Source14: test_systemtap.rb # The load directive is supported since RPM 4.12, i.e. F21+. The build process # fails on older Fedoras. @@ -599,6 +600,7 @@ mkdir -p %{buildroot}%{_rpmconfigdir}/fileattrs install -m 644 %{SOURCE8} %{buildroot}%{_rpmconfigdir}/fileattrs install -m 755 %{SOURCE9} %{buildroot}%{_rpmconfigdir} install -m 755 %{SOURCE10} %{buildroot}%{_rpmconfigdir} +install -m 755 %{SOURCE11} %{buildroot}%{_rpmconfigdir} # Install custom operating_system.rb. mkdir -p %{buildroot}%{rubygems_dir}/rubygems/defaults @@ -726,10 +728,10 @@ touch abrt.rb # Check if abrt hook is required (RubyGems are disabled by default when using # runruby, so re-enable them). -make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE12}" +make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}" # Check if systemtap is supported. -%{?with_systemtap:make runruby TESTRUN_SCRIPT=%{SOURCE13}} +%{?with_systemtap:make runruby TESTRUN_SCRIPT=%{SOURCE14}} DISABLE_TESTS="" @@ -960,6 +962,7 @@ make check TESTS="-v $DISABLE_TESTS" %{_rpmconfigdir}/fileattrs/rubygems.attr %{_rpmconfigdir}/rubygems.req %{_rpmconfigdir}/rubygems.prov +%{_rpmconfigdir}/rubygems.con %files -n rubygem-rake %{_bindir}/rake @@ -1064,6 +1067,7 @@ make check TESTS="-v $DISABLE_TESTS" - Drop obsolete ldconfig scriptlets. - Add GMP dependency. - Use 'with' operator in RPM dependency generator. +- Add conflicts RPM generator. * Fri Feb 09 2018 Fedora Release Engineering - 2.5.0-89 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/rubygems.attr b/rubygems.attr index f033d43..5793bf7 100644 --- a/rubygems.attr +++ b/rubygems.attr @@ -1,5 +1,6 @@ %__rubygems_requires %{_rpmconfigdir}/rubygems.req %__rubygems_provides %{_rpmconfigdir}/rubygems.prov +%__rubygems_conflicts %{_rpmconfigdir}/rubygems.con # In non-gem packages, the %%{gem_name} macro is not available and the macro # stays unexpanded which leads to "invalid regex" error (rhbz#1154067). %__rubygems_path ^%{?gem_name:%{gem_spec}}%{!?gem_name:this_should_never_match_anything}$ diff --git a/rubygems.con b/rubygems.con new file mode 100644 index 0000000..1a99ed0 --- /dev/null +++ b/rubygems.con @@ -0,0 +1,52 @@ +#!/usr/bin/ruby + +require 'rubygems/package' + +module RubyGemsReq + module Helpers + # Keep only '!=' requirements. + def self.conflicts(requirements) + conflicts = requirements.select {|r| r.first == '!='} + end + + # Converts Gem::Requirement into array of requirements strings compatible + # with RPM .spec file. + def self.requirement_versions_to_rpm(requirement) + self.conflicts(requirement.requirements).map do |op, version| + version == Gem::Version.new(0) ? "" : "= #{version}" + end + end + end + + # Report conflicting gem dependencies including their version. + def self.gem_depenencies(specification) + specification.runtime_dependencies.each do |dependency| + conflict_strings = Helpers::requirement_versions_to_rpm(dependency.requirement).map do |requirement| + requirement_string = "rubygem(#{dependency.name}) #{requirement}" + end + if conflict_strings.length > 0 + conflict_string = conflict_strings.join(' with ') + conflict_string.prepend('(').concat(')') if conflict_strings.length > 1 + puts conflict_string + end + end + end + + # Reports all conflicts specified by all provided .gemspec files. + def self.conflicts + while filename = gets + filename.strip! + begin + specification = Gem::Specification.load filename + + gem_depenencies(specification) + rescue => e + # Ignore all errors. + end + end + end +end + +if __FILE__ == $0 + RubyGemsReq::conflicts +end diff --git a/rubygems.req b/rubygems.req index 8e032c9..6868bdd 100644 --- a/rubygems.req +++ b/rubygems.req @@ -11,11 +11,11 @@ module RubyGemsReq when '~>' expand_pessimistic_requirement(r) when '!=' - expand_not_equal_requirement(r) + [] else [r] end - end + end.reject {|r| r.empty? } end # Expands the pessimistic version operator '~>' into equivalent '>=' and @@ -25,12 +25,6 @@ module RubyGemsReq return ['>=', requirement.last], ['<', next_version] end - # Expands the not equal version operator '!=' into equivalent '<' and - # '>' pair. - def self.expand_not_equal_requirement(requirement) - return ['<', requirement.last], ['>', requirement.last] - end - # Converts Gem::Requirement into array of requirements strings compatible # with RPM .spec file. def self.requirement_versions_to_rpm(requirement) From 2134f5703e5b822da3782112095143450a88aa04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 13 Feb 2018 14:43:58 +0100 Subject: [PATCH 499/529] Disable Tokyo TZ tests. They are broken by recen tzdata update. --- ruby-2.5.0-Disable-Tokyo-TZ-tests.patch | 30 +++++++++++++++++++++++++ ruby.spec | 4 ++++ 2 files changed, 34 insertions(+) create mode 100644 ruby-2.5.0-Disable-Tokyo-TZ-tests.patch diff --git a/ruby-2.5.0-Disable-Tokyo-TZ-tests.patch b/ruby-2.5.0-Disable-Tokyo-TZ-tests.patch new file mode 100644 index 0000000..01632eb --- /dev/null +++ b/ruby-2.5.0-Disable-Tokyo-TZ-tests.patch @@ -0,0 +1,30 @@ +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index 20a57fe7dd..5b9e5a8bde 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -126,8 +126,8 @@ def test_asia_singapore + + def test_asia_tokyo + with_tz(tz="Asia/Tokyo") { +- assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0]) +- assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59]) ++# assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0]) ++# assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59]) + assert_time_constructor(tz, "2010-06-10 06:13:28 +0900", :local, [2010,6,10,6,13,28]) + } + end +@@ -329,10 +329,10 @@ def self.gen_zdump_test(data) + Asia/Singapore Sun Aug 8 16:30:00 1965 UTC = Mon Aug 9 00:00:00 1965 SGT isdst=0 gmtoff=27000 + Asia/Singapore Thu Dec 31 16:29:59 1981 UTC = Thu Dec 31 23:59:59 1981 SGT isdst=0 gmtoff=27000 + Asia/Singapore Thu Dec 31 16:30:00 1981 UTC = Fri Jan 1 00:30:00 1982 SGT isdst=0 gmtoff=28800 +-Asia/Tokyo Sat May 5 16:59:59 1951 UTC = Sun May 6 01:59:59 1951 JST isdst=0 gmtoff=32400 +-Asia/Tokyo Sat May 5 17:00:00 1951 UTC = Sun May 6 03:00:00 1951 JDT isdst=1 gmtoff=36000 +-Asia/Tokyo Fri Sep 7 15:59:59 1951 UTC = Sat Sep 8 01:59:59 1951 JDT isdst=1 gmtoff=36000 +-Asia/Tokyo Fri Sep 7 16:00:00 1951 UTC = Sat Sep 8 01:00:00 1951 JST isdst=0 gmtoff=32400 ++#Asia/Tokyo Sat May 5 16:59:59 1951 UTC = Sun May 6 01:59:59 1951 JST isdst=0 gmtoff=32400 ++#Asia/Tokyo Sat May 5 17:00:00 1951 UTC = Sun May 6 03:00:00 1951 JDT isdst=1 gmtoff=36000 ++#Asia/Tokyo Fri Sep 7 15:59:59 1951 UTC = Sat Sep 8 01:59:59 1951 JDT isdst=1 gmtoff=36000 ++#Asia/Tokyo Fri Sep 7 16:00:00 1951 UTC = Sat Sep 8 01:00:00 1951 JST isdst=0 gmtoff=32400 + America/St_Johns Sun Mar 11 03:30:59 2007 UTC = Sun Mar 11 00:00:59 2007 NST isdst=0 gmtoff=-12600 + America/St_Johns Sun Mar 11 03:31:00 2007 UTC = Sun Mar 11 01:01:00 2007 NDT isdst=1 gmtoff=-9000 + America/St_Johns Sun Nov 4 02:30:59 2007 UTC = Sun Nov 4 00:00:59 2007 NDT isdst=1 gmtoff=-9000 diff --git a/ruby.spec b/ruby.spec index a4fecc0..268aacd 100644 --- a/ruby.spec +++ b/ruby.spec @@ -139,6 +139,9 @@ Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch # Fix segfault during generating documentation. # https://bugs.ruby-lang.org/issues/14343 Patch11: ruby-2.5.0-parse.y-assignable_error.patch +# Recent tzdata change breaks Ruby test suite. +# https://bugs.ruby-lang.org/issues/14438 +Patch12: ruby-2.5.0-Disable-Tokyo-TZ-tests.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -523,6 +526,7 @@ rm -rf ext/fiddle/libffi* %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . From faaad7b7c55df8f0f145e9d2ee48257d2ec0a6c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 13 Feb 2018 15:04:28 +0100 Subject: [PATCH 500/529] Fix thread_safe test suite segfaults. --- ...5.0-st.c-retry-operations-if-rebuilt.patch | 602 ++++++++++++++++++ ruby.spec | 5 + 2 files changed, 607 insertions(+) create mode 100644 ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch diff --git a/ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch b/ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch new file mode 100644 index 0000000..1e8e3b6 --- /dev/null +++ b/ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch @@ -0,0 +1,602 @@ +From 4663c224fa6c925ce54af32fd1c1cbac9508f5ec Mon Sep 17 00:00:00 2001 +From: normal +Date: Tue, 13 Feb 2018 10:02:07 +0000 +Subject: [PATCH] st.c: retry operations if rebuilt + +Calling the .eql? and .hash methods during a Hash operation can +result in a thread switch or a signal handler to run: allowing +one execution context to rebuild the hash table while another is +still reading or writing the table. This results in a +use-after-free bug affecting the thread_safe-0.3.6 test suite +and likely other bugs. + +This bug did not affect users of commonly keys (String, Symbol, +Fixnum) as those are optimized to avoid method dispatch +for .eql? and .hash methods. + +A separate version of this change needs to be ported to Ruby 2.3.x +which had a different implementation of st.c but was affected +by the same bug. + +* st.c: Add comment about table rebuilding during comparison. + (DO_PTR_EQUAL_CHECK): New macro. + (REBUILT_TABLE_ENTRY_IND, REBUILT_TABLE_BIN_IND): New macros. + (find_entry, find_table_entry_ind, find_table_bin_ind): Use new + macros. Return the rebuild flag. + (find_table_bin_ptr_and_reserve): Ditto. + (st_lookup, st_get_key, st_insert, st_insert2): Retry the + operation if the table was rebuilt. + (st_general_delete, st_shift, st_update, st_general_foreach): + Ditto. + (st_rehash_linear, st_rehash_indexed): Use DO_PTR_EQUAL_CHECK. + Return the rebuild flag. + (st_rehash): Retry the operation if the table was rebuilt. + [ruby-core:85510] [Ruby trunk Bug#14357] + +Thanks to Vit Ondruch for reporting the bug. + +From: Vladimir Makarov + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + st.c | 258 ++++++++++++++++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 185 insertions(+), 73 deletions(-) + +diff --git a/st.c b/st.c +index 56ae30ce47..0c52e7a2ef 100644 +--- a/st.c ++++ b/st.c +@@ -90,6 +90,11 @@ + o To save more memory we use 8-, 16-, 32- and 64- bit indexes in + bins depending on the current hash table size. + ++ o The implementation takes into account that the table can be ++ rebuilt during hashing or comparison functions. It can happen if ++ the functions are implemented in Ruby and a thread switch occurs ++ during their execution. ++ + This implementation speeds up the Ruby hash table benchmarks in + average by more 40% on Intel Haswell CPU. + +@@ -174,6 +179,15 @@ static const struct st_hash_type type_strcasehash = { + #define PTR_EQUAL(tab, ptr, hash_val, key_) \ + ((ptr)->hash == (hash_val) && EQUAL((tab), (key_), (ptr)->key)) + ++/* As PRT_EQUAL only its result is returned in RES. REBUILT_P is set ++ up to TRUE if the table is rebuilt during the comparison. */ ++#define DO_PTR_EQUAL_CHECK(tab, ptr, hash_val, key, res, rebuilt_p) \ ++ do { \ ++ unsigned int _old_rebuilds_num = (tab)->rebuilds_num; \ ++ res = PTR_EQUAL(tab, ptr, hash_val, key); \ ++ rebuilt_p = _old_rebuilds_num != (tab)->rebuilds_num; \ ++ } while (FALSE) ++ + /* Features of a table. */ + struct st_features { + /* Power of 2 used for number of allocated entries. */ +@@ -380,6 +394,11 @@ set_bin(st_index_t *bins, int s, st_index_t n, st_index_t v) + #define UNDEFINED_ENTRY_IND (~(st_index_t) 0) + #define UNDEFINED_BIN_IND (~(st_index_t) 0) + ++/* Entry and bin values returned when we found a table rebuild during ++ the search. */ ++#define REBUILT_TABLE_ENTRY_IND (~(st_index_t) 1) ++#define REBUILT_TABLE_BIN_IND (~(st_index_t) 1) ++ + /* Mark I-th bin of table TAB as corresponding to a deleted table + entry. Update number of entries in the table and number of bins + corresponding to deleted entries. */ +@@ -823,17 +842,22 @@ secondary_hash(st_index_t ind, st_table *tab, st_index_t *perterb) + + /* Find an entry with HASH_VALUE and KEY in TABLE using a linear + search. Return the index of the found entry in array `entries`. +- If it is not found, return UNDEFINED_ENTRY_IND. */ ++ If it is not found, return UNDEFINED_ENTRY_IND. If the table was ++ rebuilt during the search, return REBUILT_TABLE_ENTRY_IND. */ + static inline st_index_t + find_entry(st_table *tab, st_hash_t hash_value, st_data_t key) + { ++ int eq_p, rebuilt_p; + st_index_t i, bound; + st_table_entry *entries; + + bound = tab->entries_bound; + entries = tab->entries; + for (i = tab->entries_start; i < bound; i++) { +- if (PTR_EQUAL(tab, &entries[i], hash_value, key)) ++ DO_PTR_EQUAL_CHECK(tab, &entries[i], hash_value, key, eq_p, rebuilt_p); ++ if (EXPECT(rebuilt_p, 0)) ++ return REBUILT_TABLE_ENTRY_IND; ++ if (eq_p) + return i; + } + return UNDEFINED_ENTRY_IND; +@@ -845,10 +869,12 @@ find_entry(st_table *tab, st_hash_t hash_value, st_data_t key) + /*#define QUADRATIC_PROBE*/ + + /* Return index of entry with HASH_VALUE and KEY in table TAB. If +- there is no such entry, return UNDEFINED_ENTRY_IND. */ ++ there is no such entry, return UNDEFINED_ENTRY_IND. If the table ++ was rebuilt during the search, return REBUILT_TABLE_ENTRY_IND. */ + static st_index_t + find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key) + { ++ int eq_p, rebuilt_p; + st_index_t ind; + #ifdef QUADRATIC_PROBE + st_index_t d; +@@ -869,10 +895,13 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key) + FOUND_BIN; + for (;;) { + bin = get_bin(tab->bins, get_size_ind(tab), ind); +- if (! EMPTY_OR_DELETED_BIN_P(bin) +- && PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key)) +- break; +- else if (EMPTY_BIN_P(bin)) ++ if (! EMPTY_OR_DELETED_BIN_P(bin)) { ++ DO_PTR_EQUAL_CHECK(tab, &entries[bin - ENTRY_BASE], hash_value, key, eq_p, rebuilt_p); ++ if (EXPECT(rebuilt_p, 0)) ++ return REBUILT_TABLE_ENTRY_IND; ++ if (eq_p) ++ break; ++ } else if (EMPTY_BIN_P(bin)) + return UNDEFINED_ENTRY_IND; + #ifdef QUADRATIC_PROBE + ind = hash_bin(ind + d, tab); +@@ -887,10 +916,12 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key) + + /* Find and return index of table TAB bin corresponding to an entry + with HASH_VALUE and KEY. If there is no such bin, return +- UNDEFINED_BIN_IND. */ ++ UNDEFINED_BIN_IND. If the table was rebuilt during the search, ++ return REBUILT_TABLE_BIN_IND. */ + static st_index_t + find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key) + { ++ int eq_p, rebuilt_p; + st_index_t ind; + #ifdef QUADRATIC_PROBE + st_index_t d; +@@ -911,10 +942,13 @@ find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key) + FOUND_BIN; + for (;;) { + bin = get_bin(tab->bins, get_size_ind(tab), ind); +- if (! EMPTY_OR_DELETED_BIN_P(bin) +- && PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key)) +- break; +- else if (EMPTY_BIN_P(bin)) ++ if (! EMPTY_OR_DELETED_BIN_P(bin)) { ++ DO_PTR_EQUAL_CHECK(tab, &entries[bin - ENTRY_BASE], hash_value, key, eq_p, rebuilt_p); ++ if (EXPECT(rebuilt_p, 0)) ++ return REBUILT_TABLE_BIN_IND; ++ if (eq_p) ++ break; ++ } else if (EMPTY_BIN_P(bin)) + return UNDEFINED_BIN_IND; + #ifdef QUADRATIC_PROBE + ind = hash_bin(ind + d, tab); +@@ -955,7 +989,7 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key) + bin = get_bin(tab->bins, get_size_ind(tab), ind); + if (EMPTY_OR_DELETED_BIN_P(bin)) + return ind; +- st_assert (! PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key)); ++ st_assert (entries[bin - ENTRY_BASE].hash != hash_value); + #ifdef QUADRATIC_PROBE + ind = hash_bin(ind + d, tab); + d++; +@@ -973,11 +1007,13 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key) + bigger entries array. Although we can reuse a deleted bin, the + result bin value is always empty if the table has no entry with + KEY. Return the entries array index of the found entry or +- UNDEFINED_ENTRY_IND if it is not found. */ ++ UNDEFINED_ENTRY_IND if it is not found. If the table was rebuilt ++ during the search, return REBUILT_TABLE_ENTRY_IND. */ + static st_index_t + find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value, + st_data_t key, st_index_t *bin_ind) + { ++ int eq_p, rebuilt_p; + st_index_t ind; + st_hash_t curr_hash_value = *hash_value; + #ifdef QUADRATIC_PROBE +@@ -1015,7 +1051,10 @@ find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value, + break; + } + else if (! DELETED_BIN_P(entry_index)) { +- if (PTR_EQUAL(tab, &entries[entry_index - ENTRY_BASE], curr_hash_value, key)) ++ DO_PTR_EQUAL_CHECK(tab, &entries[entry_index - ENTRY_BASE], curr_hash_value, key, eq_p, rebuilt_p); ++ if (EXPECT(rebuilt_p, 0)) ++ return REBUILT_TABLE_ENTRY_IND; ++ if (eq_p) + break; + } + else if (first_deleted_bin_ind == UNDEFINED_BIN_IND) +@@ -1040,13 +1079,18 @@ st_lookup(st_table *tab, st_data_t key, st_data_t *value) + st_index_t bin; + st_hash_t hash = do_hash(key, tab); + ++ retry: + if (tab->bins == NULL) { + bin = find_entry(tab, hash, key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + if (bin == UNDEFINED_ENTRY_IND) + return 0; + } + else { + bin = find_table_entry_ind(tab, hash, key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + if (bin == UNDEFINED_ENTRY_IND) + return 0; + bin -= ENTRY_BASE; +@@ -1064,13 +1108,18 @@ st_get_key(st_table *tab, st_data_t key, st_data_t *result) + st_index_t bin; + st_hash_t hash = do_hash(key, tab); + ++ retry: + if (tab->bins == NULL) { + bin = find_entry(tab, hash, key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + if (bin == UNDEFINED_ENTRY_IND) + return 0; + } + else { + bin = find_table_entry_ind(tab, hash, key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + if (bin == UNDEFINED_ENTRY_IND) + return 0; + bin -= ENTRY_BASE; +@@ -1104,10 +1153,13 @@ st_insert(st_table *tab, st_data_t key, st_data_t value) + st_index_t bin_ind; + int new_p; + +- rebuild_table_if_necessary(tab); + hash_value = do_hash(key, tab); ++ retry: ++ rebuild_table_if_necessary(tab); + if (tab->bins == NULL) { + bin = find_entry(tab, hash_value, key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + new_p = bin == UNDEFINED_ENTRY_IND; + if (new_p) + tab->num_entries++; +@@ -1116,6 +1168,8 @@ st_insert(st_table *tab, st_data_t key, st_data_t value) + else { + bin = find_table_bin_ptr_and_reserve(tab, &hash_value, + key, &bin_ind); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + new_p = bin == UNDEFINED_ENTRY_IND; + bin -= ENTRY_BASE; + } +@@ -1192,10 +1246,13 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, + st_index_t bin_ind; + int new_p; + +- rebuild_table_if_necessary (tab); + hash_value = do_hash(key, tab); ++ retry: ++ rebuild_table_if_necessary (tab); + if (tab->bins == NULL) { + bin = find_entry(tab, hash_value, key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + new_p = bin == UNDEFINED_ENTRY_IND; + if (new_p) + tab->num_entries++; +@@ -1204,6 +1261,8 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, + else { + bin = find_table_bin_ptr_and_reserve(tab, &hash_value, + key, &bin_ind); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + new_p = bin == UNDEFINED_ENTRY_IND; + bin -= ENTRY_BASE; + } +@@ -1212,7 +1271,6 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, + check = tab->rebuilds_num; + key = (*func)(key); + st_assert(check == tab->rebuilds_num); +- st_assert(do_hash(key, tab) == hash_value); + ind = tab->entries_bound++; + entry = &tab->entries[ind]; + entry->hash = hash_value; +@@ -1220,6 +1278,7 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, + entry->record = value; + if (bin_ind != UNDEFINED_BIN_IND) + set_bin(tab->bins, get_size_ind(tab), bin_ind, ind + ENTRY_BASE); ++ st_assert(do_hash(key, tab) == hash_value); + #ifdef ST_DEBUG + st_check(tab); + #endif +@@ -1281,8 +1340,11 @@ st_general_delete(st_table *tab, st_data_t *key, st_data_t *value) + + st_assert(tab != NULL); + hash = do_hash(*key, tab); ++ retry: + if (tab->bins == NULL) { + bin = find_entry(tab, hash, *key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + if (bin == UNDEFINED_ENTRY_IND) { + if (value != 0) *value = 0; + return 0; +@@ -1290,6 +1352,8 @@ st_general_delete(st_table *tab, st_data_t *key, st_data_t *value) + } + else { + bin_ind = find_table_bin_ind(tab, hash, *key); ++ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) ++ goto retry; + if (bin_ind == UNDEFINED_BIN_IND) { + if (value != 0) *value = 0; + return 0; +@@ -1344,21 +1408,33 @@ st_shift(st_table *tab, st_data_t *key, st_data_t *value) + for (i = tab->entries_start; i < bound; i++) { + curr_entry_ptr = &entries[i]; + if (! DELETED_ENTRY_P(curr_entry_ptr)) { ++ st_hash_t entry_hash = curr_entry_ptr->hash; ++ st_data_t entry_key = curr_entry_ptr->key; ++ + if (value != 0) *value = curr_entry_ptr->record; +- *key = curr_entry_ptr->key; ++ *key = entry_key; ++ retry: + if (tab->bins == NULL) { +- bin = find_entry(tab, curr_entry_ptr->hash, curr_entry_ptr->key); ++ bin = find_entry(tab, entry_hash, entry_key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) { ++ entries = tab->entries; ++ goto retry; ++ } + st_assert(bin != UNDEFINED_ENTRY_IND); +- st_assert(&entries[bin] == curr_entry_ptr); ++ curr_entry_ptr = &entries[bin]; + } + else { +- bin_ind = find_table_bin_ind(tab, curr_entry_ptr->hash, +- curr_entry_ptr->key); ++ bin_ind = find_table_bin_ind(tab, entry_hash, entry_key); ++ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) { ++ entries = tab->entries; ++ goto retry; ++ } + st_assert(bin_ind != UNDEFINED_BIN_IND); +- st_assert(&entries[get_bin(tab->bins, get_size_ind(tab), bin_ind) +- - ENTRY_BASE] == curr_entry_ptr); ++ curr_entry_ptr = &entries[get_bin(tab->bins, get_size_ind(tab), bin_ind) ++ - ENTRY_BASE]; + MARK_BIN_DELETED(tab, bin_ind); + } ++ st_assert(entry_hash != curr_entry_ptr->hash && entry_key == curr_entry_ptr->key); + MARK_ENTRY_DELETED(curr_entry_ptr); + tab->num_entries--; + update_range_for_deleted(tab, i); +@@ -1402,15 +1478,20 @@ st_update(st_table *tab, st_data_t key, + int retval, existing; + st_hash_t hash = do_hash(key, tab); + ++ retry: + entries = tab->entries; + if (tab->bins == NULL) { + bin = find_entry(tab, hash, key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + existing = bin != UNDEFINED_ENTRY_IND; + entry = &entries[bin]; + bin_ind = UNDEFINED_BIN_IND; + } + else { + bin_ind = find_table_bin_ind(tab, hash, key); ++ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) ++ goto retry; + existing = bin_ind != UNDEFINED_BIN_IND; + if (existing) { + bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE; +@@ -1489,14 +1570,19 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg, + hash = curr_entry_ptr->hash; + retval = (*func)(key, curr_entry_ptr->record, arg, 0); + if (rebuilds_num != tab->rebuilds_num) { ++ retry: + entries = tab->entries; + packed_p = tab->bins == NULL; + if (packed_p) { + i = find_entry(tab, hash, key); ++ if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + error_p = i == UNDEFINED_ENTRY_IND; + } + else { + i = find_table_entry_ind(tab, hash, key); ++ if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto retry; + error_p = i == UNDEFINED_ENTRY_IND; + i -= ENTRY_BASE; + } +@@ -1512,36 +1598,44 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg, + } + switch (retval) { + case ST_CONTINUE: +- break; ++ break; + case ST_CHECK: +- if (check_p) +- break; ++ if (check_p) ++ break; + case ST_STOP: + #ifdef ST_DEBUG +- st_check(tab); +-#endif +- return 0; +- case ST_DELETE: +- if (packed_p) { +- bin = find_entry(tab, hash, curr_entry_ptr->key); +- if (bin == UNDEFINED_ENTRY_IND) +- break; +- } +- else { +- bin_ind = find_table_bin_ind(tab, hash, curr_entry_ptr->key); +- if (bin_ind == UNDEFINED_BIN_IND) +- break; +- bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE; +- MARK_BIN_DELETED(tab, bin_ind); +- } +- st_assert(&entries[bin] == curr_entry_ptr); +- MARK_ENTRY_DELETED(curr_entry_ptr); +- tab->num_entries--; +- update_range_for_deleted(tab, bin); ++ st_check(tab); ++#endif ++ return 0; ++ case ST_DELETE: { ++ st_data_t key = curr_entry_ptr->key; ++ ++ again: ++ if (packed_p) { ++ bin = find_entry(tab, hash, key); ++ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) ++ goto again; ++ if (bin == UNDEFINED_ENTRY_IND) ++ break; ++ } ++ else { ++ bin_ind = find_table_bin_ind(tab, hash, key); ++ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) ++ goto again; ++ if (bin_ind == UNDEFINED_BIN_IND) ++ break; ++ bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE; ++ MARK_BIN_DELETED(tab, bin_ind); ++ } ++ curr_entry_ptr = &entries[bin]; ++ MARK_ENTRY_DELETED(curr_entry_ptr); ++ tab->num_entries--; ++ update_range_for_deleted(tab, bin); + #ifdef ST_DEBUG +- st_check(tab); ++ st_check(tab); + #endif +- break; ++ break; ++ } + } + } + #ifdef ST_DEBUG +@@ -2015,10 +2109,12 @@ st_expand_table(st_table *tab, st_index_t siz) + free(tmp); + } + +-/* Rehash using linear search. */ +-static void ++/* Rehash using linear search. Return TRUE if we found that the table ++ was rebuilt. */ ++static int + st_rehash_linear(st_table *tab) + { ++ int eq_p, rebuilt_p; + st_index_t i, j; + st_table_entry *p, *q; + if (tab->bins) { +@@ -2033,7 +2129,10 @@ st_rehash_linear(st_table *tab) + q = &tab->entries[j]; + if (DELETED_ENTRY_P(q)) + continue; +- if (PTR_EQUAL(tab, p, q->hash, q->key)) { ++ DO_PTR_EQUAL_CHECK(tab, p, q->hash, q->key, eq_p, rebuilt_p); ++ if (EXPECT(rebuilt_p, 0)) ++ return TRUE; ++ if (eq_p) { + st_assert(p < q); + *p = *q; + MARK_ENTRY_DELETED(q); +@@ -2042,12 +2141,15 @@ st_rehash_linear(st_table *tab) + } + } + } ++ return FALSE; + } + +-/* Rehash using index */ +-static void ++/* Rehash using index. Return TRUE if we found that the table was ++ rebuilt. */ ++static int + st_rehash_indexed(st_table *tab) + { ++ int eq_p, rebuilt_p; + st_index_t i; + st_index_t const n = bins_size(tab); + unsigned int const size_ind = get_size_ind(tab); +@@ -2076,26 +2178,32 @@ st_rehash_indexed(st_table *tab) + set_bin(bins, size_ind, ind, i + ENTRY_BASE); + break; + } +- else if (PTR_EQUAL(tab, q, p->hash, p->key)) { +- /* duplicated key; delete it */ +- st_assert(q < p); +- q->record = p->record; +- MARK_ENTRY_DELETED(p); +- tab->num_entries--; +- update_range_for_deleted(tab, bin); +- break; +- } + else { +- /* hash collision; skip it */ ++ DO_PTR_EQUAL_CHECK(tab, q, p->hash, p->key, eq_p, rebuilt_p); ++ if (EXPECT(rebuilt_p, 0)) ++ return TRUE; ++ if (eq_p) { ++ /* duplicated key; delete it */ ++ st_assert(q < p); ++ q->record = p->record; ++ MARK_ENTRY_DELETED(p); ++ tab->num_entries--; ++ update_range_for_deleted(tab, bin); ++ break; ++ } ++ else { ++ /* hash collision; skip it */ + #ifdef QUADRATIC_PROBE +- ind = hash_bin(ind + d, tab); +- d++; ++ ind = hash_bin(ind + d, tab); ++ d++; + #else +- ind = secondary_hash(ind, tab, &peterb); ++ ind = secondary_hash(ind, tab, &peterb); + #endif +- } ++ } ++ } + } + } ++ return FALSE; + } + + /* Reconstruct TAB's bins according to TAB's entries. This function +@@ -2104,10 +2212,14 @@ st_rehash_indexed(st_table *tab) + static void + st_rehash(st_table *tab) + { +- if (tab->bin_power <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS) +- st_rehash_linear(tab); +- else +- st_rehash_indexed(tab); ++ int rebuilt_p; ++ ++ do { ++ if (tab->bin_power <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS) ++ rebuilt_p = st_rehash_linear(tab); ++ else ++ rebuilt_p = st_rehash_indexed(tab); ++ } while (rebuilt_p); + } + + #ifdef RUBY +-- +2.16.1 + diff --git a/ruby.spec b/ruby.spec index 268aacd..734d363 100644 --- a/ruby.spec +++ b/ruby.spec @@ -142,6 +142,9 @@ Patch11: ruby-2.5.0-parse.y-assignable_error.patch # Recent tzdata change breaks Ruby test suite. # https://bugs.ruby-lang.org/issues/14438 Patch12: ruby-2.5.0-Disable-Tokyo-TZ-tests.patch +# Fix thread_safe tests suite segfaults. +# https://bugs.ruby-lang.org/issues/14357 +Patch13: ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -527,6 +530,7 @@ rm -rf ext/fiddle/libffi* %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1072,6 +1076,7 @@ make check TESTS="-v $DISABLE_TESTS" - Add GMP dependency. - Use 'with' operator in RPM dependency generator. - Add conflicts RPM generator. +- Fix thread_safe test suite segfaults. * Fri Feb 09 2018 Fedora Release Engineering - 2.5.0-89 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From d074784f335f06f214a515d4525470dbd60b7fee Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Sun, 18 Feb 2018 20:02:24 +0100 Subject: [PATCH 501/529] Fix invalid licenses. --- ruby.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index 734d363..d4399e4 100644 --- a/ruby.spec +++ b/ruby.spec @@ -289,7 +289,7 @@ Summary: A tool to generate HTML and command-line documentation for Ruby proj Version: %{rdoc_version} Group: Development/Libraries # SIL: lib/rdoc/generator/template/darkfish/css/fonts.css -License: GPLv2 and Ruby and MIT and SIL +License: GPLv2 and Ruby and MIT and OFL Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} @@ -322,7 +322,7 @@ This package contains documentation for %{name}. Summary: BigDecimal provides arbitrary-precision floating point decimal arithmetic Version: %{bigdecimal_version} Group: Development/Libraries -License: GPL+ or Artistic +License: Ruby or BSD Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Provides: rubygem(bigdecimal) = %{version}-%{release} @@ -1077,6 +1077,7 @@ make check TESTS="-v $DISABLE_TESTS" - Use 'with' operator in RPM dependency generator. - Add conflicts RPM generator. - Fix thread_safe test suite segfaults. +- Fix invalid licenses. * Fri Feb 09 2018 Fedora Release Engineering - 2.5.0-89 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild From 6ff97769223e5589f444efdc517952b76d47a7d3 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Wed, 21 Feb 2018 16:41:27 +0100 Subject: [PATCH 502/529] Add gcc to BuildRequires https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequire s_and_Requies --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index d4399e4..32222d1 100644 --- a/ruby.spec +++ b/ruby.spec @@ -169,6 +169,7 @@ BuildRequires: procps # Required to test hardening. %{?with_hardening_test:BuildRequires: %{_bindir}/checksec} BuildRequires: multilib-rpm-config +BuildRequires: gcc # This package provides %%{_bindir}/ruby-mri therefore it is marked by this # virtual provide. It can be installed as dependency of rubypick. From e3ea6478d9f0fc205ea7a33eb0e0affaa56f4266 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Wed, 21 Feb 2018 18:32:04 +0100 Subject: [PATCH 503/529] Fix: Multiple vulnerabilities in RubyGems https://bugzilla.redhat.com/show_bug.cgi?id=1547431 https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ * rubygems-2.5.0-multiple-vulnerabilities.patch --- ruby.spec | 12 +- rubygems-2.5.0-multiple-vulnerabilities.patch | 2349 +++++++++++++++++ 2 files changed, 2360 insertions(+), 1 deletion(-) create mode 100644 rubygems-2.5.0-multiple-vulnerabilities.patch diff --git a/ruby.spec b/ruby.spec index 32222d1..cfd0407 100644 --- a/ruby.spec +++ b/ruby.spec @@ -29,7 +29,7 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.7.3 +%global rubygems_version 2.7.6 %global molinillo_version 0.5.7 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. @@ -145,6 +145,10 @@ Patch12: ruby-2.5.0-Disable-Tokyo-TZ-tests.patch # Fix thread_safe tests suite segfaults. # https://bugs.ruby-lang.org/issues/14357 Patch13: ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch +# Fix: Multiple vulnerabilities in RubyGems +# https://bugzilla.redhat.com/show_bug.cgi?id=1547431 +# https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ +Patch14: rubygems-2.5.0-multiple-vulnerabilities.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -532,6 +536,7 @@ rm -rf ext/fiddle/libffi* %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p0 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1072,6 +1077,11 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Wed Feb 23 2018 Pavel Valena - 2.5.0-89 +- Fix: Multiple vulnerabilities in RubyGems + https://bugzilla.redhat.com/show_bug.cgi?id=1547431 + https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ + * Tue Feb 13 2018 V鱈t Ondruch - 2.5.0-89 - Drop obsolete ldconfig scriptlets. - Add GMP dependency. diff --git a/rubygems-2.5.0-multiple-vulnerabilities.patch b/rubygems-2.5.0-multiple-vulnerabilities.patch new file mode 100644 index 0000000..e32926a --- /dev/null +++ b/rubygems-2.5.0-multiple-vulnerabilities.patch @@ -0,0 +1,2349 @@ +diff --git lib/rubygems.rb lib/rubygems.rb +index 0475ced164..2762bfcb88 100644 +--- lib/rubygems.rb ++++ lib/rubygems.rb +@@ -10,7 +10,7 @@ + require 'thread' + + module Gem +- VERSION = "2.7.3" ++ VERSION = "2.7.6" + end + + # Must be first since it unloads the prelude from 1.9.2 +@@ -161,7 +161,7 @@ module Gem + # these are defined in Ruby 1.8.7, hence the need for this convoluted setup. + + READ_BINARY_ERRORS = begin +- read_binary_errors = [Errno::EACCES, Errno::EROFS] ++ read_binary_errors = [Errno::EACCES, Errno::EROFS, Errno::ENOSYS] + read_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) + read_binary_errors + end.freeze +@@ -171,7 +171,7 @@ module Gem + # these are defined in Ruby 1.8.7. + + WRITE_BINARY_ERRORS = begin +- write_binary_errors = [] ++ write_binary_errors = [Errno::ENOSYS] + write_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) + write_binary_errors + end.freeze +@@ -871,19 +871,19 @@ def self.refresh + # Safely read a file in binary mode on all platforms. + + def self.read_binary(path) +- open path, 'rb+' do |f| ++ File.open path, 'rb+' do |f| + f.flock(File::LOCK_EX) + f.read + end + rescue *READ_BINARY_ERRORS +- open path, 'rb' do |f| ++ File.open path, 'rb' do |f| + f.read + end + rescue Errno::ENOLCK # NFS + if Thread.main != Thread.current + raise + else +- open path, 'rb' do |f| ++ File.open path, 'rb' do |f| + f.read + end + end +diff --git lib/rubygems/commands/generate_index_command.rb lib/rubygems/commands/generate_index_command.rb +index 01f1f88405..0b677b73a9 100644 +--- lib/rubygems/commands/generate_index_command.rb ++++ lib/rubygems/commands/generate_index_command.rb +@@ -68,7 +68,7 @@ def execute + + if not File.exist?(options[:directory]) or + not File.directory?(options[:directory]) then +- alert_error "unknown directory name #{directory}." ++ alert_error "unknown directory name #{options[:directory]}." + terminate_interaction 1 + else + indexer = Gem::Indexer.new options.delete(:directory), options +diff --git lib/rubygems/commands/owner_command.rb lib/rubygems/commands/owner_command.rb +index 8e2271657a..637b5bdc4d 100644 +--- lib/rubygems/commands/owner_command.rb ++++ lib/rubygems/commands/owner_command.rb +@@ -64,7 +64,7 @@ def show_owners name + end + + with_response response do |resp| +- owners = YAML.load resp.body ++ owners = Gem::SafeYAML.load resp.body + + say "Owners for gem: #{name}" + owners.each do |owner| +diff --git lib/rubygems/commands/setup_command.rb lib/rubygems/commands/setup_command.rb +index 5d1414d102..6966cde01a 100644 +--- lib/rubygems/commands/setup_command.rb ++++ lib/rubygems/commands/setup_command.rb +@@ -350,7 +350,9 @@ def fake_spec.full_gem_path + def install_default_bundler_gem + return unless Gem::USE_BUNDLER_FOR_GEMDEPS + +- mkdir_p Gem::Specification.default_specifications_dir ++ specs_dir = Gem::Specification.default_specifications_dir ++ File.join(options[:destdir], specs_dir) unless Gem.win_platform? ++ mkdir_p specs_dir + + # Workaround for non-git environment. + gemspec = File.open('bundler/bundler.gemspec', 'rb'){|f| f.read.gsub(/`git ls-files -z`/, "''") } +@@ -359,23 +361,36 @@ def install_default_bundler_gem + bundler_spec = Gem::Specification.load("bundler/bundler.gemspec") + bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] } + bundler_spec.executables -= %w[bundler bundle_ruby] +- Dir.entries(Gem::Specification.default_specifications_dir). ++ ++ # Remove bundler-*.gemspec in default specification directory. ++ Dir.entries(specs_dir). + select {|gs| gs.start_with?("bundler-") }. +- each {|gs| File.delete(File.join(Gem::Specification.default_specifications_dir, gs)) } ++ each {|gs| File.delete(File.join(specs_dir, gs)) } + +- default_spec_path = File.join(Gem::Specification.default_specifications_dir, "#{bundler_spec.full_name}.gemspec") ++ default_spec_path = File.join(specs_dir, "#{bundler_spec.full_name}.gemspec") + Gem.write_binary(default_spec_path, bundler_spec.to_ruby) + + bundler_spec = Gem::Specification.load(default_spec_path) + ++ # Remove gemspec that was same version of vendored bundler. ++ normal_gemspec = File.join(Gem.default_dir, "specifications", "bundler-#{bundler_spec.version}.gemspec") ++ if File.file? normal_gemspec ++ File.delete normal_gemspec ++ end ++ ++ # Remove gem files that were same version of vendored bundler. + if File.directory? bundler_spec.gems_dir + Dir.entries(bundler_spec.gems_dir). +- select {|default_gem| File.basename(default_gem).match(/^bundler-#{Gem::Version::VERSION_PATTERN}$/) }. ++ select {|default_gem| File.basename(default_gem) == "bundler-#{bundler_spec.version}" }. + each {|default_gem| rm_r File.join(bundler_spec.gems_dir, default_gem) } + end + +- mkdir_p bundler_spec.bin_dir +- bundler_spec.executables.each {|e| cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_spec.bin_dir, e) } ++ bundler_bin_dir = File.join(Gem.default_dir, 'gems', bundler_spec.full_name, bundler_spec.bindir) ++ File.join(options[:destdir], bundler_bin_dir) unless Gem.win_platform? ++ mkdir_p bundler_bin_dir ++ bundler_spec.executables.each do |e| ++ cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_bin_dir, e) ++ end + + if Gem.win_platform? + require 'rubygems/installer' +diff --git lib/rubygems/commands/unpack_command.rb lib/rubygems/commands/unpack_command.rb +index eb7f550673..b873f20d28 100644 +--- lib/rubygems/commands/unpack_command.rb ++++ lib/rubygems/commands/unpack_command.rb +@@ -94,7 +94,7 @@ def execute + + spec_file = File.basename spec.spec_file + +- open spec_file, 'w' do |io| ++ File.open spec_file, 'w' do |io| + io.write metadata + end + else +@@ -176,7 +176,7 @@ def get_metadata path, security_policy = nil + + metadata = nil + +- open path, Gem.binary_mode do |io| ++ File.open path, Gem.binary_mode do |io| + tar = Gem::Package::TarReader.new io + tar.each_entry do |entry| + case entry.full_name +diff --git lib/rubygems/config_file.rb lib/rubygems/config_file.rb +index a4efed0f5a..c0d19dbfc2 100644 +--- lib/rubygems/config_file.rb ++++ lib/rubygems/config_file.rb +@@ -458,7 +458,7 @@ def to_yaml # :nodoc: + + # Writes out this config file, replacing its source. + def write +- open config_file_name, 'w' do |io| ++ File.open config_file_name, 'w' do |io| + io.write to_yaml + end + end +diff --git lib/rubygems/ext/builder.rb lib/rubygems/ext/builder.rb +index a1619c97d7..eb9db199d5 100644 +--- lib/rubygems/ext/builder.rb ++++ lib/rubygems/ext/builder.rb +@@ -212,7 +212,7 @@ def write_gem_make_out output # :nodoc: + + FileUtils.mkdir_p @spec.extension_dir + +- open destination, 'wb' do |io| io.puts output end ++ File.open destination, 'wb' do |io| io.puts output end + + destination + end +diff --git lib/rubygems/indexer.rb lib/rubygems/indexer.rb +index 871cc09d8d..3ea994414b 100644 +--- lib/rubygems/indexer.rb ++++ lib/rubygems/indexer.rb +@@ -2,6 +2,7 @@ + require 'rubygems' + require 'rubygems/package' + require 'time' ++require 'tmpdir' + + begin + gem 'builder' +@@ -64,7 +65,7 @@ def initialize(directory, options = {}) + @build_modern = options[:build_modern] + + @dest_directory = directory +- @directory = File.join(Dir.tmpdir, "gem_generate_index_#{$$}") ++ @directory = Dir.mktmpdir 'gem_generate_index' + + marshal_name = "Marshal.#{Gem.marshal_version}" + +@@ -123,7 +124,7 @@ def build_marshal_gemspecs specs + marshal_name = File.join @quick_marshal_dir, spec_file_name + + marshal_zipped = Gem.deflate Marshal.dump(spec) +- open marshal_name, 'wb' do |io| io.write marshal_zipped end ++ File.open marshal_name, 'wb' do |io| io.write marshal_zipped end + + files << marshal_name + +@@ -261,7 +262,7 @@ def compress(filename, extension) + + zipped = Gem.deflate data + +- open "#{filename}.#{extension}", 'wb' do |io| ++ File.open "#{filename}.#{extension}", 'wb' do |io| + io.write zipped + end + end +@@ -427,7 +428,7 @@ def update_specs_index(index, source, dest) + + specs_index = compact_specs specs_index.uniq.sort + +- open dest, 'wb' do |io| ++ File.open dest, 'wb' do |io| + Marshal.dump specs_index, io + end + end +diff --git lib/rubygems/installer.rb lib/rubygems/installer.rb +index 0cbca0791b..ee5fedeb64 100644 +--- lib/rubygems/installer.rb ++++ lib/rubygems/installer.rb +@@ -206,7 +206,7 @@ def check_executable_overwrite filename # :nodoc: + ruby_executable = false + existing = nil + +- open generated_bin, 'rb' do |io| ++ File.open generated_bin, 'rb' do |io| + next unless io.gets =~ /^#!/ # shebang + io.gets # blankline + +@@ -427,7 +427,7 @@ def default_spec_file + # specifications directory. + + def write_spec +- open spec_file, 'w' do |file| ++ File.open spec_file, 'w' do |file| + spec.installed_by_version = Gem.rubygems_version + + file.puts spec.to_ruby_for_cache +@@ -464,7 +464,12 @@ def generate_windows_script(filename, bindir) + def generate_bin # :nodoc: + return if spec.executables.nil? or spec.executables.empty? + +- Dir.mkdir @bin_dir unless File.exist? @bin_dir ++ begin ++ Dir.mkdir @bin_dir ++ rescue SystemCallError ++ raise unless File.directory? @bin_dir ++ end ++ + raise Gem::FilePermissionError.new(@bin_dir) unless File.writable? @bin_dir + + spec.executables.each do |filename| +@@ -863,7 +868,7 @@ def write_build_info_file + + build_info_file = File.join build_info_dir, "#{spec.full_name}.info" + +- open build_info_file, 'w' do |io| ++ File.open build_info_file, 'w' do |io| + @build_args.each do |arg| + io.puts arg + end +diff --git lib/rubygems/package.rb lib/rubygems/package.rb +index 77811ed5ec..b924122827 100644 +--- lib/rubygems/package.rb ++++ lib/rubygems/package.rb +@@ -219,7 +219,7 @@ def add_files tar # :nodoc: + next unless stat.file? + + tar.add_file_simple file, stat.mode, stat.size do |dst_io| +- open file, 'rb' do |src_io| ++ File.open file, 'rb' do |src_io| + dst_io.write src_io.read 16384 until src_io.eof? + end + end +@@ -378,9 +378,9 @@ def extract_tar_gz io, destination_dir, pattern = "*" # :nodoc: + File.dirname destination + end + +- FileUtils.mkdir_p mkdir, mkdir_options ++ mkdir_p_safe mkdir, mkdir_options, destination_dir, entry.full_name + +- open destination, 'wb' do |out| ++ File.open destination, 'wb' do |out| + out.write entry.read + FileUtils.chmod entry.header.mode, destination + end if entry.file? +@@ -416,20 +416,35 @@ def install_location filename, destination_dir # :nodoc: + raise Gem::Package::PathError.new(filename, destination_dir) if + filename.start_with? '/' + +- destination_dir = File.realpath destination_dir if +- File.respond_to? :realpath ++ destination_dir = realpath destination_dir + destination_dir = File.expand_path destination_dir + + destination = File.join destination_dir, filename + destination = File.expand_path destination + + raise Gem::Package::PathError.new(destination, destination_dir) unless +- destination.start_with? destination_dir ++ destination.start_with? destination_dir + '/' + + destination.untaint + destination + end + ++ def mkdir_p_safe mkdir, mkdir_options, destination_dir, file_name ++ destination_dir = realpath File.expand_path(destination_dir) ++ parts = mkdir.split(File::SEPARATOR) ++ parts.reduce do |path, basename| ++ path = realpath path unless path == "" ++ path = File.expand_path(path + File::SEPARATOR + basename) ++ lstat = File.lstat path rescue nil ++ if !lstat || !lstat.directory? ++ unless path.start_with? destination_dir and (FileUtils.mkdir path, mkdir_options rescue false) ++ raise Gem::Package::PathError.new(file_name, destination_dir) ++ end ++ end ++ path ++ end ++ end ++ + ## + # Loads a Gem::Specification from the TarEntry +entry+ + +@@ -603,6 +618,10 @@ def verify_files gem + raise Gem::Package::FormatError.new \ + 'package content (data.tar.gz) is missing', @gem + end ++ ++ if duplicates = @files.group_by {|f| f }.select {|k,v| v.size > 1 }.map(&:first) and duplicates.any? ++ raise Gem::Security::Exception, "duplicate files in the package: (#{duplicates.map(&:inspect).join(', ')})" ++ end + end + + ## +@@ -616,6 +635,16 @@ def verify_gz entry # :nodoc: + raise Gem::Package::FormatError.new(e.message, entry.full_name) + end + ++ if File.respond_to? :realpath ++ def realpath file ++ File.realpath file ++ end ++ else ++ def realpath file ++ file ++ end ++ end ++ + end + + require 'rubygems/package/digest_io' +diff --git lib/rubygems/package/file_source.rb lib/rubygems/package/file_source.rb +index 1a4dc4c824..ecc3a68677 100644 +--- lib/rubygems/package/file_source.rb ++++ lib/rubygems/package/file_source.rb +@@ -23,11 +23,11 @@ def present? + end + + def with_write_io &block +- open path, 'wb', &block ++ File.open path, 'wb', &block + end + + def with_read_io &block +- open path, 'rb', &block ++ File.open path, 'rb', &block + end + + end +diff --git lib/rubygems/package/old.rb lib/rubygems/package/old.rb +index f6e6e67c38..322d682ca8 100644 +--- lib/rubygems/package/old.rb ++++ lib/rubygems/package/old.rb +@@ -80,7 +80,7 @@ def extract_files destination_dir + + FileUtils.mkdir_p File.dirname destination + +- open destination, 'wb', entry['mode'] do |out| ++ File.open destination, 'wb', entry['mode'] do |out| + out.write file_data + end + +diff --git lib/rubygems/package/tar_header.rb lib/rubygems/package/tar_header.rb +index c54bd14d57..d557357114 100644 +--- lib/rubygems/package/tar_header.rb ++++ lib/rubygems/package/tar_header.rb +@@ -104,25 +104,30 @@ def self.from(stream) + fields = header.unpack UNPACK_FORMAT + + new :name => fields.shift, +- :mode => fields.shift.oct, +- :uid => fields.shift.oct, +- :gid => fields.shift.oct, +- :size => fields.shift.oct, +- :mtime => fields.shift.oct, +- :checksum => fields.shift.oct, ++ :mode => strict_oct(fields.shift), ++ :uid => strict_oct(fields.shift), ++ :gid => strict_oct(fields.shift), ++ :size => strict_oct(fields.shift), ++ :mtime => strict_oct(fields.shift), ++ :checksum => strict_oct(fields.shift), + :typeflag => fields.shift, + :linkname => fields.shift, + :magic => fields.shift, +- :version => fields.shift.oct, ++ :version => strict_oct(fields.shift), + :uname => fields.shift, + :gname => fields.shift, +- :devmajor => fields.shift.oct, +- :devminor => fields.shift.oct, ++ :devmajor => strict_oct(fields.shift), ++ :devminor => strict_oct(fields.shift), + :prefix => fields.shift, + + :empty => empty + end + ++ def self.strict_oct(str) ++ return str.oct if str =~ /\A[0-7]*\z/ ++ raise ArgumentError, "#{str.inspect} is not an octal string" ++ end ++ + ## + # Creates a new TarHeader using +vals+ + +diff --git lib/rubygems/package/tar_writer.rb lib/rubygems/package/tar_writer.rb +index f68b8d4c5e..390f7851a3 100644 +--- lib/rubygems/package/tar_writer.rb ++++ lib/rubygems/package/tar_writer.rb +@@ -196,6 +196,8 @@ def add_file_signed name, mode, signer + digest_name == signer.digest_name + end + ++ raise "no #{signer.digest_name} in #{digests.values.compact}" unless signature_digest ++ + if signer.key then + signature = signer.sign signature_digest.digest + +diff --git lib/rubygems/request_set/lockfile.rb lib/rubygems/request_set/lockfile.rb +index 7f6eadb939..76ad17d486 100644 +--- lib/rubygems/request_set/lockfile.rb ++++ lib/rubygems/request_set/lockfile.rb +@@ -223,7 +223,7 @@ def to_s + def write + content = to_s + +- open "#{@gem_deps_file}.lock", 'w' do |io| ++ File.open "#{@gem_deps_file}.lock", 'w' do |io| + io.write content + end + end +diff --git lib/rubygems/security.rb lib/rubygems/security.rb +index 4690dd9230..236577c5a3 100644 +--- lib/rubygems/security.rb ++++ lib/rubygems/security.rb +@@ -578,7 +578,7 @@ def self.trusted_certificates &block + def self.write pemmable, path, permissions = 0600, passphrase = nil, cipher = KEY_CIPHER + path = File.expand_path path + +- open path, 'wb', permissions do |io| ++ File.open path, 'wb', permissions do |io| + if passphrase and cipher + io.write pemmable.to_pem cipher, passphrase + else +diff --git lib/rubygems/security/trust_dir.rb lib/rubygems/security/trust_dir.rb +index bf44975cc6..849cf3cd3e 100644 +--- lib/rubygems/security/trust_dir.rb ++++ lib/rubygems/security/trust_dir.rb +@@ -93,7 +93,7 @@ def trust_cert certificate + + destination = cert_path certificate + +- open destination, 'wb', @permissions[:trusted_cert] do |io| ++ File.open destination, 'wb', @permissions[:trusted_cert] do |io| + io.write certificate.to_pem + end + end +diff --git lib/rubygems/server.rb lib/rubygems/server.rb +index 93b3af36f8..62c3dfe9cf 100644 +--- lib/rubygems/server.rb ++++ lib/rubygems/server.rb +@@ -623,6 +623,18 @@ def root(req, res) + executables = nil if executables.empty? + executables.last["is_last"] = true if executables + ++ # Pre-process spec homepage for safety reasons ++ begin ++ homepage_uri = URI.parse(spec.homepage) ++ if [URI::HTTP, URI::HTTPS].member? homepage_uri.class ++ homepage_uri = spec.homepage ++ else ++ homepage_uri = "." ++ end ++ rescue URI::InvalidURIError ++ homepage_uri = "." ++ end ++ + specs << { + "authors" => spec.authors.sort.join(", "), + "date" => spec.date.to_s, +@@ -632,7 +644,7 @@ def root(req, res) + "only_one_executable" => (executables && executables.size == 1), + "full_name" => spec.full_name, + "has_deps" => !deps.empty?, +- "homepage" => spec.homepage, ++ "homepage" => homepage_uri, + "name" => spec.name, + "rdoc_installed" => Gem::RDoc.new(spec).rdoc_installed?, + "ri_installed" => Gem::RDoc.new(spec).ri_installed?, +diff --git lib/rubygems/source.rb lib/rubygems/source.rb +index bd84c217a7..b28b850660 100644 +--- lib/rubygems/source.rb ++++ lib/rubygems/source.rb +@@ -160,7 +160,7 @@ def fetch_spec name_tuple + if update_cache? then + FileUtils.mkdir_p cache_dir + +- open local_spec, 'wb' do |io| ++ File.open local_spec, 'wb' do |io| + io.write spec + end + end +diff --git lib/rubygems/specification.rb lib/rubygems/specification.rb +index efc08c4738..2560324b7a 100644 +--- lib/rubygems/specification.rb ++++ lib/rubygems/specification.rb +@@ -15,6 +15,7 @@ + require 'rubygems/stub_specification' + require 'rubygems/util/list' + require 'stringio' ++require 'uri' + + ## + # The Specification class contains the information for a Gem. Typically +@@ -2822,10 +2823,16 @@ def validate packaging = true + raise Gem::InvalidSpecificationException, "#{lazy} is not a summary" + end + +- if homepage and not homepage.empty? and +- homepage !~ /\A[a-z][a-z\d+.-]*:/i then +- raise Gem::InvalidSpecificationException, +- "\"#{homepage}\" is not a URI" ++ # Make sure a homepage is valid HTTP/HTTPS URI ++ if homepage and not homepage.empty? ++ begin ++ homepage_uri = URI.parse(homepage) ++ unless [URI::HTTP, URI::HTTPS].member? homepage_uri.class ++ raise Gem::InvalidSpecificationException, "\"#{homepage}\" is not a valid HTTP URI" ++ end ++ rescue URI::InvalidURIError ++ raise Gem::InvalidSpecificationException, "\"#{homepage}\" is not a valid HTTP URI" ++ end + end + + # Warnings +diff --git lib/rubygems/stub_specification.rb lib/rubygems/stub_specification.rb +index 8337375ab4..ae2effbc84 100644 +--- lib/rubygems/stub_specification.rb ++++ lib/rubygems/stub_specification.rb +@@ -113,6 +113,8 @@ def data + unless @data + begin + saved_lineno = $. ++ ++ # TODO It should be use `File.open`, but bundler-1.16.1 example expects Kernel#open. + open loaded_from, OPEN_MODE do |file| + begin + file.readline # discard encoding line +diff --git lib/rubygems/test_case.rb lib/rubygems/test_case.rb +index f7f216e5e3..39aa4fc9a7 100644 +--- lib/rubygems/test_case.rb ++++ lib/rubygems/test_case.rb +@@ -488,7 +488,7 @@ def git_gem name = 'a', version = 1 + + gemspec = "#{name}.gemspec" + +- open File.join(directory, gemspec), 'w' do |io| ++ File.open File.join(directory, gemspec), 'w' do |io| + io.write git_spec.to_ruby + end + +@@ -592,7 +592,7 @@ def mu_pp(obj) + # Reads a Marshal file at +path+ + + def read_cache(path) +- open path.dup.untaint, 'rb' do |io| ++ File.open path.dup.untaint, 'rb' do |io| + Marshal.load io.read + end + end +@@ -612,7 +612,7 @@ def write_file(path) + dir = File.dirname path + FileUtils.mkdir_p dir unless File.directory? dir + +- open path, 'wb' do |io| ++ File.open path, 'wb' do |io| + yield io if block_given? + end + +@@ -727,7 +727,7 @@ def install_default_gems(*specs) + install_default_specs(*specs) + + specs.each do |spec| +- open spec.loaded_from, 'w' do |io| ++ File.open spec.loaded_from, 'w' do |io| + io.write spec.to_ruby_for_cache + end + end +@@ -1363,7 +1363,7 @@ def save_gemspec name = 'a', version = 1, directory = '.' + yield specification if block_given? + end + +- open File.join(directory, "#{name}.gemspec"), 'w' do |io| ++ File.open File.join(directory, "#{name}.gemspec"), 'w' do |io| + io.write vendor_spec.to_ruby + end + +diff --git lib/rubygems/test_utilities.rb lib/rubygems/test_utilities.rb +index 686916ea02..83c9d2d0fe 100644 +--- lib/rubygems/test_utilities.rb ++++ lib/rubygems/test_utilities.rb +@@ -346,7 +346,7 @@ def spec name, version, dependencies = nil, &block + end + + def write_spec spec # :nodoc: +- open spec.spec_file, 'w' do |io| ++ File.open spec.spec_file, 'w' do |io| + io.write spec.to_ruby_for_cache + end + end +diff --git lib/rubygems/util.rb lib/rubygems/util.rb +index 2de45c900b..6c75910004 100644 +--- lib/rubygems/util.rb ++++ lib/rubygems/util.rb +@@ -114,7 +114,8 @@ def self.traverse_parents directory, &block + + here = File.expand_path directory + loop do +- Dir.chdir here, &block ++ Dir.chdir here, &block rescue Errno::EACCES ++ + new_here = File.expand_path('..', here) + return if new_here == here # toplevel + here = new_here +diff --git lib/rubygems/validator.rb lib/rubygems/validator.rb +index 83448229bb..6842e4fa9c 100644 +--- lib/rubygems/validator.rb ++++ lib/rubygems/validator.rb +@@ -34,7 +34,7 @@ def verify_gem(gem_data) + # gem_path:: [String] Path to gem file + + def verify_gem_file(gem_path) +- open gem_path, Gem.binary_mode do |file| ++ File.open gem_path, Gem.binary_mode do |file| + gem_data = file.read + verify_gem gem_data + end +@@ -109,7 +109,7 @@ def alien(gems=[]) + + good, gone, unreadable = nil, nil, nil, nil + +- open gem_path, Gem.binary_mode do |file| ++ File.open gem_path, Gem.binary_mode do |file| + package = Gem::Package.new gem_path + + good, gone = package.contents.partition { |file_name| +@@ -134,7 +134,7 @@ def alien(gems=[]) + + source = File.join gem_directory, entry['path'] + +- open source, Gem.binary_mode do |f| ++ File.open source, Gem.binary_mode do |f| + unless f.read == data then + errors[gem_name][entry['path']] = "Modified from original" + end +diff --git test/rubygems/test_gem.rb test/rubygems/test_gem.rb +index 8a11cc2ecf..183771f0f3 100644 +--- test/rubygems/test_gem.rb ++++ test/rubygems/test_gem.rb +@@ -7,7 +7,7 @@ + require 'tmpdir' + + # TODO: push this up to test_case.rb once battle tested +-$SAFE=1 ++ + $LOAD_PATH.map! do |path| + path.dup.untaint + end +@@ -463,7 +463,7 @@ def test_self_ensure_gem_directories_missing_parents + assert File.directory?(util_cache_dir) + end + +- unless win_platform? then # only for FS that support write protection ++ unless win_platform? || Process.uid.zero? then # only for FS that support write protection + def test_self_ensure_gem_directories_write_protected + gemdir = File.join @tempdir, "egd" + FileUtils.rm_r gemdir rescue nil +@@ -775,7 +775,7 @@ def test_self_prefix_sitelibdir + end + + def test_self_read_binary +- open 'test', 'w' do |io| ++ File.open 'test', 'w' do |io| + io.write "\xCF\x80" + end + +@@ -1643,7 +1643,7 @@ def test_use_gemdeps + spec = Gem::Specification.find { |s| s == spec } + refute spec.activated? + +- open gem_deps_file, 'w' do |io| ++ File.open gem_deps_file, 'w' do |io| + io.write 'gem "a"' + end + +@@ -1662,7 +1662,7 @@ def test_use_gemdeps_ENV + + refute spec.activated? + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.write 'gem "a"' + end + +@@ -1706,7 +1706,7 @@ def test_use_gemdeps_automatic + + refute spec.activated? + +- open 'Gemfile', 'w' do |io| ++ File.open 'Gemfile', 'w' do |io| + io.write 'gem "a"' + end + +@@ -1735,7 +1735,7 @@ def test_use_gemdeps_disabled + + refute spec.activated? + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.write 'gem "a"' + end + +@@ -1750,7 +1750,7 @@ def test_use_gemdeps_missing_gem + skip 'Insecure operation - read' if RUBY_VERSION <= "1.8.7" + rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], 'x' + +- open 'x', 'w' do |io| ++ File.open 'x', 'w' do |io| + io.write 'gem "a"' + end + +@@ -1791,7 +1791,7 @@ def test_use_gemdeps_specific + spec = Gem::Specification.find { |s| s == spec } + refute spec.activated? + +- open 'x', 'w' do |io| ++ File.open 'x', 'w' do |io| + io.write 'gem "a"' + end + +diff --git test/rubygems/test_gem_commands_cleanup_command.rb test/rubygems/test_gem_commands_cleanup_command.rb +index c55e195975..60d208fcc0 100644 +--- test/rubygems/test_gem_commands_cleanup_command.rb ++++ test/rubygems/test_gem_commands_cleanup_command.rb +@@ -158,7 +158,7 @@ def test_execute_all_user_no_sudo + assert_path_exists @a_1_1.gem_dir + ensure + FileUtils.chmod 0755, @gemhome +- end unless win_platform? ++ end unless win_platform? || Process.uid.zero? + + def test_execute_dry_run + @cmd.options[:args] = %w[a] +diff --git test/rubygems/test_gem_commands_install_command.rb test/rubygems/test_gem_commands_install_command.rb +index dd86a85038..822d40e3f3 100644 +--- test/rubygems/test_gem_commands_install_command.rb ++++ test/rubygems/test_gem_commands_install_command.rb +@@ -131,6 +131,7 @@ def test_execute_local_transitive_prerelease + + def test_execute_no_user_install + skip 'skipped on MS Windows (chmod has no effect)' if win_platform? ++ skip 'skipped in root privilege' if Process.uid.zero? + + specs = spec_fetcher do |fetcher| + fetcher.gem 'a', 2 +diff --git test/rubygems/test_gem_commands_owner_command.rb test/rubygems/test_gem_commands_owner_command.rb +index 44652c1093..53cac4ce87 100644 +--- test/rubygems/test_gem_commands_owner_command.rb ++++ test/rubygems/test_gem_commands_owner_command.rb +@@ -43,6 +43,31 @@ def test_show_owners + assert_match %r{- 4}, @ui.output + end + ++ def test_show_owners_dont_load_objects ++ skip "testing a psych-only API" unless defined?(::Psych::DisallowedClass) ++ ++ response = < 0 +- assert Gem::Specification.find_all_by_name('x').length == 0 ++ assert Gem::Specification.find_all_by_name('x').length.zero? + end + + def test_execute_all +diff --git test/rubygems/test_gem_dependency_installer.rb test/rubygems/test_gem_dependency_installer.rb +index e55cc75682..3d76291668 100644 +--- test/rubygems/test_gem_dependency_installer.rb ++++ test/rubygems/test_gem_dependency_installer.rb +@@ -424,7 +424,7 @@ def test_install_dependency_existing_extension + extconf_rb = File.join @gemhome, 'gems', 'e-1', 'extconf.rb' + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |io| ++ File.open extconf_rb, 'w' do |io| + io.write <<-EXTCONF_RB + require 'mkmf' + create_makefile 'e' +diff --git test/rubygems/test_gem_doctor.rb test/rubygems/test_gem_doctor.rb +index 39b8a11692..8db65d70ce 100644 +--- test/rubygems/test_gem_doctor.rb ++++ test/rubygems/test_gem_doctor.rb +@@ -24,7 +24,7 @@ def test_doctor + + FileUtils.rm b.spec_file + +- open c.spec_file, 'w' do |io| ++ File.open c.spec_file, 'w' do |io| + io.write 'this will raise an exception when evaluated.' + end + +@@ -77,7 +77,7 @@ def test_doctor_dry_run + + FileUtils.rm b.spec_file + +- open c.spec_file, 'w' do |io| ++ File.open c.spec_file, 'w' do |io| + io.write 'this will raise an exception when evaluated.' + end + +diff --git test/rubygems/test_gem_ext_builder.rb test/rubygems/test_gem_ext_builder.rb +index d142ef28da..3dabd3e350 100644 +--- test/rubygems/test_gem_ext_builder.rb ++++ test/rubygems/test_gem_ext_builder.rb +@@ -32,7 +32,7 @@ def test_class_make + results = [] + + Dir.chdir @ext do +- open 'Makefile', 'w' do |io| ++ File.open 'Makefile', 'w' do |io| + io.puts <<-MAKEFILE + all: + \t@#{Gem.ruby} -e "puts %Q{all: \#{ENV['DESTDIR']}}" +@@ -72,7 +72,7 @@ def test_class_make_no_clean + results = [] + + Dir.chdir @ext do +- open 'Makefile', 'w' do |io| ++ File.open 'Makefile', 'w' do |io| + io.puts <<-MAKEFILE + all: + \t@#{Gem.ruby} -e "puts %Q{all: \#{ENV['DESTDIR']}}" +@@ -107,7 +107,7 @@ def test_build_extensions + + extconf_rb = File.join ext_dir, 'extconf.rb' + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' + require 'mkmf' + +@@ -168,7 +168,7 @@ def Gem.install_extension_in_lib + + extconf_rb = File.join ext_dir, 'extconf.rb' + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' + require 'mkmf' + +@@ -290,7 +290,7 @@ def test_build_extensions_with_build_args + + FileUtils.mkdir_p @spec.gem_dir + +- open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| ++ File.open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| + f.write <<-'RUBY' + puts "IN EXTCONF" + extconf_args = File.join File.dirname(__FILE__), 'extconf_args' +@@ -323,7 +323,7 @@ def test_initialize + + build_info_file = File.join build_info_dir, "#{@spec.full_name}.info" + +- open build_info_file, 'w' do |io| ++ File.open build_info_file, 'w' do |io| + io.puts '--with-foo-dir=/nonexistent' + end + +diff --git test/rubygems/test_gem_gem_runner.rb test/rubygems/test_gem_gem_runner.rb +index 0a1faa404a..d68ac4da81 100644 +--- test/rubygems/test_gem_gem_runner.rb ++++ test/rubygems/test_gem_gem_runner.rb +@@ -1,38 +1,6 @@ + # frozen_string_literal: true + require 'rubygems/test_case' +-begin +- gem_home_files = lambda{ +- if Dir.exist?(ENV["GEM_HOME"]) +- require "find" +- ary = Find.find(ENV["GEM_HOME"]).to_a +- else +- [] +- end +- } +- prev_gem_home = ENV["GEM_HOME"] +- prev_gem_home_files = gem_home_files.call +- prev_threads = Thread.list.map{|e| e.inspect} +- +- require 'rubygems/gem_runner' +-ensure +- if $! +- msg = < 'KEY' } + FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path + +- open Gem.configuration.credentials_path, 'w' do |f| ++ File.open Gem.configuration.credentials_path, 'w' do |f| + f.write keys.to_yaml + end + +@@ -59,7 +59,7 @@ def test_api_key_override + keys = { :rubygems_api_key => 'KEY', :other => 'OTHER' } + FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path + +- open Gem.configuration.credentials_path, 'w' do |f| ++ File.open Gem.configuration.credentials_path, 'w' do |f| + f.write keys.to_yaml + end + +@@ -163,7 +163,7 @@ def test_sign_in_with_other_credentials_doesnt_overwrite_other_keys + other_api_key = 'f46dbb18bb6a9c97cdc61b5b85c186a17403cdcbf' + + FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path) +- open Gem.configuration.credentials_path, 'w' do |f| ++ File.open Gem.configuration.credentials_path, 'w' do |f| + f.write Hash[:other_api_key, other_api_key].to_yaml + end + util_sign_in [api_key, 200, 'OK'] +diff --git test/rubygems/test_gem_indexer.rb test/rubygems/test_gem_indexer.rb +index a4a966e8de..5a9075e676 100644 +--- test/rubygems/test_gem_indexer.rb ++++ test/rubygems/test_gem_indexer.rb +@@ -39,8 +39,7 @@ def setup + + def test_initialize + assert_equal @tempdir, @indexer.dest_directory +- assert_equal File.join(Dir.tmpdir, "gem_generate_index_#{$$}"), +- @indexer.directory ++ assert_match %r{#{Dir.mktmpdir('gem_generate_index').match(/.*-/)}}, @indexer.directory + + indexer = Gem::Indexer.new @tempdir + assert indexer.build_modern +diff --git test/rubygems/test_gem_install_update_options.rb test/rubygems/test_gem_install_update_options.rb +index e2d546307d..371e408d27 100644 +--- test/rubygems/test_gem_install_update_options.rb ++++ test/rubygems/test_gem_install_update_options.rb +@@ -141,6 +141,8 @@ def test_user_install_enabled + def test_user_install_disabled_read_only + if win_platform? + skip('test_user_install_disabled_read_only test skipped on MS Windows') ++ elsif Process.uid.zero? ++ skip('test_user_install_disabled_read_only test skipped in root privilege') + else + @cmd.handle_options %w[--no-user-install] + +diff --git test/rubygems/test_gem_installer.rb test/rubygems/test_gem_installer.rb +index 39095c7dee..93b0482407 100644 +--- test/rubygems/test_gem_installer.rb ++++ test/rubygems/test_gem_installer.rb +@@ -140,7 +140,7 @@ def test_check_executable_overwrite_format_executable + s.require_path = 'lib' + end + +- open File.join(util_inst_bindir, 'executable'), 'w' do |io| ++ File.open File.join(util_inst_bindir, 'executable'), 'w' do |io| + io.write <<-EXEC + #!/usr/local/bin/ruby + # +@@ -437,6 +437,8 @@ def test_generate_bin_script_no_perms + + if win_platform? + skip('test_generate_bin_script_no_perms skipped on MS Windows') ++ elsif Process.uid.zero? ++ skip('test_generate_bin_script_no_perms skipped in root privilege') + else + FileUtils.chmod 0000, util_inst_bindir + +@@ -529,6 +531,8 @@ def test_generate_bin_symlink_no_perms + + if win_platform? + skip('test_generate_bin_symlink_no_perms skipped on MS Windows') ++ elsif Process.uid.zero? ++ skip('test_user_install_disabled_read_only test skipped in root privilege') + else + FileUtils.chmod 0000, util_inst_bindir + +diff --git test/rubygems/test_gem_package.rb test/rubygems/test_gem_package.rb +index cec1981c4c..d1664cf285 100644 +--- test/rubygems/test_gem_package.rb ++++ test/rubygems/test_gem_package.rb +@@ -24,7 +24,7 @@ def setup + end + + def test_class_new_old_format +- open 'old_format.gem', 'wb' do |io| ++ File.open 'old_format.gem', 'wb' do |io| + io.write SIMPLE_GEM + end + +@@ -45,7 +45,7 @@ def test_add_checksums + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -110,8 +110,8 @@ def test_add_files + + FileUtils.mkdir_p 'lib/empty' + +- open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end +- open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end ++ File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end ++ File.open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end + + package = Gem::Package.new 'bogus.gem' + package.spec = spec +@@ -140,7 +140,7 @@ def test_add_files_symlink + spec.files = %w[lib/code.rb lib/code_sym.rb] + + FileUtils.mkdir_p 'lib' +- open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end ++ File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end + + # NOTE: 'code.rb' is correct, because it's relative to lib/code_sym.rb + File.symlink('code.rb', 'lib/code_sym.rb') +@@ -179,7 +179,7 @@ def test_build + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -218,7 +218,7 @@ def test_build_auto_signed + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -261,7 +261,7 @@ def test_build_auto_signed_encrypted_key + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -311,7 +311,7 @@ def test_build_signed + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -348,7 +348,7 @@ def test_build_signed_encrypted_key + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -408,7 +408,7 @@ def test_extract_files_empty + end + end + +- open 'empty.gem', 'wb' do |io| ++ File.open 'empty.gem', 'wb' do |io| + io.write gem.string + end + +@@ -455,6 +455,31 @@ def test_extract_tar_gz_symlink_relative_path + File.read(extracted) + end + ++ def test_extract_symlink_parent ++ skip 'symlink not supported' if Gem.win_platform? ++ ++ package = Gem::Package.new @gem ++ ++ tgz_io = util_tar_gz do |tar| ++ tar.mkdir 'lib', 0755 ++ tar.add_symlink 'lib/link', '../..', 0644 ++ tar.add_file 'lib/link/outside.txt', 0644 do |io| io.write 'hi' end ++ end ++ ++ # Extract into a subdirectory of @destination; if this test fails it writes ++ # a file outside destination_subdir, but we want the file to remain inside ++ # @destination so it will be cleaned up. ++ destination_subdir = File.join @destination, 'subdir' ++ FileUtils.mkdir_p destination_subdir ++ ++ e = assert_raises Gem::Package::PathError do ++ package.extract_tar_gz tgz_io, destination_subdir ++ end ++ ++ assert_equal("installing into parent path lib/link/outside.txt of " + ++ "#{destination_subdir} is not allowed", e.message) ++ end ++ + def test_extract_tar_gz_directory + package = Gem::Package.new @gem + +@@ -566,6 +591,21 @@ def test_install_location_relative + "#{@destination} is not allowed", e.message) + end + ++ def test_install_location_suffix ++ package = Gem::Package.new @gem ++ ++ filename = "../#{File.basename(@destination)}suffix.rb" ++ ++ e = assert_raises Gem::Package::PathError do ++ package.install_location filename, @destination ++ end ++ ++ parent = File.expand_path File.join @destination, filename ++ ++ assert_equal("installing into parent path #{parent} of " + ++ "#{@destination} is not allowed", e.message) ++ end ++ + def test_load_spec + entry = StringIO.new Gem.gzip @spec.to_yaml + def entry.full_name() 'metadata.gz' end +@@ -620,7 +660,7 @@ def test_verify_checksum_bad + end + end + +- open 'mismatch.gem', 'wb' do |io| ++ File.open 'mismatch.gem', 'wb' do |io| + io.write gem.string + end + +@@ -670,7 +710,7 @@ def test_verify_checksum_missing + end + end + +- open 'data_checksum_missing.gem', 'wb' do |io| ++ File.open 'data_checksum_missing.gem', 'wb' do |io| + io.write gem.string + end + +@@ -723,6 +763,32 @@ def test_verify_nonexistent + assert_match %r%nonexistent.gem$%, e.message + end + ++ def test_verify_duplicate_file ++ FileUtils.mkdir_p 'lib' ++ FileUtils.touch 'lib/code.rb' ++ ++ build = Gem::Package.new @gem ++ build.spec = @spec ++ build.setup_signer ++ open @gem, 'wb' do |gem_io| ++ Gem::Package::TarWriter.new gem_io do |gem| ++ build.add_metadata gem ++ build.add_contents gem ++ ++ gem.add_file_simple 'a.sig', 0444, 0 ++ gem.add_file_simple 'a.sig', 0444, 0 ++ end ++ end ++ ++ package = Gem::Package.new @gem ++ ++ e = assert_raises Gem::Security::Exception do ++ package.verify ++ end ++ ++ assert_equal 'duplicate files in the package: ("a.sig")', e.message ++ end ++ + def test_verify_security_policy + skip 'openssl is missing' unless defined?(OpenSSL::SSL) + +@@ -773,14 +839,20 @@ def test_verify_security_policy_checksum_missing + FileUtils.mkdir 'lib' + FileUtils.touch 'lib/code.rb' + +- open @gem, 'wb' do |gem_io| ++ File.open @gem, 'wb' do |gem_io| + Gem::Package::TarWriter.new gem_io do |gem| + build.add_metadata gem + build.add_contents gem + + # write bogus data.tar.gz to foil signature + bogus_data = Gem.gzip 'hello' +- gem.add_file_simple 'data.tar.gz', 0444, bogus_data.length do |io| ++ fake_signer = Class.new do ++ def digest_name; 'SHA512'; end ++ def digest_algorithm; Digest(:SHA512); end ++ def key; 'key'; end ++ def sign(*); 'fake_sig'; end ++ end ++ gem.add_file_signed 'data2.tar.gz', 0444, fake_signer.new do |io| + io.write bogus_data + end + +@@ -804,7 +876,7 @@ def test_verify_security_policy_checksum_missing + end + + def test_verify_truncate +- open 'bad.gem', 'wb' do |io| ++ File.open 'bad.gem', 'wb' do |io| + io.write File.read(@gem, 1024) # don't care about newlines + end + +diff --git test/rubygems/test_gem_package_old.rb test/rubygems/test_gem_package_old.rb +index c15475b0c7..604981b3c1 100644 +--- test/rubygems/test_gem_package_old.rb ++++ test/rubygems/test_gem_package_old.rb +@@ -7,7 +7,7 @@ class TestGemPackageOld < Gem::TestCase + def setup + super + +- open 'old_format.gem', 'wb' do |io| ++ File.open 'old_format.gem', 'wb' do |io| + io.write SIMPLE_GEM + end + +diff --git test/rubygems/test_gem_package_tar_header.rb test/rubygems/test_gem_package_tar_header.rb +index d33877057d..43f508df45 100644 +--- test/rubygems/test_gem_package_tar_header.rb ++++ test/rubygems/test_gem_package_tar_header.rb +@@ -143,5 +143,26 @@ def test_update_checksum + assert_equal '012467', @tar_header.checksum + end + ++ def test_from_bad_octal ++ test_cases = [ ++ "00000006,44\000", # bogus character ++ "00000006789\000", # non-octal digit ++ "+0000001234\000", # positive sign ++ "-0000001000\000", # negative sign ++ "0x000123abc\000", # radix prefix ++ ] ++ ++ test_cases.each do |val| ++ header_s = @tar_header.to_s ++ # overwrite the size field ++ header_s[124, 12] = val ++ io = TempIO.new header_s ++ assert_raises ArgumentError do ++ new_header = Gem::Package::TarHeader.from io ++ end ++ io.close! if io.respond_to? :close! ++ end ++ end ++ + end + +diff --git test/rubygems/test_gem_rdoc.rb test/rubygems/test_gem_rdoc.rb +index 76ca8c45a9..0355883cb3 100644 +--- test/rubygems/test_gem_rdoc.rb ++++ test/rubygems/test_gem_rdoc.rb +@@ -223,6 +223,7 @@ def test_remove + + def test_remove_unwritable + skip 'chmod not supported' if Gem.win_platform? ++ skip 'skipped in root privilege' if Process.uid.zero? + FileUtils.mkdir_p @a.base_dir + FileUtils.chmod 0, @a.base_dir + +@@ -251,6 +252,7 @@ def test_setup + + def test_setup_unwritable + skip 'chmod not supported' if Gem.win_platform? ++ skip 'skipped in root privilege' if Process.uid.zero? + FileUtils.mkdir_p @a.doc_dir + FileUtils.chmod 0, @a.doc_dir + +diff --git test/rubygems/test_gem_remote_fetcher.rb test/rubygems/test_gem_remote_fetcher.rb +index ee5ac77717..20e34e84e1 100644 +--- test/rubygems/test_gem_remote_fetcher.rb ++++ test/rubygems/test_gem_remote_fetcher.rb +@@ -431,7 +431,7 @@ def test_download_install_dir + assert File.exist?(a1_cache_gem) + end + +- unless win_platform? # File.chmod doesn't work ++ unless win_platform? || Process.uid.zero? # File.chmod doesn't work + def test_download_local_read_only + FileUtils.mv @a1_gem, @tempdir + local_path = File.join @tempdir, @a1.file_name +diff --git test/rubygems/test_gem_request_set.rb test/rubygems/test_gem_request_set.rb +index 3a48827481..5dc6c1518d 100644 +--- test/rubygems/test_gem_request_set.rb ++++ test/rubygems/test_gem_request_set.rb +@@ -52,7 +52,7 @@ def test_install_from_gemdeps + rs = Gem::RequestSet.new + installed = [] + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "a"' + io.flush + +@@ -78,7 +78,7 @@ def test_install_from_gemdeps_explain + + rs = Gem::RequestSet.new + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "a"' + io.flush + +@@ -104,7 +104,7 @@ def test_install_from_gemdeps_install_dir + rs = Gem::RequestSet.new + installed = [] + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "a"' + end + +@@ -128,7 +128,7 @@ def test_install_from_gemdeps_local + + rs = Gem::RequestSet.new + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "a"' + io.flush + +@@ -150,7 +150,7 @@ def test_install_from_gemdeps_lockfile + rs = Gem::RequestSet.new + installed = [] + +- open 'gem.deps.rb.lock', 'w' do |io| ++ File.open 'gem.deps.rb.lock', 'w' do |io| + io.puts <<-LOCKFILE + GEM + remote: #{@gem_repo} +@@ -167,7 +167,7 @@ def test_install_from_gemdeps_lockfile + LOCKFILE + end + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "b"' + end + +@@ -190,7 +190,7 @@ def test_install_from_gemdeps_version_mismatch + rs = Gem::RequestSet.new + installed = [] + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts <<-GEM_DEPS + gem "a" + ruby "0" +diff --git test/rubygems/test_gem_request_set_lockfile.rb test/rubygems/test_gem_request_set_lockfile.rb +index 908f97303e..7460b7efad 100644 +--- test/rubygems/test_gem_request_set_lockfile.rb ++++ test/rubygems/test_gem_request_set_lockfile.rb +@@ -31,7 +31,7 @@ def lockfile + def write_lockfile lockfile + @lock_file = File.expand_path "#{@gem_deps_file}.lock" + +- open @lock_file, 'w' do |io| ++ File.open @lock_file, 'w' do |io| + io.write lockfile + end + end +@@ -387,7 +387,7 @@ def test_to_s_git + s.add_dependency 'c', '~> 1.0' + end + +- open 'b.gemspec', 'w' do |io| ++ File.open 'b.gemspec', 'w' do |io| + io.write b.to_ruby + end + +@@ -400,7 +400,7 @@ def test_to_s_git + Dir.chdir 'c' do + c = Gem::Specification.new 'c', 1 + +- open 'c.gemspec', 'w' do |io| ++ File.open 'c.gemspec', 'w' do |io| + io.write c.to_ruby + end + +@@ -455,7 +455,7 @@ def test_write_error + + gem_deps_lock_file = "#{@gem_deps_file}.lock" + +- open gem_deps_lock_file, 'w' do |io| ++ File.open gem_deps_lock_file, 'w' do |io| + io.write 'hello' + end + +diff --git test/rubygems/test_gem_request_set_lockfile_parser.rb test/rubygems/test_gem_request_set_lockfile_parser.rb +index 9946c522d9..f3517da43a 100644 +--- test/rubygems/test_gem_request_set_lockfile_parser.rb ++++ test/rubygems/test_gem_request_set_lockfile_parser.rb +@@ -536,7 +536,7 @@ def test_parse_missing + end + + def write_lockfile lockfile +- open @lock_file, 'w' do |io| ++ File.open @lock_file, 'w' do |io| + io.write lockfile + end + end +diff --git test/rubygems/test_gem_request_set_lockfile_tokenizer.rb test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +index ab506a14e6..f4aba6d94a 100644 +--- test/rubygems/test_gem_request_set_lockfile_tokenizer.rb ++++ test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +@@ -295,7 +295,7 @@ def test_unget + end + + def write_lockfile lockfile +- open @lock_file, 'w' do |io| ++ File.open @lock_file, 'w' do |io| + io.write lockfile + end + end +diff --git test/rubygems/test_gem_resolver_git_specification.rb test/rubygems/test_gem_resolver_git_specification.rb +index 9e8e2c5715..211757eb20 100644 +--- test/rubygems/test_gem_resolver_git_specification.rb ++++ test/rubygems/test_gem_resolver_git_specification.rb +@@ -70,7 +70,7 @@ def test_install_extension + Dir.chdir 'git/a' do + FileUtils.mkdir_p 'ext/lib' + +- open 'ext/extconf.rb', 'w' do |io| ++ File.open 'ext/extconf.rb', 'w' do |io| + io.puts 'require "mkmf"' + io.puts 'create_makefile "a"' + end +diff --git test/rubygems/test_gem_server.rb test/rubygems/test_gem_server.rb +index 6fe02e480f..a018e65512 100644 +--- test/rubygems/test_gem_server.rb ++++ test/rubygems/test_gem_server.rb +@@ -100,7 +100,7 @@ def test_latest_specs_gemdirs + specs_dir = File.join dir, 'specifications' + FileUtils.mkdir_p specs_dir + +- open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| + io.write spec.to_ruby + end + +@@ -198,7 +198,7 @@ def test_quick_gemdirs + + FileUtils.mkdir_p specs_dir + +- open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| + io.write spec.to_ruby + end + +@@ -339,7 +339,7 @@ def test_root_gemdirs + specs_dir = File.join dir, 'specifications' + FileUtils.mkdir_p specs_dir + +- open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| + io.write spec.to_ruby + end + +@@ -353,6 +353,171 @@ def test_root_gemdirs + assert_match 'z 9', @res.body + end + ++ ++ def test_xss_homepage_fix_289313 ++ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" ++ dir = "#{@gemhome}2" ++ ++ spec = util_spec 'xsshomepagegem', 1 ++ spec.homepage = "javascript:confirm(document.domain)" ++ ++ specs_dir = File.join dir, 'specifications' ++ FileUtils.mkdir_p specs_dir ++ ++ open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ io.write spec.to_ruby ++ end ++ ++ server = Gem::Server.new dir, process_based_port, false ++ ++ @req.parse data ++ ++ server.root @req, @res ++ ++ assert_equal 200, @res.status ++ assert_match 'xsshomepagegem 1', @res.body ++ ++ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a ++ # valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here, ++ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be ++ # validated in future versions of Gem::Specification. ++ # ++ # There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex: ++ # ++ # Variant #1 - rdoc not installed ++ # ++ # xsshomepagegem 1 ++ # ++ # ++ # [rdoc] ++ # ++ # ++ # ++ #
[www] ++ # ++ # Variant #2 - rdoc installed ++ # ++ # xsshomepagegem 1 ++ # ++ # ++ # \[rdoc\]<\/a> ++ # ++ # ++ # ++ # [www] ++ regex_match = /xsshomepagegem 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ ++ assert_match regex_match, @res.body ++ end ++ ++ def test_invalid_homepage ++ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" ++ dir = "#{@gemhome}2" ++ ++ spec = util_spec 'invalidhomepagegem', 1 ++ spec.homepage = "notavalidhomepageurl" ++ ++ specs_dir = File.join dir, 'specifications' ++ FileUtils.mkdir_p specs_dir ++ ++ open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ io.write spec.to_ruby ++ end ++ ++ server = Gem::Server.new dir, process_based_port, false ++ ++ @req.parse data ++ ++ server.root @req, @res ++ ++ assert_equal 200, @res.status ++ assert_match 'invalidhomepagegem 1', @res.body ++ ++ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a ++ # valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here, ++ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be ++ # validated in future versions of Gem::Specification. ++ # ++ # There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex: ++ # ++ # Variant #1 - rdoc not installed ++ # ++ # invalidhomepagegem 1 ++ # ++ # ++ # [rdoc] ++ # ++ # ++ # ++ # [www] ++ # ++ # Variant #2 - rdoc installed ++ # ++ # invalidhomepagegem 1 ++ # ++ # ++ # \[rdoc\]<\/a> ++ # ++ # ++ # ++ # [www] ++ regex_match = /invalidhomepagegem 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ ++ assert_match regex_match, @res.body ++ end ++ ++ def test_valid_homepage_http ++ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" ++ dir = "#{@gemhome}2" ++ ++ spec = util_spec 'validhomepagegemhttp', 1 ++ spec.homepage = "http://rubygems.org" ++ ++ specs_dir = File.join dir, 'specifications' ++ FileUtils.mkdir_p specs_dir ++ ++ open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ io.write spec.to_ruby ++ end ++ ++ server = Gem::Server.new dir, process_based_port, false ++ ++ @req.parse data ++ ++ server.root @req, @res ++ ++ assert_equal 200, @res.status ++ assert_match 'validhomepagegemhttp 1', @res.body ++ ++ regex_match = /validhomepagegemhttp 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ ++ assert_match regex_match, @res.body ++ end ++ ++ def test_valid_homepage_https ++ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" ++ dir = "#{@gemhome}2" ++ ++ spec = util_spec 'validhomepagegemhttps', 1 ++ spec.homepage = "https://rubygems.org" ++ ++ specs_dir = File.join dir, 'specifications' ++ FileUtils.mkdir_p specs_dir ++ ++ open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ io.write spec.to_ruby ++ end ++ ++ server = Gem::Server.new dir, process_based_port, false ++ ++ @req.parse data ++ ++ server.root @req, @res ++ ++ assert_equal 200, @res.status ++ assert_match 'validhomepagegemhttps 1', @res.body ++ ++ regex_match = /validhomepagegemhttps 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ ++ assert_match regex_match, @res.body ++ end ++ + def test_specs + data = StringIO.new "GET /specs.#{Gem.marshal_version} HTTP/1.0\r\n\r\n" + @req.parse data +@@ -378,7 +543,7 @@ def test_specs_gemdirs + specs_dir = File.join dir, 'specifications' + FileUtils.mkdir_p specs_dir + +- open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| + io.write spec.to_ruby + end + +diff --git test/rubygems/test_gem_source.rb test/rubygems/test_gem_source.rb +index 4a93e222f8..8805a9b404 100644 +--- test/rubygems/test_gem_source.rb ++++ test/rubygems/test_gem_source.rb +@@ -110,7 +110,7 @@ def test_fetch_spec_cached + + cache_file = File.join cache_dir, a1.spec_name + +- open cache_file, 'wb' do |io| ++ File.open cache_file, 'wb' do |io| + Marshal.dump a1, io + end + +@@ -163,7 +163,7 @@ def test_load_specs_cached + + cache_file = File.join cache_dir, "latest_specs.#{Gem.marshal_version}" + +- open cache_file, 'wb' do |io| ++ File.open cache_file, 'wb' do |io| + Marshal.dump latest_specs, io + end + +@@ -187,7 +187,7 @@ def test_load_specs_cached_empty + + cache_file = File.join cache_dir, "latest_specs.#{Gem.marshal_version}" + +- open cache_file, 'wb' do |io| ++ File.open cache_file, 'wb' do |io| + # Setup invalid data in the cache: + io.write Marshal.dump(latest_specs)[0, 10] + end +diff --git test/rubygems/test_gem_source_git.rb test/rubygems/test_gem_source_git.rb +index 0e13a11e7e..8f5d3ee745 100644 +--- test/rubygems/test_gem_source_git.rb ++++ test/rubygems/test_gem_source_git.rb +@@ -229,7 +229,7 @@ def test_specs + Dir.chdir 'b' do + b = Gem::Specification.new 'b', 1 + +- open 'b.gemspec', 'w' do |io| ++ File.open 'b.gemspec', 'w' do |io| + io.write b.to_ruby + end + +diff --git test/rubygems/test_gem_specification.rb test/rubygems/test_gem_specification.rb +index bb6acbc7de..badb297eee 100644 +--- test/rubygems/test_gem_specification.rb ++++ test/rubygems/test_gem_specification.rb +@@ -922,7 +922,7 @@ def test_self_load + end + + def test_self_load_relative +- open 'a-2.gemspec', 'w' do |io| ++ File.open 'a-2.gemspec', 'w' do |io| + io.write @a2.to_ruby_for_cache + end + +@@ -948,6 +948,9 @@ def test_self_load_tainted + @a2.files.clear + + assert_equal @a2, spec ++ ++ ensure ++ $SAFE = 0 + end + + def test_self_load_escape_curly +@@ -1111,7 +1114,7 @@ def test_self_remove_spec + end + + def test_self_remove_spec_removed +- open @a1.spec_file, 'w' do |io| ++ File.open @a1.spec_file, 'w' do |io| + io.write @a1.to_ruby + end + +@@ -1363,13 +1366,13 @@ def test_build_args + + assert_empty @ext.build_args + +- open @ext.build_info_file, 'w' do |io| ++ File.open @ext.build_info_file, 'w' do |io| + io.puts + end + + assert_empty @ext.build_args + +- open @ext.build_info_file, 'w' do |io| ++ File.open @ext.build_info_file, 'w' do |io| + io.puts '--with-foo-dir=wherever' + end + +@@ -1385,9 +1388,9 @@ def test_build_extensions + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -1435,9 +1438,9 @@ def test_build_extensions_default_gem + extconf_rb = File.join spec.gem_dir, spec.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" + end +@@ -1461,6 +1464,7 @@ def test_build_extensions_error + + def test_build_extensions_extensions_dir_unwritable + skip 'chmod not supported' if Gem.win_platform? ++ skip 'skipped in root privilege' if Process.uid.zero? + + ext_spec + +@@ -1469,9 +1473,9 @@ def test_build_extensions_extensions_dir_unwritable + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -1486,7 +1490,7 @@ def test_build_extensions_extensions_dir_unwritable + @ext.build_extensions + refute_path_exists @ext.extension_dir + ensure +- unless ($DEBUG or win_platform?) then ++ unless ($DEBUG or win_platform? or Process.uid.zero?) then + FileUtils.chmod 0755, File.join(@ext.base_dir, 'extensions') + FileUtils.chmod 0755, @ext.base_dir + end +@@ -1502,9 +1506,9 @@ def test_build_extensions_no_extensions_dir_unwritable + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -1551,9 +1555,9 @@ def test_build_extensions_preview + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -2882,7 +2886,22 @@ def test_validate_homepage + @a1.validate + end + +- assert_equal '"over at my cool site" is not a URI', e.message ++ assert_equal '"over at my cool site" is not a valid HTTP URI', e.message ++ ++ @a1.homepage = 'ftp://rubygems.org' ++ ++ e = assert_raises Gem::InvalidSpecificationException do ++ @a1.validate ++ end ++ ++ assert_equal '"ftp://rubygems.org" is not a valid HTTP URI', e.message ++ ++ @a1.homepage = 'http://rubygems.org' ++ assert_equal true, @a1.validate ++ ++ @a1.homepage = 'https://rubygems.org' ++ assert_equal true, @a1.validate ++ + end + end + +@@ -3418,9 +3437,9 @@ def test_missing_extensions_eh + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +diff --git test/rubygems/test_gem_stub_specification.rb test/rubygems/test_gem_stub_specification.rb +index 43680265c7..f9a3a236c0 100644 +--- test/rubygems/test_gem_stub_specification.rb ++++ test/rubygems/test_gem_stub_specification.rb +@@ -127,9 +127,9 @@ def test_missing_extensions_eh + extconf_rb = File.join s.gem_dir, s.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -149,7 +149,7 @@ def test_missing_extensions_eh_default_gem + spec = new_default_spec 'default', 1 + spec.extensions << 'extconf.rb' + +- open spec.loaded_from, 'w' do |io| ++ File.open spec.loaded_from, 'w' do |io| + io.write spec.to_ruby_for_cache + end + +@@ -198,7 +198,7 @@ def test_to_spec_missing_extensions + + def stub_with_version + spec = File.join @gemhome, 'specifications', 'stub_e-2.gemspec' +- open spec, 'w' do |io| ++ File.open spec, 'w' do |io| + io.write <<-STUB + # -*- encoding: utf-8 -*- + # stub: stub_v 2 ruby lib +@@ -221,7 +221,7 @@ def stub_with_version + + def stub_without_version + spec = File.join @gemhome, 'specifications', 'stub-2.gemspec' +- open spec, 'w' do |io| ++ File.open spec, 'w' do |io| + io.write <<-STUB + # -*- encoding: utf-8 -*- + # stub: stub_v ruby lib +@@ -245,7 +245,7 @@ def stub_without_version + + def stub_with_extension + spec = File.join @gemhome, 'specifications', 'stub_e-2.gemspec' +- open spec, 'w' do |io| ++ File.open spec, 'w' do |io| + io.write <<-STUB + # -*- encoding: utf-8 -*- + # stub: stub_e 2 ruby lib +@@ -271,7 +271,7 @@ def stub_with_extension + + def stub_without_extension + spec = File.join @gemhome, 'specifications', 'stub-2.gemspec' +- open spec, 'w' do |io| ++ File.open spec, 'w' do |io| + io.write <<-STUB + # -*- encoding: utf-8 -*- + # stub: stub 2 ruby lib +diff --git test/rubygems/test_gem_util.rb test/rubygems/test_gem_util.rb +index b85db44d51..3b7887d931 100644 +--- test/rubygems/test_gem_util.rb ++++ test/rubygems/test_gem_util.rb +@@ -5,6 +5,7 @@ + class TestGemUtil < Gem::TestCase + + def test_class_popen ++ skip "MJIT executes process and it's caught by Process.wait(-1)" if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + assert_equal "0\n", Gem::Util.popen(Gem.ruby, '-e', 'p 0') + + assert_raises Errno::ECHILD do +@@ -29,6 +30,30 @@ def test_traverse_parents + loop { break if enum.next.nil? } # exhaust the enumerator + end + ++ def test_traverse_parents_does_not_crash_on_permissions_error ++ skip 'skipped on MS Windows (chmod has no effect)' if win_platform? ++ ++ FileUtils.mkdir_p 'd/e/f' ++ # remove 'execute' permission from "e" directory and make it ++ # impossible to cd into it and its children ++ FileUtils.chmod(0666, 'd/e') ++ ++ paths = Gem::Util.traverse_parents('d/e/f').to_a ++ ++ assert_equal File.join(@tempdir, 'd'), paths[0] ++ assert_equal @tempdir, paths[1] ++ if File.respond_to?(:realpath) ++ assert_equal File.realpath(Dir.tmpdir), paths[2] ++ assert_equal File.realpath("..", Dir.tmpdir), paths[3] ++ elsif RUBY_PLATFORM !~ /darwin/ ++ assert_equal Dir.tmpdir, paths[2] ++ assert_equal '/', paths[3] ++ end ++ ensure ++ # restore default permissions, allow the directory to be removed ++ FileUtils.chmod(0775, 'd/e') unless win_platform? ++ end ++ + def test_linked_list_find + list = [1,2,3,4,5].inject(Gem::List.new(0)) { |m,o| + Gem::List.new o, m +diff --git test/rubygems/test_gem_version.rb test/rubygems/test_gem_version.rb +index 56c818663e..792ad5f084 100644 +--- test/rubygems/test_gem_version.rb ++++ test/rubygems/test_gem_version.rb +@@ -2,6 +2,8 @@ + require 'rubygems/test_case' + require "rubygems/version" + ++require "minitest/benchmark" ++ + class TestGemVersion < Gem::TestCase + + class V < ::Gem::Version +@@ -102,6 +104,15 @@ def test_initialize_invalid + end + end + ++ def bench_anchored_version_pattern ++ assert_performance_linear 0.5 do |count| ++ version_string = count.times.map {|i| "0" * i.succ }.join(".") << "." ++ version_string =~ Gem::Version::ANCHORED_VERSION_PATTERN ++ end ++ rescue RegexpError ++ skip "It fails to allocate the memory for regex pattern of Gem::Version::ANCHORED_VERSION_PATTERN" ++ end ++ + def test_empty_version + ["", " ", " "].each do |empty| + assert_equal "0", Gem::Version.new(empty).version +diff --git test/rubygems/test_require.rb test/rubygems/test_require.rb +index a846f46833..e292ce226d 100644 +--- test/rubygems/test_require.rb ++++ test/rubygems/test_require.rb +@@ -38,18 +38,6 @@ def assert_require(path) + assert require(path), "'#{path}' was already required" + end + +- def append_latch spec +- dir = spec.gem_dir +- Dir.chdir dir do +- spec.files.each do |file| +- File.open file, 'a' do |fp| +- fp.puts "FILE_ENTERED_LATCH.release" +- fp.puts "FILE_EXIT_LATCH.await" +- end +- end +- end +- end +- + # Providing -I on the commandline should always beat gems + def test_dash_i_beats_gems + a1 = new_spec "a", "1", {"b" => "= 1"}, "lib/test_gem_require_a.rb" +@@ -80,6 +68,17 @@ def test_dash_i_beats_gems + Object.send :remove_const, :HELLO if Object.const_defined? :HELLO + end + ++ def create_sync_thread ++ Thread.new do ++ begin ++ yield ++ ensure ++ FILE_ENTERED_LATCH.release ++ FILE_EXIT_LATCH.await ++ end ++ end ++ end ++ + def test_concurrent_require + skip 'deadlock' if /^1\.8\./ =~ RUBY_VERSION + +@@ -91,11 +90,8 @@ def test_concurrent_require + + install_specs a1, b1 + +- append_latch a1 +- append_latch b1 +- +- t1 = Thread.new { assert_require 'a' } +- t2 = Thread.new { assert_require 'b' } ++ t1 = create_sync_thread{ assert_require 'a' } ++ t2 = create_sync_thread{ assert_require 'b' } + + # wait until both files are waiting on the exit latch + FILE_ENTERED_LATCH.await +@@ -106,10 +102,8 @@ def test_concurrent_require + assert t1.join, "thread 1 should exit" + assert t2.join, "thread 2 should exit" + ensure +- return if $! # skipping +- +- Object.send :remove_const, :FILE_ENTERED_LATCH +- Object.send :remove_const, :FILE_EXIT_LATCH ++ Object.send :remove_const, :FILE_ENTERED_LATCH if Object.const_defined? :FILE_ENTERED_LATCH ++ Object.send :remove_const, :FILE_EXIT_LATCH if Object.const_defined? :FILE_EXIT_LATCH + end + + def test_require_is_not_lazy_with_exact_req From 2f1964803397616e17bd632084cb650b4837bf88 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Wed, 21 Feb 2018 18:32:04 +0100 Subject: [PATCH 504/529] Fix: Multiple vulnerabilities in RubyGems https://bugzilla.redhat.com/show_bug.cgi?id=1547431 https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ * rubygems-2.5.0-multiple-vulnerabilities.patch --- ruby.spec | 12 +- rubygems-2.5.0-multiple-vulnerabilities.patch | 2349 +++++++++++++++++ 2 files changed, 2360 insertions(+), 1 deletion(-) create mode 100644 rubygems-2.5.0-multiple-vulnerabilities.patch diff --git a/ruby.spec b/ruby.spec index d4399e4..012169a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -29,7 +29,7 @@ %global rubygems_dir %{_datadir}/rubygems # Bundled libraries versions -%global rubygems_version 2.7.3 +%global rubygems_version 2.7.6 %global molinillo_version 0.5.7 # TODO: The IRB has strange versioning. Keep the Ruby's versioning ATM. @@ -145,6 +145,10 @@ Patch12: ruby-2.5.0-Disable-Tokyo-TZ-tests.patch # Fix thread_safe tests suite segfaults. # https://bugs.ruby-lang.org/issues/14357 Patch13: ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch +# Fix: Multiple vulnerabilities in RubyGems +# https://bugzilla.redhat.com/show_bug.cgi?id=1547431 +# https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ +Patch14: rubygems-2.5.0-multiple-vulnerabilities.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -531,6 +535,7 @@ rm -rf ext/fiddle/libffi* %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p0 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1071,6 +1076,11 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Wed Feb 23 2018 Pavel Valena - 2.5.0-89 +- Fix: Multiple vulnerabilities in RubyGems + https://bugzilla.redhat.com/show_bug.cgi?id=1547431 + https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ + * Tue Feb 13 2018 V鱈t Ondruch - 2.5.0-89 - Drop obsolete ldconfig scriptlets. - Add GMP dependency. diff --git a/rubygems-2.5.0-multiple-vulnerabilities.patch b/rubygems-2.5.0-multiple-vulnerabilities.patch new file mode 100644 index 0000000..e32926a --- /dev/null +++ b/rubygems-2.5.0-multiple-vulnerabilities.patch @@ -0,0 +1,2349 @@ +diff --git lib/rubygems.rb lib/rubygems.rb +index 0475ced164..2762bfcb88 100644 +--- lib/rubygems.rb ++++ lib/rubygems.rb +@@ -10,7 +10,7 @@ + require 'thread' + + module Gem +- VERSION = "2.7.3" ++ VERSION = "2.7.6" + end + + # Must be first since it unloads the prelude from 1.9.2 +@@ -161,7 +161,7 @@ module Gem + # these are defined in Ruby 1.8.7, hence the need for this convoluted setup. + + READ_BINARY_ERRORS = begin +- read_binary_errors = [Errno::EACCES, Errno::EROFS] ++ read_binary_errors = [Errno::EACCES, Errno::EROFS, Errno::ENOSYS] + read_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) + read_binary_errors + end.freeze +@@ -171,7 +171,7 @@ module Gem + # these are defined in Ruby 1.8.7. + + WRITE_BINARY_ERRORS = begin +- write_binary_errors = [] ++ write_binary_errors = [Errno::ENOSYS] + write_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) + write_binary_errors + end.freeze +@@ -871,19 +871,19 @@ def self.refresh + # Safely read a file in binary mode on all platforms. + + def self.read_binary(path) +- open path, 'rb+' do |f| ++ File.open path, 'rb+' do |f| + f.flock(File::LOCK_EX) + f.read + end + rescue *READ_BINARY_ERRORS +- open path, 'rb' do |f| ++ File.open path, 'rb' do |f| + f.read + end + rescue Errno::ENOLCK # NFS + if Thread.main != Thread.current + raise + else +- open path, 'rb' do |f| ++ File.open path, 'rb' do |f| + f.read + end + end +diff --git lib/rubygems/commands/generate_index_command.rb lib/rubygems/commands/generate_index_command.rb +index 01f1f88405..0b677b73a9 100644 +--- lib/rubygems/commands/generate_index_command.rb ++++ lib/rubygems/commands/generate_index_command.rb +@@ -68,7 +68,7 @@ def execute + + if not File.exist?(options[:directory]) or + not File.directory?(options[:directory]) then +- alert_error "unknown directory name #{directory}." ++ alert_error "unknown directory name #{options[:directory]}." + terminate_interaction 1 + else + indexer = Gem::Indexer.new options.delete(:directory), options +diff --git lib/rubygems/commands/owner_command.rb lib/rubygems/commands/owner_command.rb +index 8e2271657a..637b5bdc4d 100644 +--- lib/rubygems/commands/owner_command.rb ++++ lib/rubygems/commands/owner_command.rb +@@ -64,7 +64,7 @@ def show_owners name + end + + with_response response do |resp| +- owners = YAML.load resp.body ++ owners = Gem::SafeYAML.load resp.body + + say "Owners for gem: #{name}" + owners.each do |owner| +diff --git lib/rubygems/commands/setup_command.rb lib/rubygems/commands/setup_command.rb +index 5d1414d102..6966cde01a 100644 +--- lib/rubygems/commands/setup_command.rb ++++ lib/rubygems/commands/setup_command.rb +@@ -350,7 +350,9 @@ def fake_spec.full_gem_path + def install_default_bundler_gem + return unless Gem::USE_BUNDLER_FOR_GEMDEPS + +- mkdir_p Gem::Specification.default_specifications_dir ++ specs_dir = Gem::Specification.default_specifications_dir ++ File.join(options[:destdir], specs_dir) unless Gem.win_platform? ++ mkdir_p specs_dir + + # Workaround for non-git environment. + gemspec = File.open('bundler/bundler.gemspec', 'rb'){|f| f.read.gsub(/`git ls-files -z`/, "''") } +@@ -359,23 +361,36 @@ def install_default_bundler_gem + bundler_spec = Gem::Specification.load("bundler/bundler.gemspec") + bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] } + bundler_spec.executables -= %w[bundler bundle_ruby] +- Dir.entries(Gem::Specification.default_specifications_dir). ++ ++ # Remove bundler-*.gemspec in default specification directory. ++ Dir.entries(specs_dir). + select {|gs| gs.start_with?("bundler-") }. +- each {|gs| File.delete(File.join(Gem::Specification.default_specifications_dir, gs)) } ++ each {|gs| File.delete(File.join(specs_dir, gs)) } + +- default_spec_path = File.join(Gem::Specification.default_specifications_dir, "#{bundler_spec.full_name}.gemspec") ++ default_spec_path = File.join(specs_dir, "#{bundler_spec.full_name}.gemspec") + Gem.write_binary(default_spec_path, bundler_spec.to_ruby) + + bundler_spec = Gem::Specification.load(default_spec_path) + ++ # Remove gemspec that was same version of vendored bundler. ++ normal_gemspec = File.join(Gem.default_dir, "specifications", "bundler-#{bundler_spec.version}.gemspec") ++ if File.file? normal_gemspec ++ File.delete normal_gemspec ++ end ++ ++ # Remove gem files that were same version of vendored bundler. + if File.directory? bundler_spec.gems_dir + Dir.entries(bundler_spec.gems_dir). +- select {|default_gem| File.basename(default_gem).match(/^bundler-#{Gem::Version::VERSION_PATTERN}$/) }. ++ select {|default_gem| File.basename(default_gem) == "bundler-#{bundler_spec.version}" }. + each {|default_gem| rm_r File.join(bundler_spec.gems_dir, default_gem) } + end + +- mkdir_p bundler_spec.bin_dir +- bundler_spec.executables.each {|e| cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_spec.bin_dir, e) } ++ bundler_bin_dir = File.join(Gem.default_dir, 'gems', bundler_spec.full_name, bundler_spec.bindir) ++ File.join(options[:destdir], bundler_bin_dir) unless Gem.win_platform? ++ mkdir_p bundler_bin_dir ++ bundler_spec.executables.each do |e| ++ cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_bin_dir, e) ++ end + + if Gem.win_platform? + require 'rubygems/installer' +diff --git lib/rubygems/commands/unpack_command.rb lib/rubygems/commands/unpack_command.rb +index eb7f550673..b873f20d28 100644 +--- lib/rubygems/commands/unpack_command.rb ++++ lib/rubygems/commands/unpack_command.rb +@@ -94,7 +94,7 @@ def execute + + spec_file = File.basename spec.spec_file + +- open spec_file, 'w' do |io| ++ File.open spec_file, 'w' do |io| + io.write metadata + end + else +@@ -176,7 +176,7 @@ def get_metadata path, security_policy = nil + + metadata = nil + +- open path, Gem.binary_mode do |io| ++ File.open path, Gem.binary_mode do |io| + tar = Gem::Package::TarReader.new io + tar.each_entry do |entry| + case entry.full_name +diff --git lib/rubygems/config_file.rb lib/rubygems/config_file.rb +index a4efed0f5a..c0d19dbfc2 100644 +--- lib/rubygems/config_file.rb ++++ lib/rubygems/config_file.rb +@@ -458,7 +458,7 @@ def to_yaml # :nodoc: + + # Writes out this config file, replacing its source. + def write +- open config_file_name, 'w' do |io| ++ File.open config_file_name, 'w' do |io| + io.write to_yaml + end + end +diff --git lib/rubygems/ext/builder.rb lib/rubygems/ext/builder.rb +index a1619c97d7..eb9db199d5 100644 +--- lib/rubygems/ext/builder.rb ++++ lib/rubygems/ext/builder.rb +@@ -212,7 +212,7 @@ def write_gem_make_out output # :nodoc: + + FileUtils.mkdir_p @spec.extension_dir + +- open destination, 'wb' do |io| io.puts output end ++ File.open destination, 'wb' do |io| io.puts output end + + destination + end +diff --git lib/rubygems/indexer.rb lib/rubygems/indexer.rb +index 871cc09d8d..3ea994414b 100644 +--- lib/rubygems/indexer.rb ++++ lib/rubygems/indexer.rb +@@ -2,6 +2,7 @@ + require 'rubygems' + require 'rubygems/package' + require 'time' ++require 'tmpdir' + + begin + gem 'builder' +@@ -64,7 +65,7 @@ def initialize(directory, options = {}) + @build_modern = options[:build_modern] + + @dest_directory = directory +- @directory = File.join(Dir.tmpdir, "gem_generate_index_#{$$}") ++ @directory = Dir.mktmpdir 'gem_generate_index' + + marshal_name = "Marshal.#{Gem.marshal_version}" + +@@ -123,7 +124,7 @@ def build_marshal_gemspecs specs + marshal_name = File.join @quick_marshal_dir, spec_file_name + + marshal_zipped = Gem.deflate Marshal.dump(spec) +- open marshal_name, 'wb' do |io| io.write marshal_zipped end ++ File.open marshal_name, 'wb' do |io| io.write marshal_zipped end + + files << marshal_name + +@@ -261,7 +262,7 @@ def compress(filename, extension) + + zipped = Gem.deflate data + +- open "#{filename}.#{extension}", 'wb' do |io| ++ File.open "#{filename}.#{extension}", 'wb' do |io| + io.write zipped + end + end +@@ -427,7 +428,7 @@ def update_specs_index(index, source, dest) + + specs_index = compact_specs specs_index.uniq.sort + +- open dest, 'wb' do |io| ++ File.open dest, 'wb' do |io| + Marshal.dump specs_index, io + end + end +diff --git lib/rubygems/installer.rb lib/rubygems/installer.rb +index 0cbca0791b..ee5fedeb64 100644 +--- lib/rubygems/installer.rb ++++ lib/rubygems/installer.rb +@@ -206,7 +206,7 @@ def check_executable_overwrite filename # :nodoc: + ruby_executable = false + existing = nil + +- open generated_bin, 'rb' do |io| ++ File.open generated_bin, 'rb' do |io| + next unless io.gets =~ /^#!/ # shebang + io.gets # blankline + +@@ -427,7 +427,7 @@ def default_spec_file + # specifications directory. + + def write_spec +- open spec_file, 'w' do |file| ++ File.open spec_file, 'w' do |file| + spec.installed_by_version = Gem.rubygems_version + + file.puts spec.to_ruby_for_cache +@@ -464,7 +464,12 @@ def generate_windows_script(filename, bindir) + def generate_bin # :nodoc: + return if spec.executables.nil? or spec.executables.empty? + +- Dir.mkdir @bin_dir unless File.exist? @bin_dir ++ begin ++ Dir.mkdir @bin_dir ++ rescue SystemCallError ++ raise unless File.directory? @bin_dir ++ end ++ + raise Gem::FilePermissionError.new(@bin_dir) unless File.writable? @bin_dir + + spec.executables.each do |filename| +@@ -863,7 +868,7 @@ def write_build_info_file + + build_info_file = File.join build_info_dir, "#{spec.full_name}.info" + +- open build_info_file, 'w' do |io| ++ File.open build_info_file, 'w' do |io| + @build_args.each do |arg| + io.puts arg + end +diff --git lib/rubygems/package.rb lib/rubygems/package.rb +index 77811ed5ec..b924122827 100644 +--- lib/rubygems/package.rb ++++ lib/rubygems/package.rb +@@ -219,7 +219,7 @@ def add_files tar # :nodoc: + next unless stat.file? + + tar.add_file_simple file, stat.mode, stat.size do |dst_io| +- open file, 'rb' do |src_io| ++ File.open file, 'rb' do |src_io| + dst_io.write src_io.read 16384 until src_io.eof? + end + end +@@ -378,9 +378,9 @@ def extract_tar_gz io, destination_dir, pattern = "*" # :nodoc: + File.dirname destination + end + +- FileUtils.mkdir_p mkdir, mkdir_options ++ mkdir_p_safe mkdir, mkdir_options, destination_dir, entry.full_name + +- open destination, 'wb' do |out| ++ File.open destination, 'wb' do |out| + out.write entry.read + FileUtils.chmod entry.header.mode, destination + end if entry.file? +@@ -416,20 +416,35 @@ def install_location filename, destination_dir # :nodoc: + raise Gem::Package::PathError.new(filename, destination_dir) if + filename.start_with? '/' + +- destination_dir = File.realpath destination_dir if +- File.respond_to? :realpath ++ destination_dir = realpath destination_dir + destination_dir = File.expand_path destination_dir + + destination = File.join destination_dir, filename + destination = File.expand_path destination + + raise Gem::Package::PathError.new(destination, destination_dir) unless +- destination.start_with? destination_dir ++ destination.start_with? destination_dir + '/' + + destination.untaint + destination + end + ++ def mkdir_p_safe mkdir, mkdir_options, destination_dir, file_name ++ destination_dir = realpath File.expand_path(destination_dir) ++ parts = mkdir.split(File::SEPARATOR) ++ parts.reduce do |path, basename| ++ path = realpath path unless path == "" ++ path = File.expand_path(path + File::SEPARATOR + basename) ++ lstat = File.lstat path rescue nil ++ if !lstat || !lstat.directory? ++ unless path.start_with? destination_dir and (FileUtils.mkdir path, mkdir_options rescue false) ++ raise Gem::Package::PathError.new(file_name, destination_dir) ++ end ++ end ++ path ++ end ++ end ++ + ## + # Loads a Gem::Specification from the TarEntry +entry+ + +@@ -603,6 +618,10 @@ def verify_files gem + raise Gem::Package::FormatError.new \ + 'package content (data.tar.gz) is missing', @gem + end ++ ++ if duplicates = @files.group_by {|f| f }.select {|k,v| v.size > 1 }.map(&:first) and duplicates.any? ++ raise Gem::Security::Exception, "duplicate files in the package: (#{duplicates.map(&:inspect).join(', ')})" ++ end + end + + ## +@@ -616,6 +635,16 @@ def verify_gz entry # :nodoc: + raise Gem::Package::FormatError.new(e.message, entry.full_name) + end + ++ if File.respond_to? :realpath ++ def realpath file ++ File.realpath file ++ end ++ else ++ def realpath file ++ file ++ end ++ end ++ + end + + require 'rubygems/package/digest_io' +diff --git lib/rubygems/package/file_source.rb lib/rubygems/package/file_source.rb +index 1a4dc4c824..ecc3a68677 100644 +--- lib/rubygems/package/file_source.rb ++++ lib/rubygems/package/file_source.rb +@@ -23,11 +23,11 @@ def present? + end + + def with_write_io &block +- open path, 'wb', &block ++ File.open path, 'wb', &block + end + + def with_read_io &block +- open path, 'rb', &block ++ File.open path, 'rb', &block + end + + end +diff --git lib/rubygems/package/old.rb lib/rubygems/package/old.rb +index f6e6e67c38..322d682ca8 100644 +--- lib/rubygems/package/old.rb ++++ lib/rubygems/package/old.rb +@@ -80,7 +80,7 @@ def extract_files destination_dir + + FileUtils.mkdir_p File.dirname destination + +- open destination, 'wb', entry['mode'] do |out| ++ File.open destination, 'wb', entry['mode'] do |out| + out.write file_data + end + +diff --git lib/rubygems/package/tar_header.rb lib/rubygems/package/tar_header.rb +index c54bd14d57..d557357114 100644 +--- lib/rubygems/package/tar_header.rb ++++ lib/rubygems/package/tar_header.rb +@@ -104,25 +104,30 @@ def self.from(stream) + fields = header.unpack UNPACK_FORMAT + + new :name => fields.shift, +- :mode => fields.shift.oct, +- :uid => fields.shift.oct, +- :gid => fields.shift.oct, +- :size => fields.shift.oct, +- :mtime => fields.shift.oct, +- :checksum => fields.shift.oct, ++ :mode => strict_oct(fields.shift), ++ :uid => strict_oct(fields.shift), ++ :gid => strict_oct(fields.shift), ++ :size => strict_oct(fields.shift), ++ :mtime => strict_oct(fields.shift), ++ :checksum => strict_oct(fields.shift), + :typeflag => fields.shift, + :linkname => fields.shift, + :magic => fields.shift, +- :version => fields.shift.oct, ++ :version => strict_oct(fields.shift), + :uname => fields.shift, + :gname => fields.shift, +- :devmajor => fields.shift.oct, +- :devminor => fields.shift.oct, ++ :devmajor => strict_oct(fields.shift), ++ :devminor => strict_oct(fields.shift), + :prefix => fields.shift, + + :empty => empty + end + ++ def self.strict_oct(str) ++ return str.oct if str =~ /\A[0-7]*\z/ ++ raise ArgumentError, "#{str.inspect} is not an octal string" ++ end ++ + ## + # Creates a new TarHeader using +vals+ + +diff --git lib/rubygems/package/tar_writer.rb lib/rubygems/package/tar_writer.rb +index f68b8d4c5e..390f7851a3 100644 +--- lib/rubygems/package/tar_writer.rb ++++ lib/rubygems/package/tar_writer.rb +@@ -196,6 +196,8 @@ def add_file_signed name, mode, signer + digest_name == signer.digest_name + end + ++ raise "no #{signer.digest_name} in #{digests.values.compact}" unless signature_digest ++ + if signer.key then + signature = signer.sign signature_digest.digest + +diff --git lib/rubygems/request_set/lockfile.rb lib/rubygems/request_set/lockfile.rb +index 7f6eadb939..76ad17d486 100644 +--- lib/rubygems/request_set/lockfile.rb ++++ lib/rubygems/request_set/lockfile.rb +@@ -223,7 +223,7 @@ def to_s + def write + content = to_s + +- open "#{@gem_deps_file}.lock", 'w' do |io| ++ File.open "#{@gem_deps_file}.lock", 'w' do |io| + io.write content + end + end +diff --git lib/rubygems/security.rb lib/rubygems/security.rb +index 4690dd9230..236577c5a3 100644 +--- lib/rubygems/security.rb ++++ lib/rubygems/security.rb +@@ -578,7 +578,7 @@ def self.trusted_certificates &block + def self.write pemmable, path, permissions = 0600, passphrase = nil, cipher = KEY_CIPHER + path = File.expand_path path + +- open path, 'wb', permissions do |io| ++ File.open path, 'wb', permissions do |io| + if passphrase and cipher + io.write pemmable.to_pem cipher, passphrase + else +diff --git lib/rubygems/security/trust_dir.rb lib/rubygems/security/trust_dir.rb +index bf44975cc6..849cf3cd3e 100644 +--- lib/rubygems/security/trust_dir.rb ++++ lib/rubygems/security/trust_dir.rb +@@ -93,7 +93,7 @@ def trust_cert certificate + + destination = cert_path certificate + +- open destination, 'wb', @permissions[:trusted_cert] do |io| ++ File.open destination, 'wb', @permissions[:trusted_cert] do |io| + io.write certificate.to_pem + end + end +diff --git lib/rubygems/server.rb lib/rubygems/server.rb +index 93b3af36f8..62c3dfe9cf 100644 +--- lib/rubygems/server.rb ++++ lib/rubygems/server.rb +@@ -623,6 +623,18 @@ def root(req, res) + executables = nil if executables.empty? + executables.last["is_last"] = true if executables + ++ # Pre-process spec homepage for safety reasons ++ begin ++ homepage_uri = URI.parse(spec.homepage) ++ if [URI::HTTP, URI::HTTPS].member? homepage_uri.class ++ homepage_uri = spec.homepage ++ else ++ homepage_uri = "." ++ end ++ rescue URI::InvalidURIError ++ homepage_uri = "." ++ end ++ + specs << { + "authors" => spec.authors.sort.join(", "), + "date" => spec.date.to_s, +@@ -632,7 +644,7 @@ def root(req, res) + "only_one_executable" => (executables && executables.size == 1), + "full_name" => spec.full_name, + "has_deps" => !deps.empty?, +- "homepage" => spec.homepage, ++ "homepage" => homepage_uri, + "name" => spec.name, + "rdoc_installed" => Gem::RDoc.new(spec).rdoc_installed?, + "ri_installed" => Gem::RDoc.new(spec).ri_installed?, +diff --git lib/rubygems/source.rb lib/rubygems/source.rb +index bd84c217a7..b28b850660 100644 +--- lib/rubygems/source.rb ++++ lib/rubygems/source.rb +@@ -160,7 +160,7 @@ def fetch_spec name_tuple + if update_cache? then + FileUtils.mkdir_p cache_dir + +- open local_spec, 'wb' do |io| ++ File.open local_spec, 'wb' do |io| + io.write spec + end + end +diff --git lib/rubygems/specification.rb lib/rubygems/specification.rb +index efc08c4738..2560324b7a 100644 +--- lib/rubygems/specification.rb ++++ lib/rubygems/specification.rb +@@ -15,6 +15,7 @@ + require 'rubygems/stub_specification' + require 'rubygems/util/list' + require 'stringio' ++require 'uri' + + ## + # The Specification class contains the information for a Gem. Typically +@@ -2822,10 +2823,16 @@ def validate packaging = true + raise Gem::InvalidSpecificationException, "#{lazy} is not a summary" + end + +- if homepage and not homepage.empty? and +- homepage !~ /\A[a-z][a-z\d+.-]*:/i then +- raise Gem::InvalidSpecificationException, +- "\"#{homepage}\" is not a URI" ++ # Make sure a homepage is valid HTTP/HTTPS URI ++ if homepage and not homepage.empty? ++ begin ++ homepage_uri = URI.parse(homepage) ++ unless [URI::HTTP, URI::HTTPS].member? homepage_uri.class ++ raise Gem::InvalidSpecificationException, "\"#{homepage}\" is not a valid HTTP URI" ++ end ++ rescue URI::InvalidURIError ++ raise Gem::InvalidSpecificationException, "\"#{homepage}\" is not a valid HTTP URI" ++ end + end + + # Warnings +diff --git lib/rubygems/stub_specification.rb lib/rubygems/stub_specification.rb +index 8337375ab4..ae2effbc84 100644 +--- lib/rubygems/stub_specification.rb ++++ lib/rubygems/stub_specification.rb +@@ -113,6 +113,8 @@ def data + unless @data + begin + saved_lineno = $. ++ ++ # TODO It should be use `File.open`, but bundler-1.16.1 example expects Kernel#open. + open loaded_from, OPEN_MODE do |file| + begin + file.readline # discard encoding line +diff --git lib/rubygems/test_case.rb lib/rubygems/test_case.rb +index f7f216e5e3..39aa4fc9a7 100644 +--- lib/rubygems/test_case.rb ++++ lib/rubygems/test_case.rb +@@ -488,7 +488,7 @@ def git_gem name = 'a', version = 1 + + gemspec = "#{name}.gemspec" + +- open File.join(directory, gemspec), 'w' do |io| ++ File.open File.join(directory, gemspec), 'w' do |io| + io.write git_spec.to_ruby + end + +@@ -592,7 +592,7 @@ def mu_pp(obj) + # Reads a Marshal file at +path+ + + def read_cache(path) +- open path.dup.untaint, 'rb' do |io| ++ File.open path.dup.untaint, 'rb' do |io| + Marshal.load io.read + end + end +@@ -612,7 +612,7 @@ def write_file(path) + dir = File.dirname path + FileUtils.mkdir_p dir unless File.directory? dir + +- open path, 'wb' do |io| ++ File.open path, 'wb' do |io| + yield io if block_given? + end + +@@ -727,7 +727,7 @@ def install_default_gems(*specs) + install_default_specs(*specs) + + specs.each do |spec| +- open spec.loaded_from, 'w' do |io| ++ File.open spec.loaded_from, 'w' do |io| + io.write spec.to_ruby_for_cache + end + end +@@ -1363,7 +1363,7 @@ def save_gemspec name = 'a', version = 1, directory = '.' + yield specification if block_given? + end + +- open File.join(directory, "#{name}.gemspec"), 'w' do |io| ++ File.open File.join(directory, "#{name}.gemspec"), 'w' do |io| + io.write vendor_spec.to_ruby + end + +diff --git lib/rubygems/test_utilities.rb lib/rubygems/test_utilities.rb +index 686916ea02..83c9d2d0fe 100644 +--- lib/rubygems/test_utilities.rb ++++ lib/rubygems/test_utilities.rb +@@ -346,7 +346,7 @@ def spec name, version, dependencies = nil, &block + end + + def write_spec spec # :nodoc: +- open spec.spec_file, 'w' do |io| ++ File.open spec.spec_file, 'w' do |io| + io.write spec.to_ruby_for_cache + end + end +diff --git lib/rubygems/util.rb lib/rubygems/util.rb +index 2de45c900b..6c75910004 100644 +--- lib/rubygems/util.rb ++++ lib/rubygems/util.rb +@@ -114,7 +114,8 @@ def self.traverse_parents directory, &block + + here = File.expand_path directory + loop do +- Dir.chdir here, &block ++ Dir.chdir here, &block rescue Errno::EACCES ++ + new_here = File.expand_path('..', here) + return if new_here == here # toplevel + here = new_here +diff --git lib/rubygems/validator.rb lib/rubygems/validator.rb +index 83448229bb..6842e4fa9c 100644 +--- lib/rubygems/validator.rb ++++ lib/rubygems/validator.rb +@@ -34,7 +34,7 @@ def verify_gem(gem_data) + # gem_path:: [String] Path to gem file + + def verify_gem_file(gem_path) +- open gem_path, Gem.binary_mode do |file| ++ File.open gem_path, Gem.binary_mode do |file| + gem_data = file.read + verify_gem gem_data + end +@@ -109,7 +109,7 @@ def alien(gems=[]) + + good, gone, unreadable = nil, nil, nil, nil + +- open gem_path, Gem.binary_mode do |file| ++ File.open gem_path, Gem.binary_mode do |file| + package = Gem::Package.new gem_path + + good, gone = package.contents.partition { |file_name| +@@ -134,7 +134,7 @@ def alien(gems=[]) + + source = File.join gem_directory, entry['path'] + +- open source, Gem.binary_mode do |f| ++ File.open source, Gem.binary_mode do |f| + unless f.read == data then + errors[gem_name][entry['path']] = "Modified from original" + end +diff --git test/rubygems/test_gem.rb test/rubygems/test_gem.rb +index 8a11cc2ecf..183771f0f3 100644 +--- test/rubygems/test_gem.rb ++++ test/rubygems/test_gem.rb +@@ -7,7 +7,7 @@ + require 'tmpdir' + + # TODO: push this up to test_case.rb once battle tested +-$SAFE=1 ++ + $LOAD_PATH.map! do |path| + path.dup.untaint + end +@@ -463,7 +463,7 @@ def test_self_ensure_gem_directories_missing_parents + assert File.directory?(util_cache_dir) + end + +- unless win_platform? then # only for FS that support write protection ++ unless win_platform? || Process.uid.zero? then # only for FS that support write protection + def test_self_ensure_gem_directories_write_protected + gemdir = File.join @tempdir, "egd" + FileUtils.rm_r gemdir rescue nil +@@ -775,7 +775,7 @@ def test_self_prefix_sitelibdir + end + + def test_self_read_binary +- open 'test', 'w' do |io| ++ File.open 'test', 'w' do |io| + io.write "\xCF\x80" + end + +@@ -1643,7 +1643,7 @@ def test_use_gemdeps + spec = Gem::Specification.find { |s| s == spec } + refute spec.activated? + +- open gem_deps_file, 'w' do |io| ++ File.open gem_deps_file, 'w' do |io| + io.write 'gem "a"' + end + +@@ -1662,7 +1662,7 @@ def test_use_gemdeps_ENV + + refute spec.activated? + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.write 'gem "a"' + end + +@@ -1706,7 +1706,7 @@ def test_use_gemdeps_automatic + + refute spec.activated? + +- open 'Gemfile', 'w' do |io| ++ File.open 'Gemfile', 'w' do |io| + io.write 'gem "a"' + end + +@@ -1735,7 +1735,7 @@ def test_use_gemdeps_disabled + + refute spec.activated? + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.write 'gem "a"' + end + +@@ -1750,7 +1750,7 @@ def test_use_gemdeps_missing_gem + skip 'Insecure operation - read' if RUBY_VERSION <= "1.8.7" + rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], 'x' + +- open 'x', 'w' do |io| ++ File.open 'x', 'w' do |io| + io.write 'gem "a"' + end + +@@ -1791,7 +1791,7 @@ def test_use_gemdeps_specific + spec = Gem::Specification.find { |s| s == spec } + refute spec.activated? + +- open 'x', 'w' do |io| ++ File.open 'x', 'w' do |io| + io.write 'gem "a"' + end + +diff --git test/rubygems/test_gem_commands_cleanup_command.rb test/rubygems/test_gem_commands_cleanup_command.rb +index c55e195975..60d208fcc0 100644 +--- test/rubygems/test_gem_commands_cleanup_command.rb ++++ test/rubygems/test_gem_commands_cleanup_command.rb +@@ -158,7 +158,7 @@ def test_execute_all_user_no_sudo + assert_path_exists @a_1_1.gem_dir + ensure + FileUtils.chmod 0755, @gemhome +- end unless win_platform? ++ end unless win_platform? || Process.uid.zero? + + def test_execute_dry_run + @cmd.options[:args] = %w[a] +diff --git test/rubygems/test_gem_commands_install_command.rb test/rubygems/test_gem_commands_install_command.rb +index dd86a85038..822d40e3f3 100644 +--- test/rubygems/test_gem_commands_install_command.rb ++++ test/rubygems/test_gem_commands_install_command.rb +@@ -131,6 +131,7 @@ def test_execute_local_transitive_prerelease + + def test_execute_no_user_install + skip 'skipped on MS Windows (chmod has no effect)' if win_platform? ++ skip 'skipped in root privilege' if Process.uid.zero? + + specs = spec_fetcher do |fetcher| + fetcher.gem 'a', 2 +diff --git test/rubygems/test_gem_commands_owner_command.rb test/rubygems/test_gem_commands_owner_command.rb +index 44652c1093..53cac4ce87 100644 +--- test/rubygems/test_gem_commands_owner_command.rb ++++ test/rubygems/test_gem_commands_owner_command.rb +@@ -43,6 +43,31 @@ def test_show_owners + assert_match %r{- 4}, @ui.output + end + ++ def test_show_owners_dont_load_objects ++ skip "testing a psych-only API" unless defined?(::Psych::DisallowedClass) ++ ++ response = < 0 +- assert Gem::Specification.find_all_by_name('x').length == 0 ++ assert Gem::Specification.find_all_by_name('x').length.zero? + end + + def test_execute_all +diff --git test/rubygems/test_gem_dependency_installer.rb test/rubygems/test_gem_dependency_installer.rb +index e55cc75682..3d76291668 100644 +--- test/rubygems/test_gem_dependency_installer.rb ++++ test/rubygems/test_gem_dependency_installer.rb +@@ -424,7 +424,7 @@ def test_install_dependency_existing_extension + extconf_rb = File.join @gemhome, 'gems', 'e-1', 'extconf.rb' + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |io| ++ File.open extconf_rb, 'w' do |io| + io.write <<-EXTCONF_RB + require 'mkmf' + create_makefile 'e' +diff --git test/rubygems/test_gem_doctor.rb test/rubygems/test_gem_doctor.rb +index 39b8a11692..8db65d70ce 100644 +--- test/rubygems/test_gem_doctor.rb ++++ test/rubygems/test_gem_doctor.rb +@@ -24,7 +24,7 @@ def test_doctor + + FileUtils.rm b.spec_file + +- open c.spec_file, 'w' do |io| ++ File.open c.spec_file, 'w' do |io| + io.write 'this will raise an exception when evaluated.' + end + +@@ -77,7 +77,7 @@ def test_doctor_dry_run + + FileUtils.rm b.spec_file + +- open c.spec_file, 'w' do |io| ++ File.open c.spec_file, 'w' do |io| + io.write 'this will raise an exception when evaluated.' + end + +diff --git test/rubygems/test_gem_ext_builder.rb test/rubygems/test_gem_ext_builder.rb +index d142ef28da..3dabd3e350 100644 +--- test/rubygems/test_gem_ext_builder.rb ++++ test/rubygems/test_gem_ext_builder.rb +@@ -32,7 +32,7 @@ def test_class_make + results = [] + + Dir.chdir @ext do +- open 'Makefile', 'w' do |io| ++ File.open 'Makefile', 'w' do |io| + io.puts <<-MAKEFILE + all: + \t@#{Gem.ruby} -e "puts %Q{all: \#{ENV['DESTDIR']}}" +@@ -72,7 +72,7 @@ def test_class_make_no_clean + results = [] + + Dir.chdir @ext do +- open 'Makefile', 'w' do |io| ++ File.open 'Makefile', 'w' do |io| + io.puts <<-MAKEFILE + all: + \t@#{Gem.ruby} -e "puts %Q{all: \#{ENV['DESTDIR']}}" +@@ -107,7 +107,7 @@ def test_build_extensions + + extconf_rb = File.join ext_dir, 'extconf.rb' + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' + require 'mkmf' + +@@ -168,7 +168,7 @@ def Gem.install_extension_in_lib + + extconf_rb = File.join ext_dir, 'extconf.rb' + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' + require 'mkmf' + +@@ -290,7 +290,7 @@ def test_build_extensions_with_build_args + + FileUtils.mkdir_p @spec.gem_dir + +- open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| ++ File.open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| + f.write <<-'RUBY' + puts "IN EXTCONF" + extconf_args = File.join File.dirname(__FILE__), 'extconf_args' +@@ -323,7 +323,7 @@ def test_initialize + + build_info_file = File.join build_info_dir, "#{@spec.full_name}.info" + +- open build_info_file, 'w' do |io| ++ File.open build_info_file, 'w' do |io| + io.puts '--with-foo-dir=/nonexistent' + end + +diff --git test/rubygems/test_gem_gem_runner.rb test/rubygems/test_gem_gem_runner.rb +index 0a1faa404a..d68ac4da81 100644 +--- test/rubygems/test_gem_gem_runner.rb ++++ test/rubygems/test_gem_gem_runner.rb +@@ -1,38 +1,6 @@ + # frozen_string_literal: true + require 'rubygems/test_case' +-begin +- gem_home_files = lambda{ +- if Dir.exist?(ENV["GEM_HOME"]) +- require "find" +- ary = Find.find(ENV["GEM_HOME"]).to_a +- else +- [] +- end +- } +- prev_gem_home = ENV["GEM_HOME"] +- prev_gem_home_files = gem_home_files.call +- prev_threads = Thread.list.map{|e| e.inspect} +- +- require 'rubygems/gem_runner' +-ensure +- if $! +- msg = < 'KEY' } + FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path + +- open Gem.configuration.credentials_path, 'w' do |f| ++ File.open Gem.configuration.credentials_path, 'w' do |f| + f.write keys.to_yaml + end + +@@ -59,7 +59,7 @@ def test_api_key_override + keys = { :rubygems_api_key => 'KEY', :other => 'OTHER' } + FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path + +- open Gem.configuration.credentials_path, 'w' do |f| ++ File.open Gem.configuration.credentials_path, 'w' do |f| + f.write keys.to_yaml + end + +@@ -163,7 +163,7 @@ def test_sign_in_with_other_credentials_doesnt_overwrite_other_keys + other_api_key = 'f46dbb18bb6a9c97cdc61b5b85c186a17403cdcbf' + + FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path) +- open Gem.configuration.credentials_path, 'w' do |f| ++ File.open Gem.configuration.credentials_path, 'w' do |f| + f.write Hash[:other_api_key, other_api_key].to_yaml + end + util_sign_in [api_key, 200, 'OK'] +diff --git test/rubygems/test_gem_indexer.rb test/rubygems/test_gem_indexer.rb +index a4a966e8de..5a9075e676 100644 +--- test/rubygems/test_gem_indexer.rb ++++ test/rubygems/test_gem_indexer.rb +@@ -39,8 +39,7 @@ def setup + + def test_initialize + assert_equal @tempdir, @indexer.dest_directory +- assert_equal File.join(Dir.tmpdir, "gem_generate_index_#{$$}"), +- @indexer.directory ++ assert_match %r{#{Dir.mktmpdir('gem_generate_index').match(/.*-/)}}, @indexer.directory + + indexer = Gem::Indexer.new @tempdir + assert indexer.build_modern +diff --git test/rubygems/test_gem_install_update_options.rb test/rubygems/test_gem_install_update_options.rb +index e2d546307d..371e408d27 100644 +--- test/rubygems/test_gem_install_update_options.rb ++++ test/rubygems/test_gem_install_update_options.rb +@@ -141,6 +141,8 @@ def test_user_install_enabled + def test_user_install_disabled_read_only + if win_platform? + skip('test_user_install_disabled_read_only test skipped on MS Windows') ++ elsif Process.uid.zero? ++ skip('test_user_install_disabled_read_only test skipped in root privilege') + else + @cmd.handle_options %w[--no-user-install] + +diff --git test/rubygems/test_gem_installer.rb test/rubygems/test_gem_installer.rb +index 39095c7dee..93b0482407 100644 +--- test/rubygems/test_gem_installer.rb ++++ test/rubygems/test_gem_installer.rb +@@ -140,7 +140,7 @@ def test_check_executable_overwrite_format_executable + s.require_path = 'lib' + end + +- open File.join(util_inst_bindir, 'executable'), 'w' do |io| ++ File.open File.join(util_inst_bindir, 'executable'), 'w' do |io| + io.write <<-EXEC + #!/usr/local/bin/ruby + # +@@ -437,6 +437,8 @@ def test_generate_bin_script_no_perms + + if win_platform? + skip('test_generate_bin_script_no_perms skipped on MS Windows') ++ elsif Process.uid.zero? ++ skip('test_generate_bin_script_no_perms skipped in root privilege') + else + FileUtils.chmod 0000, util_inst_bindir + +@@ -529,6 +531,8 @@ def test_generate_bin_symlink_no_perms + + if win_platform? + skip('test_generate_bin_symlink_no_perms skipped on MS Windows') ++ elsif Process.uid.zero? ++ skip('test_user_install_disabled_read_only test skipped in root privilege') + else + FileUtils.chmod 0000, util_inst_bindir + +diff --git test/rubygems/test_gem_package.rb test/rubygems/test_gem_package.rb +index cec1981c4c..d1664cf285 100644 +--- test/rubygems/test_gem_package.rb ++++ test/rubygems/test_gem_package.rb +@@ -24,7 +24,7 @@ def setup + end + + def test_class_new_old_format +- open 'old_format.gem', 'wb' do |io| ++ File.open 'old_format.gem', 'wb' do |io| + io.write SIMPLE_GEM + end + +@@ -45,7 +45,7 @@ def test_add_checksums + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -110,8 +110,8 @@ def test_add_files + + FileUtils.mkdir_p 'lib/empty' + +- open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end +- open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end ++ File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end ++ File.open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end + + package = Gem::Package.new 'bogus.gem' + package.spec = spec +@@ -140,7 +140,7 @@ def test_add_files_symlink + spec.files = %w[lib/code.rb lib/code_sym.rb] + + FileUtils.mkdir_p 'lib' +- open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end ++ File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end + + # NOTE: 'code.rb' is correct, because it's relative to lib/code_sym.rb + File.symlink('code.rb', 'lib/code_sym.rb') +@@ -179,7 +179,7 @@ def test_build + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -218,7 +218,7 @@ def test_build_auto_signed + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -261,7 +261,7 @@ def test_build_auto_signed_encrypted_key + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -311,7 +311,7 @@ def test_build_signed + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -348,7 +348,7 @@ def test_build_signed_encrypted_key + + FileUtils.mkdir 'lib' + +- open 'lib/code.rb', 'w' do |io| ++ File.open 'lib/code.rb', 'w' do |io| + io.write '# lib/code.rb' + end + +@@ -408,7 +408,7 @@ def test_extract_files_empty + end + end + +- open 'empty.gem', 'wb' do |io| ++ File.open 'empty.gem', 'wb' do |io| + io.write gem.string + end + +@@ -455,6 +455,31 @@ def test_extract_tar_gz_symlink_relative_path + File.read(extracted) + end + ++ def test_extract_symlink_parent ++ skip 'symlink not supported' if Gem.win_platform? ++ ++ package = Gem::Package.new @gem ++ ++ tgz_io = util_tar_gz do |tar| ++ tar.mkdir 'lib', 0755 ++ tar.add_symlink 'lib/link', '../..', 0644 ++ tar.add_file 'lib/link/outside.txt', 0644 do |io| io.write 'hi' end ++ end ++ ++ # Extract into a subdirectory of @destination; if this test fails it writes ++ # a file outside destination_subdir, but we want the file to remain inside ++ # @destination so it will be cleaned up. ++ destination_subdir = File.join @destination, 'subdir' ++ FileUtils.mkdir_p destination_subdir ++ ++ e = assert_raises Gem::Package::PathError do ++ package.extract_tar_gz tgz_io, destination_subdir ++ end ++ ++ assert_equal("installing into parent path lib/link/outside.txt of " + ++ "#{destination_subdir} is not allowed", e.message) ++ end ++ + def test_extract_tar_gz_directory + package = Gem::Package.new @gem + +@@ -566,6 +591,21 @@ def test_install_location_relative + "#{@destination} is not allowed", e.message) + end + ++ def test_install_location_suffix ++ package = Gem::Package.new @gem ++ ++ filename = "../#{File.basename(@destination)}suffix.rb" ++ ++ e = assert_raises Gem::Package::PathError do ++ package.install_location filename, @destination ++ end ++ ++ parent = File.expand_path File.join @destination, filename ++ ++ assert_equal("installing into parent path #{parent} of " + ++ "#{@destination} is not allowed", e.message) ++ end ++ + def test_load_spec + entry = StringIO.new Gem.gzip @spec.to_yaml + def entry.full_name() 'metadata.gz' end +@@ -620,7 +660,7 @@ def test_verify_checksum_bad + end + end + +- open 'mismatch.gem', 'wb' do |io| ++ File.open 'mismatch.gem', 'wb' do |io| + io.write gem.string + end + +@@ -670,7 +710,7 @@ def test_verify_checksum_missing + end + end + +- open 'data_checksum_missing.gem', 'wb' do |io| ++ File.open 'data_checksum_missing.gem', 'wb' do |io| + io.write gem.string + end + +@@ -723,6 +763,32 @@ def test_verify_nonexistent + assert_match %r%nonexistent.gem$%, e.message + end + ++ def test_verify_duplicate_file ++ FileUtils.mkdir_p 'lib' ++ FileUtils.touch 'lib/code.rb' ++ ++ build = Gem::Package.new @gem ++ build.spec = @spec ++ build.setup_signer ++ open @gem, 'wb' do |gem_io| ++ Gem::Package::TarWriter.new gem_io do |gem| ++ build.add_metadata gem ++ build.add_contents gem ++ ++ gem.add_file_simple 'a.sig', 0444, 0 ++ gem.add_file_simple 'a.sig', 0444, 0 ++ end ++ end ++ ++ package = Gem::Package.new @gem ++ ++ e = assert_raises Gem::Security::Exception do ++ package.verify ++ end ++ ++ assert_equal 'duplicate files in the package: ("a.sig")', e.message ++ end ++ + def test_verify_security_policy + skip 'openssl is missing' unless defined?(OpenSSL::SSL) + +@@ -773,14 +839,20 @@ def test_verify_security_policy_checksum_missing + FileUtils.mkdir 'lib' + FileUtils.touch 'lib/code.rb' + +- open @gem, 'wb' do |gem_io| ++ File.open @gem, 'wb' do |gem_io| + Gem::Package::TarWriter.new gem_io do |gem| + build.add_metadata gem + build.add_contents gem + + # write bogus data.tar.gz to foil signature + bogus_data = Gem.gzip 'hello' +- gem.add_file_simple 'data.tar.gz', 0444, bogus_data.length do |io| ++ fake_signer = Class.new do ++ def digest_name; 'SHA512'; end ++ def digest_algorithm; Digest(:SHA512); end ++ def key; 'key'; end ++ def sign(*); 'fake_sig'; end ++ end ++ gem.add_file_signed 'data2.tar.gz', 0444, fake_signer.new do |io| + io.write bogus_data + end + +@@ -804,7 +876,7 @@ def test_verify_security_policy_checksum_missing + end + + def test_verify_truncate +- open 'bad.gem', 'wb' do |io| ++ File.open 'bad.gem', 'wb' do |io| + io.write File.read(@gem, 1024) # don't care about newlines + end + +diff --git test/rubygems/test_gem_package_old.rb test/rubygems/test_gem_package_old.rb +index c15475b0c7..604981b3c1 100644 +--- test/rubygems/test_gem_package_old.rb ++++ test/rubygems/test_gem_package_old.rb +@@ -7,7 +7,7 @@ class TestGemPackageOld < Gem::TestCase + def setup + super + +- open 'old_format.gem', 'wb' do |io| ++ File.open 'old_format.gem', 'wb' do |io| + io.write SIMPLE_GEM + end + +diff --git test/rubygems/test_gem_package_tar_header.rb test/rubygems/test_gem_package_tar_header.rb +index d33877057d..43f508df45 100644 +--- test/rubygems/test_gem_package_tar_header.rb ++++ test/rubygems/test_gem_package_tar_header.rb +@@ -143,5 +143,26 @@ def test_update_checksum + assert_equal '012467', @tar_header.checksum + end + ++ def test_from_bad_octal ++ test_cases = [ ++ "00000006,44\000", # bogus character ++ "00000006789\000", # non-octal digit ++ "+0000001234\000", # positive sign ++ "-0000001000\000", # negative sign ++ "0x000123abc\000", # radix prefix ++ ] ++ ++ test_cases.each do |val| ++ header_s = @tar_header.to_s ++ # overwrite the size field ++ header_s[124, 12] = val ++ io = TempIO.new header_s ++ assert_raises ArgumentError do ++ new_header = Gem::Package::TarHeader.from io ++ end ++ io.close! if io.respond_to? :close! ++ end ++ end ++ + end + +diff --git test/rubygems/test_gem_rdoc.rb test/rubygems/test_gem_rdoc.rb +index 76ca8c45a9..0355883cb3 100644 +--- test/rubygems/test_gem_rdoc.rb ++++ test/rubygems/test_gem_rdoc.rb +@@ -223,6 +223,7 @@ def test_remove + + def test_remove_unwritable + skip 'chmod not supported' if Gem.win_platform? ++ skip 'skipped in root privilege' if Process.uid.zero? + FileUtils.mkdir_p @a.base_dir + FileUtils.chmod 0, @a.base_dir + +@@ -251,6 +252,7 @@ def test_setup + + def test_setup_unwritable + skip 'chmod not supported' if Gem.win_platform? ++ skip 'skipped in root privilege' if Process.uid.zero? + FileUtils.mkdir_p @a.doc_dir + FileUtils.chmod 0, @a.doc_dir + +diff --git test/rubygems/test_gem_remote_fetcher.rb test/rubygems/test_gem_remote_fetcher.rb +index ee5ac77717..20e34e84e1 100644 +--- test/rubygems/test_gem_remote_fetcher.rb ++++ test/rubygems/test_gem_remote_fetcher.rb +@@ -431,7 +431,7 @@ def test_download_install_dir + assert File.exist?(a1_cache_gem) + end + +- unless win_platform? # File.chmod doesn't work ++ unless win_platform? || Process.uid.zero? # File.chmod doesn't work + def test_download_local_read_only + FileUtils.mv @a1_gem, @tempdir + local_path = File.join @tempdir, @a1.file_name +diff --git test/rubygems/test_gem_request_set.rb test/rubygems/test_gem_request_set.rb +index 3a48827481..5dc6c1518d 100644 +--- test/rubygems/test_gem_request_set.rb ++++ test/rubygems/test_gem_request_set.rb +@@ -52,7 +52,7 @@ def test_install_from_gemdeps + rs = Gem::RequestSet.new + installed = [] + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "a"' + io.flush + +@@ -78,7 +78,7 @@ def test_install_from_gemdeps_explain + + rs = Gem::RequestSet.new + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "a"' + io.flush + +@@ -104,7 +104,7 @@ def test_install_from_gemdeps_install_dir + rs = Gem::RequestSet.new + installed = [] + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "a"' + end + +@@ -128,7 +128,7 @@ def test_install_from_gemdeps_local + + rs = Gem::RequestSet.new + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "a"' + io.flush + +@@ -150,7 +150,7 @@ def test_install_from_gemdeps_lockfile + rs = Gem::RequestSet.new + installed = [] + +- open 'gem.deps.rb.lock', 'w' do |io| ++ File.open 'gem.deps.rb.lock', 'w' do |io| + io.puts <<-LOCKFILE + GEM + remote: #{@gem_repo} +@@ -167,7 +167,7 @@ def test_install_from_gemdeps_lockfile + LOCKFILE + end + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts 'gem "b"' + end + +@@ -190,7 +190,7 @@ def test_install_from_gemdeps_version_mismatch + rs = Gem::RequestSet.new + installed = [] + +- open 'gem.deps.rb', 'w' do |io| ++ File.open 'gem.deps.rb', 'w' do |io| + io.puts <<-GEM_DEPS + gem "a" + ruby "0" +diff --git test/rubygems/test_gem_request_set_lockfile.rb test/rubygems/test_gem_request_set_lockfile.rb +index 908f97303e..7460b7efad 100644 +--- test/rubygems/test_gem_request_set_lockfile.rb ++++ test/rubygems/test_gem_request_set_lockfile.rb +@@ -31,7 +31,7 @@ def lockfile + def write_lockfile lockfile + @lock_file = File.expand_path "#{@gem_deps_file}.lock" + +- open @lock_file, 'w' do |io| ++ File.open @lock_file, 'w' do |io| + io.write lockfile + end + end +@@ -387,7 +387,7 @@ def test_to_s_git + s.add_dependency 'c', '~> 1.0' + end + +- open 'b.gemspec', 'w' do |io| ++ File.open 'b.gemspec', 'w' do |io| + io.write b.to_ruby + end + +@@ -400,7 +400,7 @@ def test_to_s_git + Dir.chdir 'c' do + c = Gem::Specification.new 'c', 1 + +- open 'c.gemspec', 'w' do |io| ++ File.open 'c.gemspec', 'w' do |io| + io.write c.to_ruby + end + +@@ -455,7 +455,7 @@ def test_write_error + + gem_deps_lock_file = "#{@gem_deps_file}.lock" + +- open gem_deps_lock_file, 'w' do |io| ++ File.open gem_deps_lock_file, 'w' do |io| + io.write 'hello' + end + +diff --git test/rubygems/test_gem_request_set_lockfile_parser.rb test/rubygems/test_gem_request_set_lockfile_parser.rb +index 9946c522d9..f3517da43a 100644 +--- test/rubygems/test_gem_request_set_lockfile_parser.rb ++++ test/rubygems/test_gem_request_set_lockfile_parser.rb +@@ -536,7 +536,7 @@ def test_parse_missing + end + + def write_lockfile lockfile +- open @lock_file, 'w' do |io| ++ File.open @lock_file, 'w' do |io| + io.write lockfile + end + end +diff --git test/rubygems/test_gem_request_set_lockfile_tokenizer.rb test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +index ab506a14e6..f4aba6d94a 100644 +--- test/rubygems/test_gem_request_set_lockfile_tokenizer.rb ++++ test/rubygems/test_gem_request_set_lockfile_tokenizer.rb +@@ -295,7 +295,7 @@ def test_unget + end + + def write_lockfile lockfile +- open @lock_file, 'w' do |io| ++ File.open @lock_file, 'w' do |io| + io.write lockfile + end + end +diff --git test/rubygems/test_gem_resolver_git_specification.rb test/rubygems/test_gem_resolver_git_specification.rb +index 9e8e2c5715..211757eb20 100644 +--- test/rubygems/test_gem_resolver_git_specification.rb ++++ test/rubygems/test_gem_resolver_git_specification.rb +@@ -70,7 +70,7 @@ def test_install_extension + Dir.chdir 'git/a' do + FileUtils.mkdir_p 'ext/lib' + +- open 'ext/extconf.rb', 'w' do |io| ++ File.open 'ext/extconf.rb', 'w' do |io| + io.puts 'require "mkmf"' + io.puts 'create_makefile "a"' + end +diff --git test/rubygems/test_gem_server.rb test/rubygems/test_gem_server.rb +index 6fe02e480f..a018e65512 100644 +--- test/rubygems/test_gem_server.rb ++++ test/rubygems/test_gem_server.rb +@@ -100,7 +100,7 @@ def test_latest_specs_gemdirs + specs_dir = File.join dir, 'specifications' + FileUtils.mkdir_p specs_dir + +- open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| + io.write spec.to_ruby + end + +@@ -198,7 +198,7 @@ def test_quick_gemdirs + + FileUtils.mkdir_p specs_dir + +- open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| + io.write spec.to_ruby + end + +@@ -339,7 +339,7 @@ def test_root_gemdirs + specs_dir = File.join dir, 'specifications' + FileUtils.mkdir_p specs_dir + +- open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| + io.write spec.to_ruby + end + +@@ -353,6 +353,171 @@ def test_root_gemdirs + assert_match 'z 9', @res.body + end + ++ ++ def test_xss_homepage_fix_289313 ++ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" ++ dir = "#{@gemhome}2" ++ ++ spec = util_spec 'xsshomepagegem', 1 ++ spec.homepage = "javascript:confirm(document.domain)" ++ ++ specs_dir = File.join dir, 'specifications' ++ FileUtils.mkdir_p specs_dir ++ ++ open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ io.write spec.to_ruby ++ end ++ ++ server = Gem::Server.new dir, process_based_port, false ++ ++ @req.parse data ++ ++ server.root @req, @res ++ ++ assert_equal 200, @res.status ++ assert_match 'xsshomepagegem 1', @res.body ++ ++ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a ++ # valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here, ++ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be ++ # validated in future versions of Gem::Specification. ++ # ++ # There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex: ++ # ++ # Variant #1 - rdoc not installed ++ # ++ # xsshomepagegem 1 ++ # ++ # ++ # [rdoc] ++ # ++ # ++ # ++ # [www] ++ # ++ # Variant #2 - rdoc installed ++ # ++ # xsshomepagegem 1 ++ # ++ # ++ # \[rdoc\]<\/a> ++ # ++ # ++ # ++ # [www] ++ regex_match = /xsshomepagegem 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ ++ assert_match regex_match, @res.body ++ end ++ ++ def test_invalid_homepage ++ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" ++ dir = "#{@gemhome}2" ++ ++ spec = util_spec 'invalidhomepagegem', 1 ++ spec.homepage = "notavalidhomepageurl" ++ ++ specs_dir = File.join dir, 'specifications' ++ FileUtils.mkdir_p specs_dir ++ ++ open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ io.write spec.to_ruby ++ end ++ ++ server = Gem::Server.new dir, process_based_port, false ++ ++ @req.parse data ++ ++ server.root @req, @res ++ ++ assert_equal 200, @res.status ++ assert_match 'invalidhomepagegem 1', @res.body ++ ++ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a ++ # valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here, ++ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be ++ # validated in future versions of Gem::Specification. ++ # ++ # There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex: ++ # ++ # Variant #1 - rdoc not installed ++ # ++ # invalidhomepagegem 1 ++ # ++ # ++ # [rdoc] ++ # ++ # ++ # ++ # [www] ++ # ++ # Variant #2 - rdoc installed ++ # ++ # invalidhomepagegem 1 ++ # ++ # ++ # \[rdoc\]<\/a> ++ # ++ # ++ # ++ # [www] ++ regex_match = /invalidhomepagegem 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ ++ assert_match regex_match, @res.body ++ end ++ ++ def test_valid_homepage_http ++ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" ++ dir = "#{@gemhome}2" ++ ++ spec = util_spec 'validhomepagegemhttp', 1 ++ spec.homepage = "http://rubygems.org" ++ ++ specs_dir = File.join dir, 'specifications' ++ FileUtils.mkdir_p specs_dir ++ ++ open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ io.write spec.to_ruby ++ end ++ ++ server = Gem::Server.new dir, process_based_port, false ++ ++ @req.parse data ++ ++ server.root @req, @res ++ ++ assert_equal 200, @res.status ++ assert_match 'validhomepagegemhttp 1', @res.body ++ ++ regex_match = /validhomepagegemhttp 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ ++ assert_match regex_match, @res.body ++ end ++ ++ def test_valid_homepage_https ++ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" ++ dir = "#{@gemhome}2" ++ ++ spec = util_spec 'validhomepagegemhttps', 1 ++ spec.homepage = "https://rubygems.org" ++ ++ specs_dir = File.join dir, 'specifications' ++ FileUtils.mkdir_p specs_dir ++ ++ open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ io.write spec.to_ruby ++ end ++ ++ server = Gem::Server.new dir, process_based_port, false ++ ++ @req.parse data ++ ++ server.root @req, @res ++ ++ assert_equal 200, @res.status ++ assert_match 'validhomepagegemhttps 1', @res.body ++ ++ regex_match = /validhomepagegemhttps 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ ++ assert_match regex_match, @res.body ++ end ++ + def test_specs + data = StringIO.new "GET /specs.#{Gem.marshal_version} HTTP/1.0\r\n\r\n" + @req.parse data +@@ -378,7 +543,7 @@ def test_specs_gemdirs + specs_dir = File.join dir, 'specifications' + FileUtils.mkdir_p specs_dir + +- open File.join(specs_dir, spec.spec_name), 'w' do |io| ++ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| + io.write spec.to_ruby + end + +diff --git test/rubygems/test_gem_source.rb test/rubygems/test_gem_source.rb +index 4a93e222f8..8805a9b404 100644 +--- test/rubygems/test_gem_source.rb ++++ test/rubygems/test_gem_source.rb +@@ -110,7 +110,7 @@ def test_fetch_spec_cached + + cache_file = File.join cache_dir, a1.spec_name + +- open cache_file, 'wb' do |io| ++ File.open cache_file, 'wb' do |io| + Marshal.dump a1, io + end + +@@ -163,7 +163,7 @@ def test_load_specs_cached + + cache_file = File.join cache_dir, "latest_specs.#{Gem.marshal_version}" + +- open cache_file, 'wb' do |io| ++ File.open cache_file, 'wb' do |io| + Marshal.dump latest_specs, io + end + +@@ -187,7 +187,7 @@ def test_load_specs_cached_empty + + cache_file = File.join cache_dir, "latest_specs.#{Gem.marshal_version}" + +- open cache_file, 'wb' do |io| ++ File.open cache_file, 'wb' do |io| + # Setup invalid data in the cache: + io.write Marshal.dump(latest_specs)[0, 10] + end +diff --git test/rubygems/test_gem_source_git.rb test/rubygems/test_gem_source_git.rb +index 0e13a11e7e..8f5d3ee745 100644 +--- test/rubygems/test_gem_source_git.rb ++++ test/rubygems/test_gem_source_git.rb +@@ -229,7 +229,7 @@ def test_specs + Dir.chdir 'b' do + b = Gem::Specification.new 'b', 1 + +- open 'b.gemspec', 'w' do |io| ++ File.open 'b.gemspec', 'w' do |io| + io.write b.to_ruby + end + +diff --git test/rubygems/test_gem_specification.rb test/rubygems/test_gem_specification.rb +index bb6acbc7de..badb297eee 100644 +--- test/rubygems/test_gem_specification.rb ++++ test/rubygems/test_gem_specification.rb +@@ -922,7 +922,7 @@ def test_self_load + end + + def test_self_load_relative +- open 'a-2.gemspec', 'w' do |io| ++ File.open 'a-2.gemspec', 'w' do |io| + io.write @a2.to_ruby_for_cache + end + +@@ -948,6 +948,9 @@ def test_self_load_tainted + @a2.files.clear + + assert_equal @a2, spec ++ ++ ensure ++ $SAFE = 0 + end + + def test_self_load_escape_curly +@@ -1111,7 +1114,7 @@ def test_self_remove_spec + end + + def test_self_remove_spec_removed +- open @a1.spec_file, 'w' do |io| ++ File.open @a1.spec_file, 'w' do |io| + io.write @a1.to_ruby + end + +@@ -1363,13 +1366,13 @@ def test_build_args + + assert_empty @ext.build_args + +- open @ext.build_info_file, 'w' do |io| ++ File.open @ext.build_info_file, 'w' do |io| + io.puts + end + + assert_empty @ext.build_args + +- open @ext.build_info_file, 'w' do |io| ++ File.open @ext.build_info_file, 'w' do |io| + io.puts '--with-foo-dir=wherever' + end + +@@ -1385,9 +1388,9 @@ def test_build_extensions + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -1435,9 +1438,9 @@ def test_build_extensions_default_gem + extconf_rb = File.join spec.gem_dir, spec.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" + end +@@ -1461,6 +1464,7 @@ def test_build_extensions_error + + def test_build_extensions_extensions_dir_unwritable + skip 'chmod not supported' if Gem.win_platform? ++ skip 'skipped in root privilege' if Process.uid.zero? + + ext_spec + +@@ -1469,9 +1473,9 @@ def test_build_extensions_extensions_dir_unwritable + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -1486,7 +1490,7 @@ def test_build_extensions_extensions_dir_unwritable + @ext.build_extensions + refute_path_exists @ext.extension_dir + ensure +- unless ($DEBUG or win_platform?) then ++ unless ($DEBUG or win_platform? or Process.uid.zero?) then + FileUtils.chmod 0755, File.join(@ext.base_dir, 'extensions') + FileUtils.chmod 0755, @ext.base_dir + end +@@ -1502,9 +1506,9 @@ def test_build_extensions_no_extensions_dir_unwritable + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -1551,9 +1555,9 @@ def test_build_extensions_preview + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -2882,7 +2886,22 @@ def test_validate_homepage + @a1.validate + end + +- assert_equal '"over at my cool site" is not a URI', e.message ++ assert_equal '"over at my cool site" is not a valid HTTP URI', e.message ++ ++ @a1.homepage = 'ftp://rubygems.org' ++ ++ e = assert_raises Gem::InvalidSpecificationException do ++ @a1.validate ++ end ++ ++ assert_equal '"ftp://rubygems.org" is not a valid HTTP URI', e.message ++ ++ @a1.homepage = 'http://rubygems.org' ++ assert_equal true, @a1.validate ++ ++ @a1.homepage = 'https://rubygems.org' ++ assert_equal true, @a1.validate ++ + end + end + +@@ -3418,9 +3437,9 @@ def test_missing_extensions_eh + extconf_rb = File.join @ext.gem_dir, @ext.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +diff --git test/rubygems/test_gem_stub_specification.rb test/rubygems/test_gem_stub_specification.rb +index 43680265c7..f9a3a236c0 100644 +--- test/rubygems/test_gem_stub_specification.rb ++++ test/rubygems/test_gem_stub_specification.rb +@@ -127,9 +127,9 @@ def test_missing_extensions_eh + extconf_rb = File.join s.gem_dir, s.extensions.first + FileUtils.mkdir_p File.dirname extconf_rb + +- open extconf_rb, 'w' do |f| ++ File.open extconf_rb, 'w' do |f| + f.write <<-'RUBY' +- open 'Makefile', 'w' do |f| ++ File.open 'Makefile', 'w' do |f| + f.puts "clean:\n\techo clean" + f.puts "default:\n\techo built" + f.puts "install:\n\techo installed" +@@ -149,7 +149,7 @@ def test_missing_extensions_eh_default_gem + spec = new_default_spec 'default', 1 + spec.extensions << 'extconf.rb' + +- open spec.loaded_from, 'w' do |io| ++ File.open spec.loaded_from, 'w' do |io| + io.write spec.to_ruby_for_cache + end + +@@ -198,7 +198,7 @@ def test_to_spec_missing_extensions + + def stub_with_version + spec = File.join @gemhome, 'specifications', 'stub_e-2.gemspec' +- open spec, 'w' do |io| ++ File.open spec, 'w' do |io| + io.write <<-STUB + # -*- encoding: utf-8 -*- + # stub: stub_v 2 ruby lib +@@ -221,7 +221,7 @@ def stub_with_version + + def stub_without_version + spec = File.join @gemhome, 'specifications', 'stub-2.gemspec' +- open spec, 'w' do |io| ++ File.open spec, 'w' do |io| + io.write <<-STUB + # -*- encoding: utf-8 -*- + # stub: stub_v ruby lib +@@ -245,7 +245,7 @@ def stub_without_version + + def stub_with_extension + spec = File.join @gemhome, 'specifications', 'stub_e-2.gemspec' +- open spec, 'w' do |io| ++ File.open spec, 'w' do |io| + io.write <<-STUB + # -*- encoding: utf-8 -*- + # stub: stub_e 2 ruby lib +@@ -271,7 +271,7 @@ def stub_with_extension + + def stub_without_extension + spec = File.join @gemhome, 'specifications', 'stub-2.gemspec' +- open spec, 'w' do |io| ++ File.open spec, 'w' do |io| + io.write <<-STUB + # -*- encoding: utf-8 -*- + # stub: stub 2 ruby lib +diff --git test/rubygems/test_gem_util.rb test/rubygems/test_gem_util.rb +index b85db44d51..3b7887d931 100644 +--- test/rubygems/test_gem_util.rb ++++ test/rubygems/test_gem_util.rb +@@ -5,6 +5,7 @@ + class TestGemUtil < Gem::TestCase + + def test_class_popen ++ skip "MJIT executes process and it's caught by Process.wait(-1)" if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? + assert_equal "0\n", Gem::Util.popen(Gem.ruby, '-e', 'p 0') + + assert_raises Errno::ECHILD do +@@ -29,6 +30,30 @@ def test_traverse_parents + loop { break if enum.next.nil? } # exhaust the enumerator + end + ++ def test_traverse_parents_does_not_crash_on_permissions_error ++ skip 'skipped on MS Windows (chmod has no effect)' if win_platform? ++ ++ FileUtils.mkdir_p 'd/e/f' ++ # remove 'execute' permission from "e" directory and make it ++ # impossible to cd into it and its children ++ FileUtils.chmod(0666, 'd/e') ++ ++ paths = Gem::Util.traverse_parents('d/e/f').to_a ++ ++ assert_equal File.join(@tempdir, 'd'), paths[0] ++ assert_equal @tempdir, paths[1] ++ if File.respond_to?(:realpath) ++ assert_equal File.realpath(Dir.tmpdir), paths[2] ++ assert_equal File.realpath("..", Dir.tmpdir), paths[3] ++ elsif RUBY_PLATFORM !~ /darwin/ ++ assert_equal Dir.tmpdir, paths[2] ++ assert_equal '/', paths[3] ++ end ++ ensure ++ # restore default permissions, allow the directory to be removed ++ FileUtils.chmod(0775, 'd/e') unless win_platform? ++ end ++ + def test_linked_list_find + list = [1,2,3,4,5].inject(Gem::List.new(0)) { |m,o| + Gem::List.new o, m +diff --git test/rubygems/test_gem_version.rb test/rubygems/test_gem_version.rb +index 56c818663e..792ad5f084 100644 +--- test/rubygems/test_gem_version.rb ++++ test/rubygems/test_gem_version.rb +@@ -2,6 +2,8 @@ + require 'rubygems/test_case' + require "rubygems/version" + ++require "minitest/benchmark" ++ + class TestGemVersion < Gem::TestCase + + class V < ::Gem::Version +@@ -102,6 +104,15 @@ def test_initialize_invalid + end + end + ++ def bench_anchored_version_pattern ++ assert_performance_linear 0.5 do |count| ++ version_string = count.times.map {|i| "0" * i.succ }.join(".") << "." ++ version_string =~ Gem::Version::ANCHORED_VERSION_PATTERN ++ end ++ rescue RegexpError ++ skip "It fails to allocate the memory for regex pattern of Gem::Version::ANCHORED_VERSION_PATTERN" ++ end ++ + def test_empty_version + ["", " ", " "].each do |empty| + assert_equal "0", Gem::Version.new(empty).version +diff --git test/rubygems/test_require.rb test/rubygems/test_require.rb +index a846f46833..e292ce226d 100644 +--- test/rubygems/test_require.rb ++++ test/rubygems/test_require.rb +@@ -38,18 +38,6 @@ def assert_require(path) + assert require(path), "'#{path}' was already required" + end + +- def append_latch spec +- dir = spec.gem_dir +- Dir.chdir dir do +- spec.files.each do |file| +- File.open file, 'a' do |fp| +- fp.puts "FILE_ENTERED_LATCH.release" +- fp.puts "FILE_EXIT_LATCH.await" +- end +- end +- end +- end +- + # Providing -I on the commandline should always beat gems + def test_dash_i_beats_gems + a1 = new_spec "a", "1", {"b" => "= 1"}, "lib/test_gem_require_a.rb" +@@ -80,6 +68,17 @@ def test_dash_i_beats_gems + Object.send :remove_const, :HELLO if Object.const_defined? :HELLO + end + ++ def create_sync_thread ++ Thread.new do ++ begin ++ yield ++ ensure ++ FILE_ENTERED_LATCH.release ++ FILE_EXIT_LATCH.await ++ end ++ end ++ end ++ + def test_concurrent_require + skip 'deadlock' if /^1\.8\./ =~ RUBY_VERSION + +@@ -91,11 +90,8 @@ def test_concurrent_require + + install_specs a1, b1 + +- append_latch a1 +- append_latch b1 +- +- t1 = Thread.new { assert_require 'a' } +- t2 = Thread.new { assert_require 'b' } ++ t1 = create_sync_thread{ assert_require 'a' } ++ t2 = create_sync_thread{ assert_require 'b' } + + # wait until both files are waiting on the exit latch + FILE_ENTERED_LATCH.await +@@ -106,10 +102,8 @@ def test_concurrent_require + assert t1.join, "thread 1 should exit" + assert t2.join, "thread 2 should exit" + ensure +- return if $! # skipping +- +- Object.send :remove_const, :FILE_ENTERED_LATCH +- Object.send :remove_const, :FILE_EXIT_LATCH ++ Object.send :remove_const, :FILE_ENTERED_LATCH if Object.const_defined? :FILE_ENTERED_LATCH ++ Object.send :remove_const, :FILE_EXIT_LATCH if Object.const_defined? :FILE_EXIT_LATCH + end + + def test_require_is_not_lazy_with_exact_req From 43a2b51955378d28bfe5f61b3507705f8c4adbb9 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 24 Feb 2018 18:59:36 +0100 Subject: [PATCH 505/529] Rebuild with new LDFLAGS from redhat-rpm-config --- ruby.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index cfd0407..46f4b13 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 89 +%global release 90 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1077,6 +1077,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Sat Feb 24 2018 Florian Weimer - 2.5.0-90 +- Rebuild with new LDFLAGS from redhat-rpm-config + * Wed Feb 23 2018 Pavel Valena - 2.5.0-89 - Fix: Multiple vulnerabilities in RubyGems https://bugzilla.redhat.com/show_bug.cgi?id=1547431 From a3207ebb169bacb722745448c114f015d63cd25c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 24 Feb 2018 19:11:02 +0100 Subject: [PATCH 506/529] Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239) --- ruby.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ruby.spec b/ruby.spec index 46f4b13..de3dd83 100644 --- a/ruby.spec +++ b/ruby.spec @@ -569,6 +569,9 @@ autoconf --with-ruby-version='' \ --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ +%ifarch aarch64 + --with-setjmp-type=setjmp \ +%endif # Q= makes the build output more verbose and allows to check Fedora # compiler options. @@ -1079,6 +1082,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Sat Feb 24 2018 Florian Weimer - 2.5.0-90 - Rebuild with new LDFLAGS from redhat-rpm-config +- Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239) * Wed Feb 23 2018 Pavel Valena - 2.5.0-89 - Fix: Multiple vulnerabilities in RubyGems From 7395ebdf85b168839e51f00c0d4c53935ab9beb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 28 Feb 2018 16:32:04 +0100 Subject: [PATCH 507/529] Save some release number. --- ruby.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index de3dd83..d6e46da 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 90 +%global release 89 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1080,11 +1080,11 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog -* Sat Feb 24 2018 Florian Weimer - 2.5.0-90 +* Sat Feb 24 2018 Florian Weimer - 2.5.0-89 - Rebuild with new LDFLAGS from redhat-rpm-config - Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239) -* Wed Feb 23 2018 Pavel Valena - 2.5.0-89 +* Wed Feb 21 2018 Pavel Valena - 2.5.0-89 - Fix: Multiple vulnerabilities in RubyGems https://bugzilla.redhat.com/show_bug.cgi?id=1547431 https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ From 07b06bf4c31f6192b67b3facb92e6ca1fe7bee5f Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Sat, 24 Feb 2018 19:11:02 +0100 Subject: [PATCH 508/529] Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239) --- ruby.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 012169a..7366e47 100644 --- a/ruby.spec +++ b/ruby.spec @@ -568,6 +568,9 @@ autoconf --with-ruby-version='' \ --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ +%ifarch aarch64 + --with-setjmp-type=setjmp \ +%endif # Q= makes the build output more verbose and allows to check Fedora # compiler options. @@ -1076,7 +1079,10 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog -* Wed Feb 23 2018 Pavel Valena - 2.5.0-89 +* Sat Feb 24 2018 Florian Weimer - 2.5.0-89 +- Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239) + +* Wed Feb 21 2018 Pavel Valena - 2.5.0-89 - Fix: Multiple vulnerabilities in RubyGems https://bugzilla.redhat.com/show_bug.cgi?id=1547431 https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ From 5d73ed5b414b7414f683db340d153a9be8f9a28c Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Wed, 21 Feb 2018 16:41:27 +0100 Subject: [PATCH 509/529] Add gcc to BuildRequires https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequire s_and_Requies --- ruby.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby.spec b/ruby.spec index 7366e47..2a5e047 100644 --- a/ruby.spec +++ b/ruby.spec @@ -173,6 +173,7 @@ BuildRequires: procps # Required to test hardening. %{?with_hardening_test:BuildRequires: %{_bindir}/checksec} BuildRequires: multilib-rpm-config +BuildRequires: gcc # This package provides %%{_bindir}/ruby-mri therefore it is marked by this # virtual provide. It can be installed as dependency of rubypick. From 3733c3cf5d09c23c21f9355582846f272d3288ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 1 Mar 2018 12:17:04 +0100 Subject: [PATCH 510/529] Revert "Add GMP dependency." This causes issues with building other ruby packages, since it would force every package to depend on gmp-devel. Reverting this until this gets resolved upstream: https://bugs.ruby-lang.org/issues/14422#note-6 This reverts commit 5624addc78a1a8b4a4d5dd31d76624249ce3a46d. --- ruby.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index d6e46da..493da79 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 89 +%global release 90 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -65,7 +65,6 @@ %bcond_without systemtap %bcond_without git %bcond_without cmake -%bcond_without gmp %if 0%{?fedora} %bcond_without hardening_test @@ -159,7 +158,6 @@ Recommends: rubygem(openssl) >= %{openssl_version} BuildRequires: autoconf BuildRequires: gdbm-devel -%{?with_hardening_test:BuildRequires: gmp-devel} BuildRequires: libffi-devel BuildRequires: openssl-devel BuildRequires: libyaml-devel @@ -1080,6 +1078,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Mar 01 2018 V鱈t Ondruch - 2.5.0-90 +- Drop GMP dependency. + * Sat Feb 24 2018 Florian Weimer - 2.5.0-89 - Rebuild with new LDFLAGS from redhat-rpm-config - Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239) From 366b5ae1317b3a8eb53deb1b44bbc938ccac1bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 1 Mar 2018 12:17:04 +0100 Subject: [PATCH 511/529] Revert "Add GMP dependency." This causes issues with building other ruby packages, since it would force every package to depend on gmp-devel. Reverting this until this gets resolved upstream: https://bugs.ruby-lang.org/issues/14422#note-6 This reverts commit 5624addc78a1a8b4a4d5dd31d76624249ce3a46d. --- ruby.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 2a5e047..46e9eed 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 89 +%global release 90 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -65,7 +65,6 @@ %bcond_without systemtap %bcond_without git %bcond_without cmake -%bcond_without gmp %if 0%{?fedora} %bcond_without hardening_test @@ -159,7 +158,6 @@ Recommends: rubygem(openssl) >= %{openssl_version} BuildRequires: autoconf BuildRequires: gdbm-devel -%{?with_hardening_test:BuildRequires: gmp-devel} BuildRequires: libffi-devel BuildRequires: openssl-devel BuildRequires: libyaml-devel @@ -1080,6 +1078,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Mar 01 2018 V鱈t Ondruch - 2.5.0-90 +- Drop GMP dependency. + * Sat Feb 24 2018 Florian Weimer - 2.5.0-89 - Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239) From d452ecad11c98658bf4b2c6a046cc6efd9f1f9ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 1 Mar 2018 16:50:10 +0100 Subject: [PATCH 512/529] Disable SIGSEV handler tests. SIGSEV does not provide correct output on AArch64. https://bugs.ruby-lang.org/issues/13758 --- ruby.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruby.spec b/ruby.spec index 493da79..41f5520 100644 --- a/ruby.spec +++ b/ruby.spec @@ -754,6 +754,12 @@ DISABLE_TESTS="" # Once seen: http://koji.fedoraproject.org/koji/taskinfo?taskID=12556650 DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb" +# SIGSEV handler does not provide correct output on AArch64. +# https://bugs.ruby-lang.org/issues/13758 +%ifarch aarch64 +DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\)/" +%endif + # Disable failing TestResolvMDNS#test_mdns_each_address test, # which fails on Koji. # https://bugs.ruby-lang.org/issues/14175 From 7f6db67fc6b45e2230b48f98182913fd4600c1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 1 Mar 2018 16:50:10 +0100 Subject: [PATCH 513/529] Disable SIGSEV handler tests. SIGSEV does not provide correct output on AArch64. https://bugs.ruby-lang.org/issues/13758 --- ruby.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ruby.spec b/ruby.spec index 46e9eed..03d7f49 100644 --- a/ruby.spec +++ b/ruby.spec @@ -754,6 +754,12 @@ DISABLE_TESTS="" # Once seen: http://koji.fedoraproject.org/koji/taskinfo?taskID=12556650 DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb" +# SIGSEV handler does not provide correct output on AArch64. +# https://bugs.ruby-lang.org/issues/13758 +%ifarch aarch64 +DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\)/" +%endif + # Disable failing TestResolvMDNS#test_mdns_each_address test, # which fails on Koji. # https://bugs.ruby-lang.org/issues/14175 From ae56326d8dc8d90a3523521b758ffee05567f3dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 5 Mar 2018 15:18:47 +0100 Subject: [PATCH 514/529] Don't force libraries used to build Ruby to its dependencies. This, for example, allows to build Ruby against GMP, but doesn't force libraries using Ruby to depend on GMP as well. --- ruby.spec | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 41f5520..52de795 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 90 +%global release 91 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -148,6 +148,9 @@ Patch13: ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1547431 # https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ Patch14: rubygems-2.5.0-multiple-vulnerabilities.patch +# Don't force libraries used to build Ruby to its dependencies. +# https://bugs.ruby-lang.org/issues/14422 +Patch15: ruby-2.6.0-library-options-to-MAINLIBS.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -535,6 +538,7 @@ rm -rf ext/fiddle/libffi* %patch12 -p1 %patch13 -p1 %patch14 -p0 +%patch15 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -1084,6 +1088,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Mon Mar 05 2018 V鱈t Ondruch - 2.5.0-91 +- Don't force libraries used to build Ruby to its dependencies. + * Thu Mar 01 2018 V鱈t Ondruch - 2.5.0-90 - Drop GMP dependency. From 832679686181e0a4b997f4d7c0955790da0c46b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Mon, 5 Mar 2018 15:46:33 +0100 Subject: [PATCH 515/529] Re-enable GMP dependency. --- ruby.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruby.spec b/ruby.spec index 52de795..c9ff8dc 100644 --- a/ruby.spec +++ b/ruby.spec @@ -65,6 +65,7 @@ %bcond_without systemtap %bcond_without git %bcond_without cmake +%bcond_without gmp %if 0%{?fedora} %bcond_without hardening_test @@ -161,6 +162,7 @@ Recommends: rubygem(openssl) >= %{openssl_version} BuildRequires: autoconf BuildRequires: gdbm-devel +%{?with_gmp:BuildRequires: gmp-devel} BuildRequires: libffi-devel BuildRequires: openssl-devel BuildRequires: libyaml-devel @@ -1090,6 +1092,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Mon Mar 05 2018 V鱈t Ondruch - 2.5.0-91 - Don't force libraries used to build Ruby to its dependencies. +- Re-enable GMP dependency. * Thu Mar 01 2018 V鱈t Ondruch - 2.5.0-90 - Drop GMP dependency. From 39d1e08dc7504dc79998eeeb13322a3ee4fdcb03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 6 Mar 2018 10:46:34 +0100 Subject: [PATCH 516/529] Disable additional SIGSEV handler test. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index c9ff8dc..67eb27c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -763,7 +763,7 @@ DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb" # SIGSEV handler does not provide correct output on AArch64. # https://bugs.ruby-lang.org/issues/13758 %ifarch aarch64 -DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\)/" +DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_features\)/" %endif # Disable failing TestResolvMDNS#test_mdns_each_address test, From dcd292bb5ae7ff1e3813029a0a247dc688c6f70a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 9 Mar 2018 09:25:41 +0100 Subject: [PATCH 517/529] Add missing patch15. This patch was introduced by ae56326d8dc8d90a3523521b758ffee05567f3dc commit. --- ruby-2.6.0-library-options-to-MAINLIBS.patch | 177 +++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 ruby-2.6.0-library-options-to-MAINLIBS.patch diff --git a/ruby-2.6.0-library-options-to-MAINLIBS.patch b/ruby-2.6.0-library-options-to-MAINLIBS.patch new file mode 100644 index 0000000..7cc644f --- /dev/null +++ b/ruby-2.6.0-library-options-to-MAINLIBS.patch @@ -0,0 +1,177 @@ +From bb3db69e2a0c210cc3a63940622db96a97eb7947 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Fri, 2 Mar 2018 01:37:53 +0000 +Subject: [PATCH] configure.ac: library options to MAINLIBS + +* configure.ac (MAINLIBS): moved library options for main program + and static libruby, and append MAINLIBS to LIBRUBYARG_STATIC, as + these libraries are not needed for linking to shared libruby. + [ruby-core:85882] [Bug #14422] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + configure.ac | 33 +++++++++++++++------------------ + template/ruby.pc.in | 1 + + win32/Makefile.sub | 6 ++++-- + 3 files changed, 20 insertions(+), 20 deletions(-) + +diff --git a/configure.ac b/configure.ac +index aebbae1969a5..733a0c992fd7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -10,6 +10,7 @@ AC_DISABLE_OPTION_CHECKING + AC_ARG_VAR([cflags], [additional CFLAGS]) + AC_ARG_VAR([cppflags], [additional CPPFLAGS]) + AC_ARG_VAR([cxxflags], [additional CXXFLAGS]) ++ORIG_LIBS=$LIBS + + AC_DEFUN([RUBY_RM_RECURSIVE], [ + m4_version_prereq([2.70], [-1], [ +@@ -2937,13 +2938,11 @@ AS_IF([test x"$enable_pthread" = xyes], [ + AC_DEFINE(_THREAD_SAFE) + AC_DEFINE(HAVE_LIBPTHREAD) + AC_CHECK_HEADERS(pthread_np.h, [], [], [@%:@include ]) +- AS_CASE([$pthread_lib], +- [c], [], +- [root], [], +- [c_r], [MAINLIBS="-pthread $MAINLIBS"], +- [AS_CASE(["$target_os"], +- [openbsd*|mirbsd*], [LIBS="-pthread $LIBS"], +- [LIBS="-l$pthread_lib $LIBS"])]) ++ AS_CASE(["$pthread_lib:$target_os"], ++ [c:*], [], ++ [root:*], [], ++ [c_r:*|*:openbsd*|*:mirbsd*], [LIBS="-pthread $LIBS"], ++ [LIBS="-l$pthread_lib $LIBS"]) + ], [ + AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled") + ]) +@@ -3622,7 +3621,7 @@ LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a' + LIBRUBY='$(LIBRUBY_A)' + LIBRUBYARG_STATIC='-l$(RUBY_SO_NAME)-static' + LIBRUBYARG='$(LIBRUBYARG_STATIC)' +-SOLIBS= ++SOLIBS='$(MAINLIBS)' + + AS_CASE(["$target_os"], + [cygwin*|mingw*|haiku*|darwin*], [ +@@ -3688,9 +3687,6 @@ AS_CASE("$enable_shared", [yes], [ + LIBRUBY_RELATIVE=no + test -z "$CCDLFLAGS" || CFLAGS="$CFLAGS $CCDLFLAGS" + ENABLE_SHARED=yes +- AS_IF([test "$rb_cv_binary_elf" = yes], [ +- SOLIBS='$(LIBS)' +- ]) + + # libdir can be overridden in config.site file (on OpenSUSE at least). + libdir_basename=lib +@@ -3725,7 +3721,6 @@ AS_CASE("$enable_shared", [yes], [ + ]) + ], + [freebsd*|dragonfly*], [ +- SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)' + LIBRUBY_SONAME='$(LIBRUBY_SO)' + AS_IF([test "$rb_cv_binary_elf" != "yes" ], [ +@@ -3734,7 +3729,6 @@ AS_CASE("$enable_shared", [yes], [ + ]) + ], + [netbsd*], [ +- SOLIBS='$(LIBS)' + LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)' + LIBRUBY_SO="${LIBRUBY_SONAME}"'.$(TEENY)' + RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ['-Wl,-soname,$(LIBRUBY_SONAME)' "$LDFLAGS_OPTDIR"]) +@@ -3745,11 +3739,9 @@ AS_CASE("$enable_shared", [yes], [ + ]) + ], + [openbsd*|mirbsd*], [ +- SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}` + ], + [solaris*], [ +- SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)' + LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(RUBY_PROGRAM_VERSION)' + LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)' +@@ -3767,7 +3759,7 @@ AS_CASE("$enable_shared", [yes], [ + [aix*], [ + RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-bnoentry" "$XLDFLAGS" "$LDFLAGS_OPTDIR"]) + LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}' +- SOLIBS='-lm -lc' ++ LIBS="$LIBS -lm -lc" + ], + [darwin*], [ + LIBRUBY_LDSHARED='$(CC) -dynamiclib' +@@ -3787,7 +3779,6 @@ AS_CASE("$enable_shared", [yes], [ + LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT)' + LIBRUBY_SONAME='lib$(RUBY_BASE_NAME).$(RUBY_API_VERSION).$(SOEXT)' + LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_INSTALL_NAME).$(SOEXT)' +- SOLIBS='$(LIBS)' + ], + [interix*], [ + LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)' +@@ -4030,7 +4021,6 @@ AS_CASE(["$target_os"], + ]) + LIBRUBY_ALIASES='' + FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in +- SOLIBS='$(LIBS)' + AS_IF([test x"$enable_shared" = xyes], [ + LIBRUBY='lib$(RUBY_SO_NAME).dll.a' + ], [ +@@ -4130,6 +4120,13 @@ AS_IF([test "${universal_binary-no}" = yes ], [ + [rb_cv_architecture_available=yes], [rb_cv_architecture_available=no])) + ]) + ++MAINLIBS="$LIBS" ++LIBS=$ORIG_LIBS ++AS_IF([test -n "${LIBS}"], [ ++ libspat=`echo "${LIBS}" | sed 's/[[][|.*$^]]/\\&/g;s/^ */ /;s/^ *$/ /'` ++ MAINFLAGS=`echo " $MAINLIBS " | sed "s|$libspat"'||;s/^ *//;s/ *$//'` ++]) ++LIBRUBYARG_STATIC="${LIBRUBYARG_STATIC} \$(MAINLIBS)" + CPPFLAGS="$CPPFLAGS "'$(DEFS)' + test -z "$CPPFLAGS" || CPPFLAGS="$CPPFLAGS "; CPPFLAGS="$CPPFLAGS"'${cppflags}' + AS_IF([test -n "${cflags+set}"], [ +diff --git a/template/ruby.pc.in b/template/ruby.pc.in +index d874f92c3b20..7ce4461c05df 100644 +--- a/template/ruby.pc.in ++++ b/template/ruby.pc.in +@@ -39,6 +39,7 @@ sitehdrdir=@sitehdrdir@ + rubyarchhdrdir=@rubyarchhdrdir@ + vendorarchhdrdir=@vendorarchhdrdir@ + sitearchhdrdir=@sitearchhdrdir@ ++MAINLIBS=@MAINLIBS@ + SOEXT=@SOEXT@ + LIBPATH=@LIBPATH@ + LIBRUBY_A=@LIBRUBY_A@ +diff --git a/win32/Makefile.sub b/win32/Makefile.sub +index 8673c121641e..f8316cccb68e 100644 +--- a/win32/Makefile.sub ++++ b/win32/Makefile.sub +@@ -279,6 +279,7 @@ MJIT_DEBUGFLAGS = $(DEBUGFLAGS) + CPPFLAGS = $(DEFS) $(ARCHDEFS) $(CPPFLAGS) + + DLDFLAGS = $(LDFLAGS) -dll ++MAINLIBS = $(LIBS) + SOLIBS = + RCFILES = $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc + !ifndef RCFLAGS +@@ -821,7 +822,8 @@ s,@CPPFLAGS@,$(CPPFLAGS),;t t + s,@CXXFLAGS@,$(CXXFLAGS),;t t + s,@FFLAGS@,$(FFLAGS),;t t + s,@LDFLAGS@,$(LDFLAGS),;t t +-s,@LIBS@,$(LIBS),;t t ++s,@LIBS@,,;t t ++s,@MAINLIBS@,$(MAINLIBS),;t t + s,@exec_prefix@,$${prefix},;t t + s,@prefix@,$(prefix),;t t + s,@program_transform_name@,s,.*,$(PROGRAM_PREFIX)&$(PROGRAM_SUFFIX),,;t t +@@ -909,7 +911,7 @@ s,@LIBRUBY_SO@,$$(RUBY_SO_NAME).dll,;t t + s,@LIBRUBY_ALIASES@,$(LIBRUBY_ALIASES),;t t + s,@LIBRUBY@,$$(RUBY_SO_NAME).lib,;t t + s,@LIBRUBYARG@,$$(LIBRUBYARG_SHARED),;t t +-s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A),;t t ++s,@LIBRUBYARG_STATIC@,$$(LIBRUBY_A) $$(MAINLIBS),;t t + s,@LIBRUBYARG_SHARED@,$$(LIBRUBY),;t t + s,@SOLIBS@,$(SOLIBS),;t t + s,@DLDLIBS@,$(DLDLIBS),;t t From 21f5a166eea73835650fc8c8db5cb33dd61a07b4 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Wed, 21 Mar 2018 13:23:14 -0700 Subject: [PATCH 518/529] No rubypick in RHEL --- ruby.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 4ce9d64..60f56f5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -58,14 +58,14 @@ %global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/') -%if 0%{?fedora} >= 19 || 0%{?rhel} > 7 +%if 0%{?fedora} >= 19 %global with_rubypick 1 %endif Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version} -Release: %{release_string}.1 +Release: %{release_string}.2 Group: Development/Languages # Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ... # MIT and CCO: ccan/* @@ -130,7 +130,8 @@ Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} -Suggests: rubypick +# No rubypick in RHEL8 +# Suggests: rubypick Recommends: ruby(rubygems) >= %{rubygems_version} Recommends: rubygem(bigdecimal) >= %{bigdecimal_version} Recommends: rubygem(did_you_mean) >= %{did_you_mean_version} @@ -1022,6 +1023,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Wed Mar 21 2018 Troy Dawson - 2.4.2-84.2 +- No rubypick in RHEL + * Tue Oct 24 2017 Troy Dawson - 2.4.2-84.1 - Cleanup spec file conditionals From 793a1c36126fe96e3dbe8457685b7570b839022d Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Thu, 29 Mar 2018 15:25:06 +0200 Subject: [PATCH 519/529] Update to Ruby 2.5.1. --- ...-additional-preludes-by-configuratio.patch | 2 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ruby-2.3.0-ruby_version.patch | 6 +- ruby-2.5.0-Disable-Tokyo-TZ-tests.patch | 30 - ruby-2.5.0-parse.y-assignable_error.patch | 80 - ...5.0-st.c-retry-operations-if-rebuilt.patch | 602 ----- ...-test-failures-Kiritimati-and-Lisbon.patch | 115 + ruby-2.6.0-library-options-to-MAINLIBS.patch | 20 +- ruby.spec | 30 +- rubygems-2.5.0-multiple-vulnerabilities.patch | 2349 ----------------- sources | 2 +- 14 files changed, 143 insertions(+), 3103 deletions(-) delete mode 100644 ruby-2.5.0-Disable-Tokyo-TZ-tests.patch delete mode 100644 ruby-2.5.0-parse.y-assignable_error.patch delete mode 100644 ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch create mode 100644 ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch delete mode 100644 rubygems-2.5.0-multiple-vulnerabilities.patch diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 66cb565..47bf9bc 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -39,7 +39,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -4395,6 +4395,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4396,6 +4396,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 41444c5..36ec460 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 11fc237552..b77e88fc37 100644 --- a/configure.ac +++ b/configure.ac -@@ -3640,6 +3640,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3641,6 +3641,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index bdc074d..d0cffab 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index 999e2d6d5d..11fc237552 100644 --- a/configure.ac +++ b/configure.ac -@@ -4250,7 +4250,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -4251,7 +4251,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 4864741..555ad45 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index b77e88fc37..6bba453e3c 100644 --- a/configure.ac +++ b/configure.ac -@@ -4314,6 +4314,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4315,6 +4315,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index cc55c4a..cc45741 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 6bba453e3c..028ef7ca3e 100644 --- a/configure.ac +++ b/configure.ac -@@ -4286,6 +4286,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4287,6 +4287,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 6bba453e3c..028ef7ca3e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4310,6 +4314,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4311,6 +4315,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 5e24003..8f57319 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 8ea969412f..a00f2b6776 100644 --- a/configure.ac +++ b/configure.ac -@@ -4201,9 +4201,6 @@ AS_CASE(["$target_os"], +@@ -4202,9 +4202,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 8ea969412f..a00f2b6776 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -4226,56 +4223,62 @@ AC_ARG_WITH(ridir, +@@ -4227,56 +4224,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 8ea969412f..a00f2b6776 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -4292,6 +4295,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4293,6 +4296,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-2.5.0-Disable-Tokyo-TZ-tests.patch b/ruby-2.5.0-Disable-Tokyo-TZ-tests.patch deleted file mode 100644 index 01632eb..0000000 --- a/ruby-2.5.0-Disable-Tokyo-TZ-tests.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb -index 20a57fe7dd..5b9e5a8bde 100644 ---- a/test/ruby/test_time_tz.rb -+++ b/test/ruby/test_time_tz.rb -@@ -126,8 +126,8 @@ def test_asia_singapore - - def test_asia_tokyo - with_tz(tz="Asia/Tokyo") { -- assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0]) -- assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59]) -+# assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0]) -+# assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59]) - assert_time_constructor(tz, "2010-06-10 06:13:28 +0900", :local, [2010,6,10,6,13,28]) - } - end -@@ -329,10 +329,10 @@ def self.gen_zdump_test(data) - Asia/Singapore Sun Aug 8 16:30:00 1965 UTC = Mon Aug 9 00:00:00 1965 SGT isdst=0 gmtoff=27000 - Asia/Singapore Thu Dec 31 16:29:59 1981 UTC = Thu Dec 31 23:59:59 1981 SGT isdst=0 gmtoff=27000 - Asia/Singapore Thu Dec 31 16:30:00 1981 UTC = Fri Jan 1 00:30:00 1982 SGT isdst=0 gmtoff=28800 --Asia/Tokyo Sat May 5 16:59:59 1951 UTC = Sun May 6 01:59:59 1951 JST isdst=0 gmtoff=32400 --Asia/Tokyo Sat May 5 17:00:00 1951 UTC = Sun May 6 03:00:00 1951 JDT isdst=1 gmtoff=36000 --Asia/Tokyo Fri Sep 7 15:59:59 1951 UTC = Sat Sep 8 01:59:59 1951 JDT isdst=1 gmtoff=36000 --Asia/Tokyo Fri Sep 7 16:00:00 1951 UTC = Sat Sep 8 01:00:00 1951 JST isdst=0 gmtoff=32400 -+#Asia/Tokyo Sat May 5 16:59:59 1951 UTC = Sun May 6 01:59:59 1951 JST isdst=0 gmtoff=32400 -+#Asia/Tokyo Sat May 5 17:00:00 1951 UTC = Sun May 6 03:00:00 1951 JDT isdst=1 gmtoff=36000 -+#Asia/Tokyo Fri Sep 7 15:59:59 1951 UTC = Sat Sep 8 01:59:59 1951 JDT isdst=1 gmtoff=36000 -+#Asia/Tokyo Fri Sep 7 16:00:00 1951 UTC = Sat Sep 8 01:00:00 1951 JST isdst=0 gmtoff=32400 - America/St_Johns Sun Mar 11 03:30:59 2007 UTC = Sun Mar 11 00:00:59 2007 NST isdst=0 gmtoff=-12600 - America/St_Johns Sun Mar 11 03:31:00 2007 UTC = Sun Mar 11 01:01:00 2007 NDT isdst=1 gmtoff=-9000 - America/St_Johns Sun Nov 4 02:30:59 2007 UTC = Sun Nov 4 00:00:59 2007 NDT isdst=1 gmtoff=-9000 diff --git a/ruby-2.5.0-parse.y-assignable_error.patch b/ruby-2.5.0-parse.y-assignable_error.patch deleted file mode 100644 index ea7dad9..0000000 --- a/ruby-2.5.0-parse.y-assignable_error.patch +++ /dev/null @@ -1,80 +0,0 @@ -From: nobu -Date: Sun, 31 Dec 2017 11:25:38 +0000 -Subject: [PATCH] parse.y: assignable_error - -* parse.y (assignable_gen): should return valid NODE always even - on errors. [ruby-core:84565] [Bug #14261] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - parse.c | 14 ++++---------- - test/ruby/test_parse.rb | 6 ++++++ - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/parse.c b/parse.c -index 08c3461f7096..c260a046dc33 100644 ---- a/parse.c -+++ b/parse.c -@@ -6593,10 +6593,6 @@ - #line 1984 "parse.y" /* yacc.c:1646 */ - { - (yyval.node) = assignable(var_field((yyvsp[0].id)), 0, &(yyloc)); -- /*%%%*/ -- if (!(yyval.node)) (yyval.node) = new_begin(0, &(yyloc)); -- /*% -- %*/ - } - #line 6598 "parse.c" /* yacc.c:1646 */ - break; -@@ -6605,10 +6601,6 @@ - #line 1992 "parse.y" /* yacc.c:1646 */ - { - (yyval.node) = assignable(var_field((yyvsp[0].id)), 0, &(yyloc)); -- /*%%%*/ -- if (!(yyval.node)) (yyval.node) = new_begin(0, &(yyloc)); -- /*% -- %*/ - } - #line 6610 "parse.c" /* yacc.c:1646 */ - break; -@@ -16034,11 +16026,13 @@ - #ifdef RIPPER - ID id = get_id(lhs); - # define assignable_result(x) (lhs) -+# define assignable_error() (lhs) - # define parser_yyerror(parser, x) (lhs = assign_error_gen(parser, lhs)) - #else - # define assignable_result(x) assignable_result0(x, location) -+# define assignable_error() new_begin(0, location) - #endif -- if (!id) return assignable_result(0); -+ if (!id) return assignable_error(); - switch (id) { - case keyword_self: - yyerror0("Can't change the value of self"); -@@ -16101,7 +16095,7 @@ - compile_error(PARSER_ARG "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id)); - } - error: -- return assignable_result(0); -+ return assignable_error(); - #undef assignable_result - #undef parser_yyerror - } -diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb -index e26bcdc07e19..15c6245bac2e 100644 ---- a/test/ruby/test_parse.rb -+++ b/test/ruby/test_parse.rb -@@ -746,6 +746,12 @@ def foo - end - END - end -+ assert_raise(SyntaxError) do -+ eval "#{<<~"begin;"}\n#{<<~'end;'}", nil, __FILE__, __LINE__+1 -+ begin; -+ x, true -+ end; -+ end - end - - def test_block_dup diff --git a/ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch b/ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch deleted file mode 100644 index 1e8e3b6..0000000 --- a/ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch +++ /dev/null @@ -1,602 +0,0 @@ -From 4663c224fa6c925ce54af32fd1c1cbac9508f5ec Mon Sep 17 00:00:00 2001 -From: normal -Date: Tue, 13 Feb 2018 10:02:07 +0000 -Subject: [PATCH] st.c: retry operations if rebuilt - -Calling the .eql? and .hash methods during a Hash operation can -result in a thread switch or a signal handler to run: allowing -one execution context to rebuild the hash table while another is -still reading or writing the table. This results in a -use-after-free bug affecting the thread_safe-0.3.6 test suite -and likely other bugs. - -This bug did not affect users of commonly keys (String, Symbol, -Fixnum) as those are optimized to avoid method dispatch -for .eql? and .hash methods. - -A separate version of this change needs to be ported to Ruby 2.3.x -which had a different implementation of st.c but was affected -by the same bug. - -* st.c: Add comment about table rebuilding during comparison. - (DO_PTR_EQUAL_CHECK): New macro. - (REBUILT_TABLE_ENTRY_IND, REBUILT_TABLE_BIN_IND): New macros. - (find_entry, find_table_entry_ind, find_table_bin_ind): Use new - macros. Return the rebuild flag. - (find_table_bin_ptr_and_reserve): Ditto. - (st_lookup, st_get_key, st_insert, st_insert2): Retry the - operation if the table was rebuilt. - (st_general_delete, st_shift, st_update, st_general_foreach): - Ditto. - (st_rehash_linear, st_rehash_indexed): Use DO_PTR_EQUAL_CHECK. - Return the rebuild flag. - (st_rehash): Retry the operation if the table was rebuilt. - [ruby-core:85510] [Ruby trunk Bug#14357] - -Thanks to Vit Ondruch for reporting the bug. - -From: Vladimir Makarov - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - st.c | 258 ++++++++++++++++++++++++++++++++++++++++++++++++------------------- - 1 file changed, 185 insertions(+), 73 deletions(-) - -diff --git a/st.c b/st.c -index 56ae30ce47..0c52e7a2ef 100644 ---- a/st.c -+++ b/st.c -@@ -90,6 +90,11 @@ - o To save more memory we use 8-, 16-, 32- and 64- bit indexes in - bins depending on the current hash table size. - -+ o The implementation takes into account that the table can be -+ rebuilt during hashing or comparison functions. It can happen if -+ the functions are implemented in Ruby and a thread switch occurs -+ during their execution. -+ - This implementation speeds up the Ruby hash table benchmarks in - average by more 40% on Intel Haswell CPU. - -@@ -174,6 +179,15 @@ static const struct st_hash_type type_strcasehash = { - #define PTR_EQUAL(tab, ptr, hash_val, key_) \ - ((ptr)->hash == (hash_val) && EQUAL((tab), (key_), (ptr)->key)) - -+/* As PRT_EQUAL only its result is returned in RES. REBUILT_P is set -+ up to TRUE if the table is rebuilt during the comparison. */ -+#define DO_PTR_EQUAL_CHECK(tab, ptr, hash_val, key, res, rebuilt_p) \ -+ do { \ -+ unsigned int _old_rebuilds_num = (tab)->rebuilds_num; \ -+ res = PTR_EQUAL(tab, ptr, hash_val, key); \ -+ rebuilt_p = _old_rebuilds_num != (tab)->rebuilds_num; \ -+ } while (FALSE) -+ - /* Features of a table. */ - struct st_features { - /* Power of 2 used for number of allocated entries. */ -@@ -380,6 +394,11 @@ set_bin(st_index_t *bins, int s, st_index_t n, st_index_t v) - #define UNDEFINED_ENTRY_IND (~(st_index_t) 0) - #define UNDEFINED_BIN_IND (~(st_index_t) 0) - -+/* Entry and bin values returned when we found a table rebuild during -+ the search. */ -+#define REBUILT_TABLE_ENTRY_IND (~(st_index_t) 1) -+#define REBUILT_TABLE_BIN_IND (~(st_index_t) 1) -+ - /* Mark I-th bin of table TAB as corresponding to a deleted table - entry. Update number of entries in the table and number of bins - corresponding to deleted entries. */ -@@ -823,17 +842,22 @@ secondary_hash(st_index_t ind, st_table *tab, st_index_t *perterb) - - /* Find an entry with HASH_VALUE and KEY in TABLE using a linear - search. Return the index of the found entry in array `entries`. -- If it is not found, return UNDEFINED_ENTRY_IND. */ -+ If it is not found, return UNDEFINED_ENTRY_IND. If the table was -+ rebuilt during the search, return REBUILT_TABLE_ENTRY_IND. */ - static inline st_index_t - find_entry(st_table *tab, st_hash_t hash_value, st_data_t key) - { -+ int eq_p, rebuilt_p; - st_index_t i, bound; - st_table_entry *entries; - - bound = tab->entries_bound; - entries = tab->entries; - for (i = tab->entries_start; i < bound; i++) { -- if (PTR_EQUAL(tab, &entries[i], hash_value, key)) -+ DO_PTR_EQUAL_CHECK(tab, &entries[i], hash_value, key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return REBUILT_TABLE_ENTRY_IND; -+ if (eq_p) - return i; - } - return UNDEFINED_ENTRY_IND; -@@ -845,10 +869,12 @@ find_entry(st_table *tab, st_hash_t hash_value, st_data_t key) - /*#define QUADRATIC_PROBE*/ - - /* Return index of entry with HASH_VALUE and KEY in table TAB. If -- there is no such entry, return UNDEFINED_ENTRY_IND. */ -+ there is no such entry, return UNDEFINED_ENTRY_IND. If the table -+ was rebuilt during the search, return REBUILT_TABLE_ENTRY_IND. */ - static st_index_t - find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - { -+ int eq_p, rebuilt_p; - st_index_t ind; - #ifdef QUADRATIC_PROBE - st_index_t d; -@@ -869,10 +895,13 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - FOUND_BIN; - for (;;) { - bin = get_bin(tab->bins, get_size_ind(tab), ind); -- if (! EMPTY_OR_DELETED_BIN_P(bin) -- && PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key)) -- break; -- else if (EMPTY_BIN_P(bin)) -+ if (! EMPTY_OR_DELETED_BIN_P(bin)) { -+ DO_PTR_EQUAL_CHECK(tab, &entries[bin - ENTRY_BASE], hash_value, key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return REBUILT_TABLE_ENTRY_IND; -+ if (eq_p) -+ break; -+ } else if (EMPTY_BIN_P(bin)) - return UNDEFINED_ENTRY_IND; - #ifdef QUADRATIC_PROBE - ind = hash_bin(ind + d, tab); -@@ -887,10 +916,12 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - - /* Find and return index of table TAB bin corresponding to an entry - with HASH_VALUE and KEY. If there is no such bin, return -- UNDEFINED_BIN_IND. */ -+ UNDEFINED_BIN_IND. If the table was rebuilt during the search, -+ return REBUILT_TABLE_BIN_IND. */ - static st_index_t - find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - { -+ int eq_p, rebuilt_p; - st_index_t ind; - #ifdef QUADRATIC_PROBE - st_index_t d; -@@ -911,10 +942,13 @@ find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - FOUND_BIN; - for (;;) { - bin = get_bin(tab->bins, get_size_ind(tab), ind); -- if (! EMPTY_OR_DELETED_BIN_P(bin) -- && PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key)) -- break; -- else if (EMPTY_BIN_P(bin)) -+ if (! EMPTY_OR_DELETED_BIN_P(bin)) { -+ DO_PTR_EQUAL_CHECK(tab, &entries[bin - ENTRY_BASE], hash_value, key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return REBUILT_TABLE_BIN_IND; -+ if (eq_p) -+ break; -+ } else if (EMPTY_BIN_P(bin)) - return UNDEFINED_BIN_IND; - #ifdef QUADRATIC_PROBE - ind = hash_bin(ind + d, tab); -@@ -955,7 +989,7 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key) - bin = get_bin(tab->bins, get_size_ind(tab), ind); - if (EMPTY_OR_DELETED_BIN_P(bin)) - return ind; -- st_assert (! PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key)); -+ st_assert (entries[bin - ENTRY_BASE].hash != hash_value); - #ifdef QUADRATIC_PROBE - ind = hash_bin(ind + d, tab); - d++; -@@ -973,11 +1007,13 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key) - bigger entries array. Although we can reuse a deleted bin, the - result bin value is always empty if the table has no entry with - KEY. Return the entries array index of the found entry or -- UNDEFINED_ENTRY_IND if it is not found. */ -+ UNDEFINED_ENTRY_IND if it is not found. If the table was rebuilt -+ during the search, return REBUILT_TABLE_ENTRY_IND. */ - static st_index_t - find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value, - st_data_t key, st_index_t *bin_ind) - { -+ int eq_p, rebuilt_p; - st_index_t ind; - st_hash_t curr_hash_value = *hash_value; - #ifdef QUADRATIC_PROBE -@@ -1015,7 +1051,10 @@ find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value, - break; - } - else if (! DELETED_BIN_P(entry_index)) { -- if (PTR_EQUAL(tab, &entries[entry_index - ENTRY_BASE], curr_hash_value, key)) -+ DO_PTR_EQUAL_CHECK(tab, &entries[entry_index - ENTRY_BASE], curr_hash_value, key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return REBUILT_TABLE_ENTRY_IND; -+ if (eq_p) - break; - } - else if (first_deleted_bin_ind == UNDEFINED_BIN_IND) -@@ -1040,13 +1079,18 @@ st_lookup(st_table *tab, st_data_t key, st_data_t *value) - st_index_t bin; - st_hash_t hash = do_hash(key, tab); - -+ retry: - if (tab->bins == NULL) { - bin = find_entry(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) - return 0; - } - else { - bin = find_table_entry_ind(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) - return 0; - bin -= ENTRY_BASE; -@@ -1064,13 +1108,18 @@ st_get_key(st_table *tab, st_data_t key, st_data_t *result) - st_index_t bin; - st_hash_t hash = do_hash(key, tab); - -+ retry: - if (tab->bins == NULL) { - bin = find_entry(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) - return 0; - } - else { - bin = find_table_entry_ind(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) - return 0; - bin -= ENTRY_BASE; -@@ -1104,10 +1153,13 @@ st_insert(st_table *tab, st_data_t key, st_data_t value) - st_index_t bin_ind; - int new_p; - -- rebuild_table_if_necessary(tab); - hash_value = do_hash(key, tab); -+ retry: -+ rebuild_table_if_necessary(tab); - if (tab->bins == NULL) { - bin = find_entry(tab, hash_value, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - new_p = bin == UNDEFINED_ENTRY_IND; - if (new_p) - tab->num_entries++; -@@ -1116,6 +1168,8 @@ st_insert(st_table *tab, st_data_t key, st_data_t value) - else { - bin = find_table_bin_ptr_and_reserve(tab, &hash_value, - key, &bin_ind); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - new_p = bin == UNDEFINED_ENTRY_IND; - bin -= ENTRY_BASE; - } -@@ -1192,10 +1246,13 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, - st_index_t bin_ind; - int new_p; - -- rebuild_table_if_necessary (tab); - hash_value = do_hash(key, tab); -+ retry: -+ rebuild_table_if_necessary (tab); - if (tab->bins == NULL) { - bin = find_entry(tab, hash_value, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - new_p = bin == UNDEFINED_ENTRY_IND; - if (new_p) - tab->num_entries++; -@@ -1204,6 +1261,8 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, - else { - bin = find_table_bin_ptr_and_reserve(tab, &hash_value, - key, &bin_ind); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - new_p = bin == UNDEFINED_ENTRY_IND; - bin -= ENTRY_BASE; - } -@@ -1212,7 +1271,6 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, - check = tab->rebuilds_num; - key = (*func)(key); - st_assert(check == tab->rebuilds_num); -- st_assert(do_hash(key, tab) == hash_value); - ind = tab->entries_bound++; - entry = &tab->entries[ind]; - entry->hash = hash_value; -@@ -1220,6 +1278,7 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, - entry->record = value; - if (bin_ind != UNDEFINED_BIN_IND) - set_bin(tab->bins, get_size_ind(tab), bin_ind, ind + ENTRY_BASE); -+ st_assert(do_hash(key, tab) == hash_value); - #ifdef ST_DEBUG - st_check(tab); - #endif -@@ -1281,8 +1340,11 @@ st_general_delete(st_table *tab, st_data_t *key, st_data_t *value) - - st_assert(tab != NULL); - hash = do_hash(*key, tab); -+ retry: - if (tab->bins == NULL) { - bin = find_entry(tab, hash, *key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) { - if (value != 0) *value = 0; - return 0; -@@ -1290,6 +1352,8 @@ st_general_delete(st_table *tab, st_data_t *key, st_data_t *value) - } - else { - bin_ind = find_table_bin_ind(tab, hash, *key); -+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) -+ goto retry; - if (bin_ind == UNDEFINED_BIN_IND) { - if (value != 0) *value = 0; - return 0; -@@ -1344,21 +1408,33 @@ st_shift(st_table *tab, st_data_t *key, st_data_t *value) - for (i = tab->entries_start; i < bound; i++) { - curr_entry_ptr = &entries[i]; - if (! DELETED_ENTRY_P(curr_entry_ptr)) { -+ st_hash_t entry_hash = curr_entry_ptr->hash; -+ st_data_t entry_key = curr_entry_ptr->key; -+ - if (value != 0) *value = curr_entry_ptr->record; -- *key = curr_entry_ptr->key; -+ *key = entry_key; -+ retry: - if (tab->bins == NULL) { -- bin = find_entry(tab, curr_entry_ptr->hash, curr_entry_ptr->key); -+ bin = find_entry(tab, entry_hash, entry_key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) { -+ entries = tab->entries; -+ goto retry; -+ } - st_assert(bin != UNDEFINED_ENTRY_IND); -- st_assert(&entries[bin] == curr_entry_ptr); -+ curr_entry_ptr = &entries[bin]; - } - else { -- bin_ind = find_table_bin_ind(tab, curr_entry_ptr->hash, -- curr_entry_ptr->key); -+ bin_ind = find_table_bin_ind(tab, entry_hash, entry_key); -+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) { -+ entries = tab->entries; -+ goto retry; -+ } - st_assert(bin_ind != UNDEFINED_BIN_IND); -- st_assert(&entries[get_bin(tab->bins, get_size_ind(tab), bin_ind) -- - ENTRY_BASE] == curr_entry_ptr); -+ curr_entry_ptr = &entries[get_bin(tab->bins, get_size_ind(tab), bin_ind) -+ - ENTRY_BASE]; - MARK_BIN_DELETED(tab, bin_ind); - } -+ st_assert(entry_hash != curr_entry_ptr->hash && entry_key == curr_entry_ptr->key); - MARK_ENTRY_DELETED(curr_entry_ptr); - tab->num_entries--; - update_range_for_deleted(tab, i); -@@ -1402,15 +1478,20 @@ st_update(st_table *tab, st_data_t key, - int retval, existing; - st_hash_t hash = do_hash(key, tab); - -+ retry: - entries = tab->entries; - if (tab->bins == NULL) { - bin = find_entry(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - existing = bin != UNDEFINED_ENTRY_IND; - entry = &entries[bin]; - bin_ind = UNDEFINED_BIN_IND; - } - else { - bin_ind = find_table_bin_ind(tab, hash, key); -+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) -+ goto retry; - existing = bin_ind != UNDEFINED_BIN_IND; - if (existing) { - bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE; -@@ -1489,14 +1570,19 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg, - hash = curr_entry_ptr->hash; - retval = (*func)(key, curr_entry_ptr->record, arg, 0); - if (rebuilds_num != tab->rebuilds_num) { -+ retry: - entries = tab->entries; - packed_p = tab->bins == NULL; - if (packed_p) { - i = find_entry(tab, hash, key); -+ if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - error_p = i == UNDEFINED_ENTRY_IND; - } - else { - i = find_table_entry_ind(tab, hash, key); -+ if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - error_p = i == UNDEFINED_ENTRY_IND; - i -= ENTRY_BASE; - } -@@ -1512,36 +1598,44 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg, - } - switch (retval) { - case ST_CONTINUE: -- break; -+ break; - case ST_CHECK: -- if (check_p) -- break; -+ if (check_p) -+ break; - case ST_STOP: - #ifdef ST_DEBUG -- st_check(tab); --#endif -- return 0; -- case ST_DELETE: -- if (packed_p) { -- bin = find_entry(tab, hash, curr_entry_ptr->key); -- if (bin == UNDEFINED_ENTRY_IND) -- break; -- } -- else { -- bin_ind = find_table_bin_ind(tab, hash, curr_entry_ptr->key); -- if (bin_ind == UNDEFINED_BIN_IND) -- break; -- bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE; -- MARK_BIN_DELETED(tab, bin_ind); -- } -- st_assert(&entries[bin] == curr_entry_ptr); -- MARK_ENTRY_DELETED(curr_entry_ptr); -- tab->num_entries--; -- update_range_for_deleted(tab, bin); -+ st_check(tab); -+#endif -+ return 0; -+ case ST_DELETE: { -+ st_data_t key = curr_entry_ptr->key; -+ -+ again: -+ if (packed_p) { -+ bin = find_entry(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto again; -+ if (bin == UNDEFINED_ENTRY_IND) -+ break; -+ } -+ else { -+ bin_ind = find_table_bin_ind(tab, hash, key); -+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) -+ goto again; -+ if (bin_ind == UNDEFINED_BIN_IND) -+ break; -+ bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE; -+ MARK_BIN_DELETED(tab, bin_ind); -+ } -+ curr_entry_ptr = &entries[bin]; -+ MARK_ENTRY_DELETED(curr_entry_ptr); -+ tab->num_entries--; -+ update_range_for_deleted(tab, bin); - #ifdef ST_DEBUG -- st_check(tab); -+ st_check(tab); - #endif -- break; -+ break; -+ } - } - } - #ifdef ST_DEBUG -@@ -2015,10 +2109,12 @@ st_expand_table(st_table *tab, st_index_t siz) - free(tmp); - } - --/* Rehash using linear search. */ --static void -+/* Rehash using linear search. Return TRUE if we found that the table -+ was rebuilt. */ -+static int - st_rehash_linear(st_table *tab) - { -+ int eq_p, rebuilt_p; - st_index_t i, j; - st_table_entry *p, *q; - if (tab->bins) { -@@ -2033,7 +2129,10 @@ st_rehash_linear(st_table *tab) - q = &tab->entries[j]; - if (DELETED_ENTRY_P(q)) - continue; -- if (PTR_EQUAL(tab, p, q->hash, q->key)) { -+ DO_PTR_EQUAL_CHECK(tab, p, q->hash, q->key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return TRUE; -+ if (eq_p) { - st_assert(p < q); - *p = *q; - MARK_ENTRY_DELETED(q); -@@ -2042,12 +2141,15 @@ st_rehash_linear(st_table *tab) - } - } - } -+ return FALSE; - } - --/* Rehash using index */ --static void -+/* Rehash using index. Return TRUE if we found that the table was -+ rebuilt. */ -+static int - st_rehash_indexed(st_table *tab) - { -+ int eq_p, rebuilt_p; - st_index_t i; - st_index_t const n = bins_size(tab); - unsigned int const size_ind = get_size_ind(tab); -@@ -2076,26 +2178,32 @@ st_rehash_indexed(st_table *tab) - set_bin(bins, size_ind, ind, i + ENTRY_BASE); - break; - } -- else if (PTR_EQUAL(tab, q, p->hash, p->key)) { -- /* duplicated key; delete it */ -- st_assert(q < p); -- q->record = p->record; -- MARK_ENTRY_DELETED(p); -- tab->num_entries--; -- update_range_for_deleted(tab, bin); -- break; -- } - else { -- /* hash collision; skip it */ -+ DO_PTR_EQUAL_CHECK(tab, q, p->hash, p->key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return TRUE; -+ if (eq_p) { -+ /* duplicated key; delete it */ -+ st_assert(q < p); -+ q->record = p->record; -+ MARK_ENTRY_DELETED(p); -+ tab->num_entries--; -+ update_range_for_deleted(tab, bin); -+ break; -+ } -+ else { -+ /* hash collision; skip it */ - #ifdef QUADRATIC_PROBE -- ind = hash_bin(ind + d, tab); -- d++; -+ ind = hash_bin(ind + d, tab); -+ d++; - #else -- ind = secondary_hash(ind, tab, &peterb); -+ ind = secondary_hash(ind, tab, &peterb); - #endif -- } -+ } -+ } - } - } -+ return FALSE; - } - - /* Reconstruct TAB's bins according to TAB's entries. This function -@@ -2104,10 +2212,14 @@ st_rehash_indexed(st_table *tab) - static void - st_rehash(st_table *tab) - { -- if (tab->bin_power <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS) -- st_rehash_linear(tab); -- else -- st_rehash_indexed(tab); -+ int rebuilt_p; -+ -+ do { -+ if (tab->bin_power <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS) -+ rebuilt_p = st_rehash_linear(tab); -+ else -+ rebuilt_p = st_rehash_indexed(tab); -+ } while (rebuilt_p); - } - - #ifdef RUBY --- -2.16.1 - diff --git a/ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch b/ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch new file mode 100644 index 0000000..fa5ad3e --- /dev/null +++ b/ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch @@ -0,0 +1,115 @@ +From 584b5929f9b769c4d0b03e322a9fddf2b2dd3454 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sun, 1 Apr 2018 13:02:11 +0000 +Subject: [PATCH] test_time_tz.rb: Kiritimati tzdata fix + +* test/ruby/test_time_tz.rb (gen_zdump_test): fix the expected + data at the Kiritimati's skip of New Year's Eve 1994. + [Bug #14655] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/ruby/test_time_tz.rb | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index dfe139033ed3..ac5f81892878 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -364,9 +364,18 @@ def self.gen_zdump_test(data) + Europe/London Sun Aug 10 01:00:00 1947 UTC = Sun Aug 10 02:00:00 1947 BST isdst=1 gmtoff=3600 + Europe/London Sun Nov 2 01:59:59 1947 UTC = Sun Nov 2 02:59:59 1947 BST isdst=1 gmtoff=3600 + Europe/London Sun Nov 2 02:00:00 1947 UTC = Sun Nov 2 02:00:00 1947 GMT isdst=0 gmtoff=0 ++End ++ if CORRECT_KIRITIMATI_SKIP_1994 ++ gen_zdump_test <<'End' ++Pacific/Kiritimati Sat Dec 31 09:59:59 1994 UTC = Fri Dec 30 23:59:59 1994 LINT isdst=0 gmtoff=-36000 ++Pacific/Kiritimati Sat Dec 31 10:00:00 1994 UTC = Sun Jan 1 00:00:00 1995 LINT isdst=0 gmtoff=50400 ++End ++ else ++ gen_zdump_test <<'End' + Pacific/Kiritimati Sun Jan 1 09:59:59 1995 UTC = Sat Dec 31 23:59:59 1994 LINT isdst=0 gmtoff=-36000 + Pacific/Kiritimati Sun Jan 1 10:00:00 1995 UTC = Mon Jan 2 00:00:00 1995 LINT isdst=0 gmtoff=50400 + End ++ end + gen_zdump_test <<'End' if has_right_tz + right/America/Los_Angeles Fri Jun 30 23:59:60 1972 UTC = Fri Jun 30 16:59:60 1972 PDT isdst=1 gmtoff=-25200 + right/America/Los_Angeles Wed Dec 31 23:59:60 2008 UTC = Wed Dec 31 15:59:60 2008 PST isdst=0 gmtoff=-28800 +-- + +From 2965c2d4df78e6f5acf8759f84c88ce14a4e70f1 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sun, 1 Apr 2018 02:00:36 +0000 +Subject: [PATCH] test_time_tz.rb: Kiritimati tzdata fix + +* test/ruby/test_time_tz.rb (TestTimeTZ#test_pacific_kiritimati): + fix the expected data at the skip of New Year's Eve 1994. + [Bug #14655] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/ruby/test_time_tz.rb | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index 39b830d28a3d..dfe139033ed3 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -89,6 +89,9 @@ def group_by(e, &block) + Time.local(1951, 5, 6, 1, 0, 0).dst? # DST with fixed tzdata + end + } ++ CORRECT_KIRITIMATI_SKIP_1994 = with_tz("Pacific/Kiritimati") { ++ Time.local(1994, 12, 31, 0, 0, 0).year == 1995 ++ } + + def time_to_s(t) + t.to_s +@@ -178,9 +181,17 @@ def test_europe_lisbon + + def test_pacific_kiritimati + with_tz(tz="Pacific/Kiritimati") { +- assert_time_constructor(tz, "1994-12-31 23:59:59 -1000", :local, [1994,12,31,23,59,59]) +- assert_time_constructor(tz, "1995-01-02 00:00:00 +1400", :local, [1995,1,1,0,0,0]) +- assert_time_constructor(tz, "1995-01-02 23:59:59 +1400", :local, [1995,1,1,23,59,59]) ++ assert_time_constructor(tz, "1994-12-30 00:00:00 -1000", :local, [1994,12,30,0,0,0]) ++ assert_time_constructor(tz, "1994-12-30 23:59:59 -1000", :local, [1994,12,30,23,59,59]) ++ if CORRECT_KIRITIMATI_SKIP_1994 ++ assert_time_constructor(tz, "1995-01-01 00:00:00 +1400", :local, [1994,12,31,0,0,0]) ++ assert_time_constructor(tz, "1995-01-01 23:59:59 +1400", :local, [1994,12,31,23,59,59]) ++ assert_time_constructor(tz, "1995-01-01 00:00:00 +1400", :local, [1995,1,1,0,0,0]) ++ else ++ assert_time_constructor(tz, "1994-12-31 23:59:59 -1000", :local, [1994,12,31,23,59,59]) ++ assert_time_constructor(tz, "1995-01-02 00:00:00 +1400", :local, [1995,1,1,0,0,0]) ++ assert_time_constructor(tz, "1995-01-02 23:59:59 +1400", :local, [1995,1,1,23,59,59]) ++ end + assert_time_constructor(tz, "1995-01-02 00:00:00 +1400", :local, [1995,1,2,0,0,0]) + } + end +-- + +From a0e6607a8172f9eaf9a15f03065736deb2035771 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sun, 1 Apr 2018 13:16:14 +0000 +Subject: [PATCH] test_time_tz.rb: Lisbon tzdata fix + +* test/ruby/test_time_tz.rb (gen_variational_zdump_test): Update + Lisbon zdump data, which fixed the 1912-01-01 transition for + Portugual and its colonies. [Bug #14655] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/ruby/test_time_tz.rb | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index ac5f81892878..b32caff9c539 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -434,5 +434,6 @@ def self.gen_variational_zdump_test(hint, data) + gen_variational_zdump_test "lisbon", <<'End' if has_lisbon_tz + Europe/Lisbon Mon Jan 1 00:36:31 1912 UTC = Sun Dec 31 23:59:59 1911 LMT isdst=0 gmtoff=-2192 + Europe/Lisbon Mon Jan 1 00:36:44 1912 UT = Sun Dec 31 23:59:59 1911 LMT isdst=0 gmtoff=-2205 ++Europe/Lisbon Sun Dec 31 23:59:59 1911 UT = Sun Dec 31 23:23:14 1911 LMT isdst=0 gmtoff=-2205 + End + end diff --git a/ruby-2.6.0-library-options-to-MAINLIBS.patch b/ruby-2.6.0-library-options-to-MAINLIBS.patch index 7cc644f..199798d 100644 --- a/ruby-2.6.0-library-options-to-MAINLIBS.patch +++ b/ruby-2.6.0-library-options-to-MAINLIBS.patch @@ -27,7 +27,7 @@ index aebbae1969a5..733a0c992fd7 100644 AC_DEFUN([RUBY_RM_RECURSIVE], [ m4_version_prereq([2.70], [-1], [ -@@ -2937,13 +2938,11 @@ AS_IF([test x"$enable_pthread" = xyes], [ +@@ -2938,13 +2939,11 @@ AS_IF([test x"$enable_pthread" = xyes], [ AC_DEFINE(_THREAD_SAFE) AC_DEFINE(HAVE_LIBPTHREAD) AC_CHECK_HEADERS(pthread_np.h, [], [], [@%:@include ]) @@ -46,7 +46,7 @@ index aebbae1969a5..733a0c992fd7 100644 ], [ AC_MSG_WARN("Don't know how to find pthread library on your system -- thread support disabled") ]) -@@ -3622,7 +3621,7 @@ LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a' +@@ -3623,7 +3622,7 @@ LIBRUBY_A='lib$(RUBY_SO_NAME)-static.a' LIBRUBY='$(LIBRUBY_A)' LIBRUBYARG_STATIC='-l$(RUBY_SO_NAME)-static' LIBRUBYARG='$(LIBRUBYARG_STATIC)' @@ -55,7 +55,7 @@ index aebbae1969a5..733a0c992fd7 100644 AS_CASE(["$target_os"], [cygwin*|mingw*|haiku*|darwin*], [ -@@ -3688,9 +3687,6 @@ AS_CASE("$enable_shared", [yes], [ +@@ -3689,9 +3688,6 @@ AS_CASE("$enable_shared", [yes], [ LIBRUBY_RELATIVE=no test -z "$CCDLFLAGS" || CFLAGS="$CFLAGS $CCDLFLAGS" ENABLE_SHARED=yes @@ -65,7 +65,7 @@ index aebbae1969a5..733a0c992fd7 100644 # libdir can be overridden in config.site file (on OpenSUSE at least). libdir_basename=lib -@@ -3725,7 +3721,6 @@ AS_CASE("$enable_shared", [yes], [ +@@ -3726,7 +3722,6 @@ AS_CASE("$enable_shared", [yes], [ ]) ], [freebsd*|dragonfly*], [ @@ -73,7 +73,7 @@ index aebbae1969a5..733a0c992fd7 100644 LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)' LIBRUBY_SONAME='$(LIBRUBY_SO)' AS_IF([test "$rb_cv_binary_elf" != "yes" ], [ -@@ -3734,7 +3729,6 @@ AS_CASE("$enable_shared", [yes], [ +@@ -3735,7 +3730,6 @@ AS_CASE("$enable_shared", [yes], [ ]) ], [netbsd*], [ @@ -81,7 +81,7 @@ index aebbae1969a5..733a0c992fd7 100644 LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)' LIBRUBY_SO="${LIBRUBY_SONAME}"'.$(TEENY)' RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ['-Wl,-soname,$(LIBRUBY_SONAME)' "$LDFLAGS_OPTDIR"]) -@@ -3745,11 +3739,9 @@ AS_CASE("$enable_shared", [yes], [ +@@ -3746,11 +3740,9 @@ AS_CASE("$enable_shared", [yes], [ ]) ], [openbsd*|mirbsd*], [ @@ -93,7 +93,7 @@ index aebbae1969a5..733a0c992fd7 100644 LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)' LIBRUBY_SONAME='lib$(RUBY_SO_NAME).$(SOEXT).$(RUBY_PROGRAM_VERSION)' LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_SO_NAME).$(SOEXT)' -@@ -3767,7 +3759,7 @@ AS_CASE("$enable_shared", [yes], [ +@@ -3768,7 +3760,7 @@ AS_CASE("$enable_shared", [yes], [ [aix*], [ RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ["${linker_flag}-bnoentry" "$XLDFLAGS" "$LDFLAGS_OPTDIR"]) LIBRUBYARG_SHARED='-L${libdir} -l${RUBY_SO_NAME}' @@ -102,7 +102,7 @@ index aebbae1969a5..733a0c992fd7 100644 ], [darwin*], [ LIBRUBY_LDSHARED='$(CC) -dynamiclib' -@@ -3787,7 +3779,6 @@ AS_CASE("$enable_shared", [yes], [ +@@ -3788,7 +3780,6 @@ AS_CASE("$enable_shared", [yes], [ LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT)' LIBRUBY_SONAME='lib$(RUBY_BASE_NAME).$(RUBY_API_VERSION).$(SOEXT)' LIBRUBY_ALIASES='$(LIBRUBY_SONAME) lib$(RUBY_INSTALL_NAME).$(SOEXT)' @@ -110,7 +110,7 @@ index aebbae1969a5..733a0c992fd7 100644 ], [interix*], [ LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)' -@@ -4030,7 +4021,6 @@ AS_CASE(["$target_os"], +@@ -4031,7 +4022,6 @@ AS_CASE(["$target_os"], ]) LIBRUBY_ALIASES='' FIRSTMAKEFILE=GNUmakefile:cygwin/GNUmakefile.in @@ -118,7 +118,7 @@ index aebbae1969a5..733a0c992fd7 100644 AS_IF([test x"$enable_shared" = xyes], [ LIBRUBY='lib$(RUBY_SO_NAME).dll.a' ], [ -@@ -4130,6 +4120,13 @@ AS_IF([test "${universal_binary-no}" = yes ], [ +@@ -4131,6 +4121,13 @@ AS_IF([test "${universal_binary-no}" = yes ], [ [rb_cv_architecture_available=yes], [rb_cv_architecture_available=no])) ]) diff --git a/ruby.spec b/ruby.spec index 67eb27c..c86034c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 5 -%global teeny_version 0 +%global teeny_version 1 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 91 +%global release 92 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -136,19 +136,9 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch # Add Gem.operating_system_defaults to allow packagers to override defaults. # https://github.com/rubygems/rubygems/pull/2116 Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch -# Fix segfault during generating documentation. -# https://bugs.ruby-lang.org/issues/14343 -Patch11: ruby-2.5.0-parse.y-assignable_error.patch -# Recent tzdata change breaks Ruby test suite. -# https://bugs.ruby-lang.org/issues/14438 -Patch12: ruby-2.5.0-Disable-Tokyo-TZ-tests.patch -# Fix thread_safe tests suite segfaults. -# https://bugs.ruby-lang.org/issues/14357 -Patch13: ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch -# Fix: Multiple vulnerabilities in RubyGems -# https://bugzilla.redhat.com/show_bug.cgi?id=1547431 -# https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ -Patch14: rubygems-2.5.0-multiple-vulnerabilities.patch +# TestTimeTZ test failures Kiritimati and Lisbon +# https://bugs.ruby-lang.org/issues/14655 +Patch11: ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch # Don't force libraries used to build Ruby to its dependencies. # https://bugs.ruby-lang.org/issues/14422 Patch15: ruby-2.6.0-library-options-to-MAINLIBS.patch @@ -537,9 +527,6 @@ rm -rf ext/fiddle/libffi* %patch9 -p1 %patch10 -p1 %patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p0 %patch15 -p1 # Provide an example of usage of the tapset: @@ -756,10 +743,6 @@ make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}" DISABLE_TESTS="" -# https://bugs.ruby-lang.org/issues/11480 -# Once seen: http://koji.fedoraproject.org/koji/taskinfo?taskID=12556650 -DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb" - # SIGSEV handler does not provide correct output on AArch64. # https://bugs.ruby-lang.org/issues/13758 %ifarch aarch64 @@ -1090,6 +1073,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Mar 29 2018 Pavel Valena - 2.5.1-92 +- Update to Ruby 2.5.1. + * Mon Mar 05 2018 V鱈t Ondruch - 2.5.0-91 - Don't force libraries used to build Ruby to its dependencies. - Re-enable GMP dependency. diff --git a/rubygems-2.5.0-multiple-vulnerabilities.patch b/rubygems-2.5.0-multiple-vulnerabilities.patch deleted file mode 100644 index e32926a..0000000 --- a/rubygems-2.5.0-multiple-vulnerabilities.patch +++ /dev/null @@ -1,2349 +0,0 @@ -diff --git lib/rubygems.rb lib/rubygems.rb -index 0475ced164..2762bfcb88 100644 ---- lib/rubygems.rb -+++ lib/rubygems.rb -@@ -10,7 +10,7 @@ - require 'thread' - - module Gem -- VERSION = "2.7.3" -+ VERSION = "2.7.6" - end - - # Must be first since it unloads the prelude from 1.9.2 -@@ -161,7 +161,7 @@ module Gem - # these are defined in Ruby 1.8.7, hence the need for this convoluted setup. - - READ_BINARY_ERRORS = begin -- read_binary_errors = [Errno::EACCES, Errno::EROFS] -+ read_binary_errors = [Errno::EACCES, Errno::EROFS, Errno::ENOSYS] - read_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) - read_binary_errors - end.freeze -@@ -171,7 +171,7 @@ module Gem - # these are defined in Ruby 1.8.7. - - WRITE_BINARY_ERRORS = begin -- write_binary_errors = [] -+ write_binary_errors = [Errno::ENOSYS] - write_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) - write_binary_errors - end.freeze -@@ -871,19 +871,19 @@ def self.refresh - # Safely read a file in binary mode on all platforms. - - def self.read_binary(path) -- open path, 'rb+' do |f| -+ File.open path, 'rb+' do |f| - f.flock(File::LOCK_EX) - f.read - end - rescue *READ_BINARY_ERRORS -- open path, 'rb' do |f| -+ File.open path, 'rb' do |f| - f.read - end - rescue Errno::ENOLCK # NFS - if Thread.main != Thread.current - raise - else -- open path, 'rb' do |f| -+ File.open path, 'rb' do |f| - f.read - end - end -diff --git lib/rubygems/commands/generate_index_command.rb lib/rubygems/commands/generate_index_command.rb -index 01f1f88405..0b677b73a9 100644 ---- lib/rubygems/commands/generate_index_command.rb -+++ lib/rubygems/commands/generate_index_command.rb -@@ -68,7 +68,7 @@ def execute - - if not File.exist?(options[:directory]) or - not File.directory?(options[:directory]) then -- alert_error "unknown directory name #{directory}." -+ alert_error "unknown directory name #{options[:directory]}." - terminate_interaction 1 - else - indexer = Gem::Indexer.new options.delete(:directory), options -diff --git lib/rubygems/commands/owner_command.rb lib/rubygems/commands/owner_command.rb -index 8e2271657a..637b5bdc4d 100644 ---- lib/rubygems/commands/owner_command.rb -+++ lib/rubygems/commands/owner_command.rb -@@ -64,7 +64,7 @@ def show_owners name - end - - with_response response do |resp| -- owners = YAML.load resp.body -+ owners = Gem::SafeYAML.load resp.body - - say "Owners for gem: #{name}" - owners.each do |owner| -diff --git lib/rubygems/commands/setup_command.rb lib/rubygems/commands/setup_command.rb -index 5d1414d102..6966cde01a 100644 ---- lib/rubygems/commands/setup_command.rb -+++ lib/rubygems/commands/setup_command.rb -@@ -350,7 +350,9 @@ def fake_spec.full_gem_path - def install_default_bundler_gem - return unless Gem::USE_BUNDLER_FOR_GEMDEPS - -- mkdir_p Gem::Specification.default_specifications_dir -+ specs_dir = Gem::Specification.default_specifications_dir -+ File.join(options[:destdir], specs_dir) unless Gem.win_platform? -+ mkdir_p specs_dir - - # Workaround for non-git environment. - gemspec = File.open('bundler/bundler.gemspec', 'rb'){|f| f.read.gsub(/`git ls-files -z`/, "''") } -@@ -359,23 +361,36 @@ def install_default_bundler_gem - bundler_spec = Gem::Specification.load("bundler/bundler.gemspec") - bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] } - bundler_spec.executables -= %w[bundler bundle_ruby] -- Dir.entries(Gem::Specification.default_specifications_dir). -+ -+ # Remove bundler-*.gemspec in default specification directory. -+ Dir.entries(specs_dir). - select {|gs| gs.start_with?("bundler-") }. -- each {|gs| File.delete(File.join(Gem::Specification.default_specifications_dir, gs)) } -+ each {|gs| File.delete(File.join(specs_dir, gs)) } - -- default_spec_path = File.join(Gem::Specification.default_specifications_dir, "#{bundler_spec.full_name}.gemspec") -+ default_spec_path = File.join(specs_dir, "#{bundler_spec.full_name}.gemspec") - Gem.write_binary(default_spec_path, bundler_spec.to_ruby) - - bundler_spec = Gem::Specification.load(default_spec_path) - -+ # Remove gemspec that was same version of vendored bundler. -+ normal_gemspec = File.join(Gem.default_dir, "specifications", "bundler-#{bundler_spec.version}.gemspec") -+ if File.file? normal_gemspec -+ File.delete normal_gemspec -+ end -+ -+ # Remove gem files that were same version of vendored bundler. - if File.directory? bundler_spec.gems_dir - Dir.entries(bundler_spec.gems_dir). -- select {|default_gem| File.basename(default_gem).match(/^bundler-#{Gem::Version::VERSION_PATTERN}$/) }. -+ select {|default_gem| File.basename(default_gem) == "bundler-#{bundler_spec.version}" }. - each {|default_gem| rm_r File.join(bundler_spec.gems_dir, default_gem) } - end - -- mkdir_p bundler_spec.bin_dir -- bundler_spec.executables.each {|e| cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_spec.bin_dir, e) } -+ bundler_bin_dir = File.join(Gem.default_dir, 'gems', bundler_spec.full_name, bundler_spec.bindir) -+ File.join(options[:destdir], bundler_bin_dir) unless Gem.win_platform? -+ mkdir_p bundler_bin_dir -+ bundler_spec.executables.each do |e| -+ cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_bin_dir, e) -+ end - - if Gem.win_platform? - require 'rubygems/installer' -diff --git lib/rubygems/commands/unpack_command.rb lib/rubygems/commands/unpack_command.rb -index eb7f550673..b873f20d28 100644 ---- lib/rubygems/commands/unpack_command.rb -+++ lib/rubygems/commands/unpack_command.rb -@@ -94,7 +94,7 @@ def execute - - spec_file = File.basename spec.spec_file - -- open spec_file, 'w' do |io| -+ File.open spec_file, 'w' do |io| - io.write metadata - end - else -@@ -176,7 +176,7 @@ def get_metadata path, security_policy = nil - - metadata = nil - -- open path, Gem.binary_mode do |io| -+ File.open path, Gem.binary_mode do |io| - tar = Gem::Package::TarReader.new io - tar.each_entry do |entry| - case entry.full_name -diff --git lib/rubygems/config_file.rb lib/rubygems/config_file.rb -index a4efed0f5a..c0d19dbfc2 100644 ---- lib/rubygems/config_file.rb -+++ lib/rubygems/config_file.rb -@@ -458,7 +458,7 @@ def to_yaml # :nodoc: - - # Writes out this config file, replacing its source. - def write -- open config_file_name, 'w' do |io| -+ File.open config_file_name, 'w' do |io| - io.write to_yaml - end - end -diff --git lib/rubygems/ext/builder.rb lib/rubygems/ext/builder.rb -index a1619c97d7..eb9db199d5 100644 ---- lib/rubygems/ext/builder.rb -+++ lib/rubygems/ext/builder.rb -@@ -212,7 +212,7 @@ def write_gem_make_out output # :nodoc: - - FileUtils.mkdir_p @spec.extension_dir - -- open destination, 'wb' do |io| io.puts output end -+ File.open destination, 'wb' do |io| io.puts output end - - destination - end -diff --git lib/rubygems/indexer.rb lib/rubygems/indexer.rb -index 871cc09d8d..3ea994414b 100644 ---- lib/rubygems/indexer.rb -+++ lib/rubygems/indexer.rb -@@ -2,6 +2,7 @@ - require 'rubygems' - require 'rubygems/package' - require 'time' -+require 'tmpdir' - - begin - gem 'builder' -@@ -64,7 +65,7 @@ def initialize(directory, options = {}) - @build_modern = options[:build_modern] - - @dest_directory = directory -- @directory = File.join(Dir.tmpdir, "gem_generate_index_#{$$}") -+ @directory = Dir.mktmpdir 'gem_generate_index' - - marshal_name = "Marshal.#{Gem.marshal_version}" - -@@ -123,7 +124,7 @@ def build_marshal_gemspecs specs - marshal_name = File.join @quick_marshal_dir, spec_file_name - - marshal_zipped = Gem.deflate Marshal.dump(spec) -- open marshal_name, 'wb' do |io| io.write marshal_zipped end -+ File.open marshal_name, 'wb' do |io| io.write marshal_zipped end - - files << marshal_name - -@@ -261,7 +262,7 @@ def compress(filename, extension) - - zipped = Gem.deflate data - -- open "#{filename}.#{extension}", 'wb' do |io| -+ File.open "#{filename}.#{extension}", 'wb' do |io| - io.write zipped - end - end -@@ -427,7 +428,7 @@ def update_specs_index(index, source, dest) - - specs_index = compact_specs specs_index.uniq.sort - -- open dest, 'wb' do |io| -+ File.open dest, 'wb' do |io| - Marshal.dump specs_index, io - end - end -diff --git lib/rubygems/installer.rb lib/rubygems/installer.rb -index 0cbca0791b..ee5fedeb64 100644 ---- lib/rubygems/installer.rb -+++ lib/rubygems/installer.rb -@@ -206,7 +206,7 @@ def check_executable_overwrite filename # :nodoc: - ruby_executable = false - existing = nil - -- open generated_bin, 'rb' do |io| -+ File.open generated_bin, 'rb' do |io| - next unless io.gets =~ /^#!/ # shebang - io.gets # blankline - -@@ -427,7 +427,7 @@ def default_spec_file - # specifications directory. - - def write_spec -- open spec_file, 'w' do |file| -+ File.open spec_file, 'w' do |file| - spec.installed_by_version = Gem.rubygems_version - - file.puts spec.to_ruby_for_cache -@@ -464,7 +464,12 @@ def generate_windows_script(filename, bindir) - def generate_bin # :nodoc: - return if spec.executables.nil? or spec.executables.empty? - -- Dir.mkdir @bin_dir unless File.exist? @bin_dir -+ begin -+ Dir.mkdir @bin_dir -+ rescue SystemCallError -+ raise unless File.directory? @bin_dir -+ end -+ - raise Gem::FilePermissionError.new(@bin_dir) unless File.writable? @bin_dir - - spec.executables.each do |filename| -@@ -863,7 +868,7 @@ def write_build_info_file - - build_info_file = File.join build_info_dir, "#{spec.full_name}.info" - -- open build_info_file, 'w' do |io| -+ File.open build_info_file, 'w' do |io| - @build_args.each do |arg| - io.puts arg - end -diff --git lib/rubygems/package.rb lib/rubygems/package.rb -index 77811ed5ec..b924122827 100644 ---- lib/rubygems/package.rb -+++ lib/rubygems/package.rb -@@ -219,7 +219,7 @@ def add_files tar # :nodoc: - next unless stat.file? - - tar.add_file_simple file, stat.mode, stat.size do |dst_io| -- open file, 'rb' do |src_io| -+ File.open file, 'rb' do |src_io| - dst_io.write src_io.read 16384 until src_io.eof? - end - end -@@ -378,9 +378,9 @@ def extract_tar_gz io, destination_dir, pattern = "*" # :nodoc: - File.dirname destination - end - -- FileUtils.mkdir_p mkdir, mkdir_options -+ mkdir_p_safe mkdir, mkdir_options, destination_dir, entry.full_name - -- open destination, 'wb' do |out| -+ File.open destination, 'wb' do |out| - out.write entry.read - FileUtils.chmod entry.header.mode, destination - end if entry.file? -@@ -416,20 +416,35 @@ def install_location filename, destination_dir # :nodoc: - raise Gem::Package::PathError.new(filename, destination_dir) if - filename.start_with? '/' - -- destination_dir = File.realpath destination_dir if -- File.respond_to? :realpath -+ destination_dir = realpath destination_dir - destination_dir = File.expand_path destination_dir - - destination = File.join destination_dir, filename - destination = File.expand_path destination - - raise Gem::Package::PathError.new(destination, destination_dir) unless -- destination.start_with? destination_dir -+ destination.start_with? destination_dir + '/' - - destination.untaint - destination - end - -+ def mkdir_p_safe mkdir, mkdir_options, destination_dir, file_name -+ destination_dir = realpath File.expand_path(destination_dir) -+ parts = mkdir.split(File::SEPARATOR) -+ parts.reduce do |path, basename| -+ path = realpath path unless path == "" -+ path = File.expand_path(path + File::SEPARATOR + basename) -+ lstat = File.lstat path rescue nil -+ if !lstat || !lstat.directory? -+ unless path.start_with? destination_dir and (FileUtils.mkdir path, mkdir_options rescue false) -+ raise Gem::Package::PathError.new(file_name, destination_dir) -+ end -+ end -+ path -+ end -+ end -+ - ## - # Loads a Gem::Specification from the TarEntry +entry+ - -@@ -603,6 +618,10 @@ def verify_files gem - raise Gem::Package::FormatError.new \ - 'package content (data.tar.gz) is missing', @gem - end -+ -+ if duplicates = @files.group_by {|f| f }.select {|k,v| v.size > 1 }.map(&:first) and duplicates.any? -+ raise Gem::Security::Exception, "duplicate files in the package: (#{duplicates.map(&:inspect).join(', ')})" -+ end - end - - ## -@@ -616,6 +635,16 @@ def verify_gz entry # :nodoc: - raise Gem::Package::FormatError.new(e.message, entry.full_name) - end - -+ if File.respond_to? :realpath -+ def realpath file -+ File.realpath file -+ end -+ else -+ def realpath file -+ file -+ end -+ end -+ - end - - require 'rubygems/package/digest_io' -diff --git lib/rubygems/package/file_source.rb lib/rubygems/package/file_source.rb -index 1a4dc4c824..ecc3a68677 100644 ---- lib/rubygems/package/file_source.rb -+++ lib/rubygems/package/file_source.rb -@@ -23,11 +23,11 @@ def present? - end - - def with_write_io &block -- open path, 'wb', &block -+ File.open path, 'wb', &block - end - - def with_read_io &block -- open path, 'rb', &block -+ File.open path, 'rb', &block - end - - end -diff --git lib/rubygems/package/old.rb lib/rubygems/package/old.rb -index f6e6e67c38..322d682ca8 100644 ---- lib/rubygems/package/old.rb -+++ lib/rubygems/package/old.rb -@@ -80,7 +80,7 @@ def extract_files destination_dir - - FileUtils.mkdir_p File.dirname destination - -- open destination, 'wb', entry['mode'] do |out| -+ File.open destination, 'wb', entry['mode'] do |out| - out.write file_data - end - -diff --git lib/rubygems/package/tar_header.rb lib/rubygems/package/tar_header.rb -index c54bd14d57..d557357114 100644 ---- lib/rubygems/package/tar_header.rb -+++ lib/rubygems/package/tar_header.rb -@@ -104,25 +104,30 @@ def self.from(stream) - fields = header.unpack UNPACK_FORMAT - - new :name => fields.shift, -- :mode => fields.shift.oct, -- :uid => fields.shift.oct, -- :gid => fields.shift.oct, -- :size => fields.shift.oct, -- :mtime => fields.shift.oct, -- :checksum => fields.shift.oct, -+ :mode => strict_oct(fields.shift), -+ :uid => strict_oct(fields.shift), -+ :gid => strict_oct(fields.shift), -+ :size => strict_oct(fields.shift), -+ :mtime => strict_oct(fields.shift), -+ :checksum => strict_oct(fields.shift), - :typeflag => fields.shift, - :linkname => fields.shift, - :magic => fields.shift, -- :version => fields.shift.oct, -+ :version => strict_oct(fields.shift), - :uname => fields.shift, - :gname => fields.shift, -- :devmajor => fields.shift.oct, -- :devminor => fields.shift.oct, -+ :devmajor => strict_oct(fields.shift), -+ :devminor => strict_oct(fields.shift), - :prefix => fields.shift, - - :empty => empty - end - -+ def self.strict_oct(str) -+ return str.oct if str =~ /\A[0-7]*\z/ -+ raise ArgumentError, "#{str.inspect} is not an octal string" -+ end -+ - ## - # Creates a new TarHeader using +vals+ - -diff --git lib/rubygems/package/tar_writer.rb lib/rubygems/package/tar_writer.rb -index f68b8d4c5e..390f7851a3 100644 ---- lib/rubygems/package/tar_writer.rb -+++ lib/rubygems/package/tar_writer.rb -@@ -196,6 +196,8 @@ def add_file_signed name, mode, signer - digest_name == signer.digest_name - end - -+ raise "no #{signer.digest_name} in #{digests.values.compact}" unless signature_digest -+ - if signer.key then - signature = signer.sign signature_digest.digest - -diff --git lib/rubygems/request_set/lockfile.rb lib/rubygems/request_set/lockfile.rb -index 7f6eadb939..76ad17d486 100644 ---- lib/rubygems/request_set/lockfile.rb -+++ lib/rubygems/request_set/lockfile.rb -@@ -223,7 +223,7 @@ def to_s - def write - content = to_s - -- open "#{@gem_deps_file}.lock", 'w' do |io| -+ File.open "#{@gem_deps_file}.lock", 'w' do |io| - io.write content - end - end -diff --git lib/rubygems/security.rb lib/rubygems/security.rb -index 4690dd9230..236577c5a3 100644 ---- lib/rubygems/security.rb -+++ lib/rubygems/security.rb -@@ -578,7 +578,7 @@ def self.trusted_certificates &block - def self.write pemmable, path, permissions = 0600, passphrase = nil, cipher = KEY_CIPHER - path = File.expand_path path - -- open path, 'wb', permissions do |io| -+ File.open path, 'wb', permissions do |io| - if passphrase and cipher - io.write pemmable.to_pem cipher, passphrase - else -diff --git lib/rubygems/security/trust_dir.rb lib/rubygems/security/trust_dir.rb -index bf44975cc6..849cf3cd3e 100644 ---- lib/rubygems/security/trust_dir.rb -+++ lib/rubygems/security/trust_dir.rb -@@ -93,7 +93,7 @@ def trust_cert certificate - - destination = cert_path certificate - -- open destination, 'wb', @permissions[:trusted_cert] do |io| -+ File.open destination, 'wb', @permissions[:trusted_cert] do |io| - io.write certificate.to_pem - end - end -diff --git lib/rubygems/server.rb lib/rubygems/server.rb -index 93b3af36f8..62c3dfe9cf 100644 ---- lib/rubygems/server.rb -+++ lib/rubygems/server.rb -@@ -623,6 +623,18 @@ def root(req, res) - executables = nil if executables.empty? - executables.last["is_last"] = true if executables - -+ # Pre-process spec homepage for safety reasons -+ begin -+ homepage_uri = URI.parse(spec.homepage) -+ if [URI::HTTP, URI::HTTPS].member? homepage_uri.class -+ homepage_uri = spec.homepage -+ else -+ homepage_uri = "." -+ end -+ rescue URI::InvalidURIError -+ homepage_uri = "." -+ end -+ - specs << { - "authors" => spec.authors.sort.join(", "), - "date" => spec.date.to_s, -@@ -632,7 +644,7 @@ def root(req, res) - "only_one_executable" => (executables && executables.size == 1), - "full_name" => spec.full_name, - "has_deps" => !deps.empty?, -- "homepage" => spec.homepage, -+ "homepage" => homepage_uri, - "name" => spec.name, - "rdoc_installed" => Gem::RDoc.new(spec).rdoc_installed?, - "ri_installed" => Gem::RDoc.new(spec).ri_installed?, -diff --git lib/rubygems/source.rb lib/rubygems/source.rb -index bd84c217a7..b28b850660 100644 ---- lib/rubygems/source.rb -+++ lib/rubygems/source.rb -@@ -160,7 +160,7 @@ def fetch_spec name_tuple - if update_cache? then - FileUtils.mkdir_p cache_dir - -- open local_spec, 'wb' do |io| -+ File.open local_spec, 'wb' do |io| - io.write spec - end - end -diff --git lib/rubygems/specification.rb lib/rubygems/specification.rb -index efc08c4738..2560324b7a 100644 ---- lib/rubygems/specification.rb -+++ lib/rubygems/specification.rb -@@ -15,6 +15,7 @@ - require 'rubygems/stub_specification' - require 'rubygems/util/list' - require 'stringio' -+require 'uri' - - ## - # The Specification class contains the information for a Gem. Typically -@@ -2822,10 +2823,16 @@ def validate packaging = true - raise Gem::InvalidSpecificationException, "#{lazy} is not a summary" - end - -- if homepage and not homepage.empty? and -- homepage !~ /\A[a-z][a-z\d+.-]*:/i then -- raise Gem::InvalidSpecificationException, -- "\"#{homepage}\" is not a URI" -+ # Make sure a homepage is valid HTTP/HTTPS URI -+ if homepage and not homepage.empty? -+ begin -+ homepage_uri = URI.parse(homepage) -+ unless [URI::HTTP, URI::HTTPS].member? homepage_uri.class -+ raise Gem::InvalidSpecificationException, "\"#{homepage}\" is not a valid HTTP URI" -+ end -+ rescue URI::InvalidURIError -+ raise Gem::InvalidSpecificationException, "\"#{homepage}\" is not a valid HTTP URI" -+ end - end - - # Warnings -diff --git lib/rubygems/stub_specification.rb lib/rubygems/stub_specification.rb -index 8337375ab4..ae2effbc84 100644 ---- lib/rubygems/stub_specification.rb -+++ lib/rubygems/stub_specification.rb -@@ -113,6 +113,8 @@ def data - unless @data - begin - saved_lineno = $. -+ -+ # TODO It should be use `File.open`, but bundler-1.16.1 example expects Kernel#open. - open loaded_from, OPEN_MODE do |file| - begin - file.readline # discard encoding line -diff --git lib/rubygems/test_case.rb lib/rubygems/test_case.rb -index f7f216e5e3..39aa4fc9a7 100644 ---- lib/rubygems/test_case.rb -+++ lib/rubygems/test_case.rb -@@ -488,7 +488,7 @@ def git_gem name = 'a', version = 1 - - gemspec = "#{name}.gemspec" - -- open File.join(directory, gemspec), 'w' do |io| -+ File.open File.join(directory, gemspec), 'w' do |io| - io.write git_spec.to_ruby - end - -@@ -592,7 +592,7 @@ def mu_pp(obj) - # Reads a Marshal file at +path+ - - def read_cache(path) -- open path.dup.untaint, 'rb' do |io| -+ File.open path.dup.untaint, 'rb' do |io| - Marshal.load io.read - end - end -@@ -612,7 +612,7 @@ def write_file(path) - dir = File.dirname path - FileUtils.mkdir_p dir unless File.directory? dir - -- open path, 'wb' do |io| -+ File.open path, 'wb' do |io| - yield io if block_given? - end - -@@ -727,7 +727,7 @@ def install_default_gems(*specs) - install_default_specs(*specs) - - specs.each do |spec| -- open spec.loaded_from, 'w' do |io| -+ File.open spec.loaded_from, 'w' do |io| - io.write spec.to_ruby_for_cache - end - end -@@ -1363,7 +1363,7 @@ def save_gemspec name = 'a', version = 1, directory = '.' - yield specification if block_given? - end - -- open File.join(directory, "#{name}.gemspec"), 'w' do |io| -+ File.open File.join(directory, "#{name}.gemspec"), 'w' do |io| - io.write vendor_spec.to_ruby - end - -diff --git lib/rubygems/test_utilities.rb lib/rubygems/test_utilities.rb -index 686916ea02..83c9d2d0fe 100644 ---- lib/rubygems/test_utilities.rb -+++ lib/rubygems/test_utilities.rb -@@ -346,7 +346,7 @@ def spec name, version, dependencies = nil, &block - end - - def write_spec spec # :nodoc: -- open spec.spec_file, 'w' do |io| -+ File.open spec.spec_file, 'w' do |io| - io.write spec.to_ruby_for_cache - end - end -diff --git lib/rubygems/util.rb lib/rubygems/util.rb -index 2de45c900b..6c75910004 100644 ---- lib/rubygems/util.rb -+++ lib/rubygems/util.rb -@@ -114,7 +114,8 @@ def self.traverse_parents directory, &block - - here = File.expand_path directory - loop do -- Dir.chdir here, &block -+ Dir.chdir here, &block rescue Errno::EACCES -+ - new_here = File.expand_path('..', here) - return if new_here == here # toplevel - here = new_here -diff --git lib/rubygems/validator.rb lib/rubygems/validator.rb -index 83448229bb..6842e4fa9c 100644 ---- lib/rubygems/validator.rb -+++ lib/rubygems/validator.rb -@@ -34,7 +34,7 @@ def verify_gem(gem_data) - # gem_path:: [String] Path to gem file - - def verify_gem_file(gem_path) -- open gem_path, Gem.binary_mode do |file| -+ File.open gem_path, Gem.binary_mode do |file| - gem_data = file.read - verify_gem gem_data - end -@@ -109,7 +109,7 @@ def alien(gems=[]) - - good, gone, unreadable = nil, nil, nil, nil - -- open gem_path, Gem.binary_mode do |file| -+ File.open gem_path, Gem.binary_mode do |file| - package = Gem::Package.new gem_path - - good, gone = package.contents.partition { |file_name| -@@ -134,7 +134,7 @@ def alien(gems=[]) - - source = File.join gem_directory, entry['path'] - -- open source, Gem.binary_mode do |f| -+ File.open source, Gem.binary_mode do |f| - unless f.read == data then - errors[gem_name][entry['path']] = "Modified from original" - end -diff --git test/rubygems/test_gem.rb test/rubygems/test_gem.rb -index 8a11cc2ecf..183771f0f3 100644 ---- test/rubygems/test_gem.rb -+++ test/rubygems/test_gem.rb -@@ -7,7 +7,7 @@ - require 'tmpdir' - - # TODO: push this up to test_case.rb once battle tested --$SAFE=1 -+ - $LOAD_PATH.map! do |path| - path.dup.untaint - end -@@ -463,7 +463,7 @@ def test_self_ensure_gem_directories_missing_parents - assert File.directory?(util_cache_dir) - end - -- unless win_platform? then # only for FS that support write protection -+ unless win_platform? || Process.uid.zero? then # only for FS that support write protection - def test_self_ensure_gem_directories_write_protected - gemdir = File.join @tempdir, "egd" - FileUtils.rm_r gemdir rescue nil -@@ -775,7 +775,7 @@ def test_self_prefix_sitelibdir - end - - def test_self_read_binary -- open 'test', 'w' do |io| -+ File.open 'test', 'w' do |io| - io.write "\xCF\x80" - end - -@@ -1643,7 +1643,7 @@ def test_use_gemdeps - spec = Gem::Specification.find { |s| s == spec } - refute spec.activated? - -- open gem_deps_file, 'w' do |io| -+ File.open gem_deps_file, 'w' do |io| - io.write 'gem "a"' - end - -@@ -1662,7 +1662,7 @@ def test_use_gemdeps_ENV - - refute spec.activated? - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.write 'gem "a"' - end - -@@ -1706,7 +1706,7 @@ def test_use_gemdeps_automatic - - refute spec.activated? - -- open 'Gemfile', 'w' do |io| -+ File.open 'Gemfile', 'w' do |io| - io.write 'gem "a"' - end - -@@ -1735,7 +1735,7 @@ def test_use_gemdeps_disabled - - refute spec.activated? - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.write 'gem "a"' - end - -@@ -1750,7 +1750,7 @@ def test_use_gemdeps_missing_gem - skip 'Insecure operation - read' if RUBY_VERSION <= "1.8.7" - rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], 'x' - -- open 'x', 'w' do |io| -+ File.open 'x', 'w' do |io| - io.write 'gem "a"' - end - -@@ -1791,7 +1791,7 @@ def test_use_gemdeps_specific - spec = Gem::Specification.find { |s| s == spec } - refute spec.activated? - -- open 'x', 'w' do |io| -+ File.open 'x', 'w' do |io| - io.write 'gem "a"' - end - -diff --git test/rubygems/test_gem_commands_cleanup_command.rb test/rubygems/test_gem_commands_cleanup_command.rb -index c55e195975..60d208fcc0 100644 ---- test/rubygems/test_gem_commands_cleanup_command.rb -+++ test/rubygems/test_gem_commands_cleanup_command.rb -@@ -158,7 +158,7 @@ def test_execute_all_user_no_sudo - assert_path_exists @a_1_1.gem_dir - ensure - FileUtils.chmod 0755, @gemhome -- end unless win_platform? -+ end unless win_platform? || Process.uid.zero? - - def test_execute_dry_run - @cmd.options[:args] = %w[a] -diff --git test/rubygems/test_gem_commands_install_command.rb test/rubygems/test_gem_commands_install_command.rb -index dd86a85038..822d40e3f3 100644 ---- test/rubygems/test_gem_commands_install_command.rb -+++ test/rubygems/test_gem_commands_install_command.rb -@@ -131,6 +131,7 @@ def test_execute_local_transitive_prerelease - - def test_execute_no_user_install - skip 'skipped on MS Windows (chmod has no effect)' if win_platform? -+ skip 'skipped in root privilege' if Process.uid.zero? - - specs = spec_fetcher do |fetcher| - fetcher.gem 'a', 2 -diff --git test/rubygems/test_gem_commands_owner_command.rb test/rubygems/test_gem_commands_owner_command.rb -index 44652c1093..53cac4ce87 100644 ---- test/rubygems/test_gem_commands_owner_command.rb -+++ test/rubygems/test_gem_commands_owner_command.rb -@@ -43,6 +43,31 @@ def test_show_owners - assert_match %r{- 4}, @ui.output - end - -+ def test_show_owners_dont_load_objects -+ skip "testing a psych-only API" unless defined?(::Psych::DisallowedClass) -+ -+ response = < 0 -- assert Gem::Specification.find_all_by_name('x').length == 0 -+ assert Gem::Specification.find_all_by_name('x').length.zero? - end - - def test_execute_all -diff --git test/rubygems/test_gem_dependency_installer.rb test/rubygems/test_gem_dependency_installer.rb -index e55cc75682..3d76291668 100644 ---- test/rubygems/test_gem_dependency_installer.rb -+++ test/rubygems/test_gem_dependency_installer.rb -@@ -424,7 +424,7 @@ def test_install_dependency_existing_extension - extconf_rb = File.join @gemhome, 'gems', 'e-1', 'extconf.rb' - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |io| -+ File.open extconf_rb, 'w' do |io| - io.write <<-EXTCONF_RB - require 'mkmf' - create_makefile 'e' -diff --git test/rubygems/test_gem_doctor.rb test/rubygems/test_gem_doctor.rb -index 39b8a11692..8db65d70ce 100644 ---- test/rubygems/test_gem_doctor.rb -+++ test/rubygems/test_gem_doctor.rb -@@ -24,7 +24,7 @@ def test_doctor - - FileUtils.rm b.spec_file - -- open c.spec_file, 'w' do |io| -+ File.open c.spec_file, 'w' do |io| - io.write 'this will raise an exception when evaluated.' - end - -@@ -77,7 +77,7 @@ def test_doctor_dry_run - - FileUtils.rm b.spec_file - -- open c.spec_file, 'w' do |io| -+ File.open c.spec_file, 'w' do |io| - io.write 'this will raise an exception when evaluated.' - end - -diff --git test/rubygems/test_gem_ext_builder.rb test/rubygems/test_gem_ext_builder.rb -index d142ef28da..3dabd3e350 100644 ---- test/rubygems/test_gem_ext_builder.rb -+++ test/rubygems/test_gem_ext_builder.rb -@@ -32,7 +32,7 @@ def test_class_make - results = [] - - Dir.chdir @ext do -- open 'Makefile', 'w' do |io| -+ File.open 'Makefile', 'w' do |io| - io.puts <<-MAKEFILE - all: - \t@#{Gem.ruby} -e "puts %Q{all: \#{ENV['DESTDIR']}}" -@@ -72,7 +72,7 @@ def test_class_make_no_clean - results = [] - - Dir.chdir @ext do -- open 'Makefile', 'w' do |io| -+ File.open 'Makefile', 'w' do |io| - io.puts <<-MAKEFILE - all: - \t@#{Gem.ruby} -e "puts %Q{all: \#{ENV['DESTDIR']}}" -@@ -107,7 +107,7 @@ def test_build_extensions - - extconf_rb = File.join ext_dir, 'extconf.rb' - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' - require 'mkmf' - -@@ -168,7 +168,7 @@ def Gem.install_extension_in_lib - - extconf_rb = File.join ext_dir, 'extconf.rb' - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' - require 'mkmf' - -@@ -290,7 +290,7 @@ def test_build_extensions_with_build_args - - FileUtils.mkdir_p @spec.gem_dir - -- open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| -+ File.open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| - f.write <<-'RUBY' - puts "IN EXTCONF" - extconf_args = File.join File.dirname(__FILE__), 'extconf_args' -@@ -323,7 +323,7 @@ def test_initialize - - build_info_file = File.join build_info_dir, "#{@spec.full_name}.info" - -- open build_info_file, 'w' do |io| -+ File.open build_info_file, 'w' do |io| - io.puts '--with-foo-dir=/nonexistent' - end - -diff --git test/rubygems/test_gem_gem_runner.rb test/rubygems/test_gem_gem_runner.rb -index 0a1faa404a..d68ac4da81 100644 ---- test/rubygems/test_gem_gem_runner.rb -+++ test/rubygems/test_gem_gem_runner.rb -@@ -1,38 +1,6 @@ - # frozen_string_literal: true - require 'rubygems/test_case' --begin -- gem_home_files = lambda{ -- if Dir.exist?(ENV["GEM_HOME"]) -- require "find" -- ary = Find.find(ENV["GEM_HOME"]).to_a -- else -- [] -- end -- } -- prev_gem_home = ENV["GEM_HOME"] -- prev_gem_home_files = gem_home_files.call -- prev_threads = Thread.list.map{|e| e.inspect} -- -- require 'rubygems/gem_runner' --ensure -- if $! -- msg = < 'KEY' } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path - -- open Gem.configuration.credentials_path, 'w' do |f| -+ File.open Gem.configuration.credentials_path, 'w' do |f| - f.write keys.to_yaml - end - -@@ -59,7 +59,7 @@ def test_api_key_override - keys = { :rubygems_api_key => 'KEY', :other => 'OTHER' } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path - -- open Gem.configuration.credentials_path, 'w' do |f| -+ File.open Gem.configuration.credentials_path, 'w' do |f| - f.write keys.to_yaml - end - -@@ -163,7 +163,7 @@ def test_sign_in_with_other_credentials_doesnt_overwrite_other_keys - other_api_key = 'f46dbb18bb6a9c97cdc61b5b85c186a17403cdcbf' - - FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path) -- open Gem.configuration.credentials_path, 'w' do |f| -+ File.open Gem.configuration.credentials_path, 'w' do |f| - f.write Hash[:other_api_key, other_api_key].to_yaml - end - util_sign_in [api_key, 200, 'OK'] -diff --git test/rubygems/test_gem_indexer.rb test/rubygems/test_gem_indexer.rb -index a4a966e8de..5a9075e676 100644 ---- test/rubygems/test_gem_indexer.rb -+++ test/rubygems/test_gem_indexer.rb -@@ -39,8 +39,7 @@ def setup - - def test_initialize - assert_equal @tempdir, @indexer.dest_directory -- assert_equal File.join(Dir.tmpdir, "gem_generate_index_#{$$}"), -- @indexer.directory -+ assert_match %r{#{Dir.mktmpdir('gem_generate_index').match(/.*-/)}}, @indexer.directory - - indexer = Gem::Indexer.new @tempdir - assert indexer.build_modern -diff --git test/rubygems/test_gem_install_update_options.rb test/rubygems/test_gem_install_update_options.rb -index e2d546307d..371e408d27 100644 ---- test/rubygems/test_gem_install_update_options.rb -+++ test/rubygems/test_gem_install_update_options.rb -@@ -141,6 +141,8 @@ def test_user_install_enabled - def test_user_install_disabled_read_only - if win_platform? - skip('test_user_install_disabled_read_only test skipped on MS Windows') -+ elsif Process.uid.zero? -+ skip('test_user_install_disabled_read_only test skipped in root privilege') - else - @cmd.handle_options %w[--no-user-install] - -diff --git test/rubygems/test_gem_installer.rb test/rubygems/test_gem_installer.rb -index 39095c7dee..93b0482407 100644 ---- test/rubygems/test_gem_installer.rb -+++ test/rubygems/test_gem_installer.rb -@@ -140,7 +140,7 @@ def test_check_executable_overwrite_format_executable - s.require_path = 'lib' - end - -- open File.join(util_inst_bindir, 'executable'), 'w' do |io| -+ File.open File.join(util_inst_bindir, 'executable'), 'w' do |io| - io.write <<-EXEC - #!/usr/local/bin/ruby - # -@@ -437,6 +437,8 @@ def test_generate_bin_script_no_perms - - if win_platform? - skip('test_generate_bin_script_no_perms skipped on MS Windows') -+ elsif Process.uid.zero? -+ skip('test_generate_bin_script_no_perms skipped in root privilege') - else - FileUtils.chmod 0000, util_inst_bindir - -@@ -529,6 +531,8 @@ def test_generate_bin_symlink_no_perms - - if win_platform? - skip('test_generate_bin_symlink_no_perms skipped on MS Windows') -+ elsif Process.uid.zero? -+ skip('test_user_install_disabled_read_only test skipped in root privilege') - else - FileUtils.chmod 0000, util_inst_bindir - -diff --git test/rubygems/test_gem_package.rb test/rubygems/test_gem_package.rb -index cec1981c4c..d1664cf285 100644 ---- test/rubygems/test_gem_package.rb -+++ test/rubygems/test_gem_package.rb -@@ -24,7 +24,7 @@ def setup - end - - def test_class_new_old_format -- open 'old_format.gem', 'wb' do |io| -+ File.open 'old_format.gem', 'wb' do |io| - io.write SIMPLE_GEM - end - -@@ -45,7 +45,7 @@ def test_add_checksums - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -110,8 +110,8 @@ def test_add_files - - FileUtils.mkdir_p 'lib/empty' - -- open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end -- open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end -+ File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end -+ File.open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end - - package = Gem::Package.new 'bogus.gem' - package.spec = spec -@@ -140,7 +140,7 @@ def test_add_files_symlink - spec.files = %w[lib/code.rb lib/code_sym.rb] - - FileUtils.mkdir_p 'lib' -- open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end -+ File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end - - # NOTE: 'code.rb' is correct, because it's relative to lib/code_sym.rb - File.symlink('code.rb', 'lib/code_sym.rb') -@@ -179,7 +179,7 @@ def test_build - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -218,7 +218,7 @@ def test_build_auto_signed - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -261,7 +261,7 @@ def test_build_auto_signed_encrypted_key - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -311,7 +311,7 @@ def test_build_signed - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -348,7 +348,7 @@ def test_build_signed_encrypted_key - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -408,7 +408,7 @@ def test_extract_files_empty - end - end - -- open 'empty.gem', 'wb' do |io| -+ File.open 'empty.gem', 'wb' do |io| - io.write gem.string - end - -@@ -455,6 +455,31 @@ def test_extract_tar_gz_symlink_relative_path - File.read(extracted) - end - -+ def test_extract_symlink_parent -+ skip 'symlink not supported' if Gem.win_platform? -+ -+ package = Gem::Package.new @gem -+ -+ tgz_io = util_tar_gz do |tar| -+ tar.mkdir 'lib', 0755 -+ tar.add_symlink 'lib/link', '../..', 0644 -+ tar.add_file 'lib/link/outside.txt', 0644 do |io| io.write 'hi' end -+ end -+ -+ # Extract into a subdirectory of @destination; if this test fails it writes -+ # a file outside destination_subdir, but we want the file to remain inside -+ # @destination so it will be cleaned up. -+ destination_subdir = File.join @destination, 'subdir' -+ FileUtils.mkdir_p destination_subdir -+ -+ e = assert_raises Gem::Package::PathError do -+ package.extract_tar_gz tgz_io, destination_subdir -+ end -+ -+ assert_equal("installing into parent path lib/link/outside.txt of " + -+ "#{destination_subdir} is not allowed", e.message) -+ end -+ - def test_extract_tar_gz_directory - package = Gem::Package.new @gem - -@@ -566,6 +591,21 @@ def test_install_location_relative - "#{@destination} is not allowed", e.message) - end - -+ def test_install_location_suffix -+ package = Gem::Package.new @gem -+ -+ filename = "../#{File.basename(@destination)}suffix.rb" -+ -+ e = assert_raises Gem::Package::PathError do -+ package.install_location filename, @destination -+ end -+ -+ parent = File.expand_path File.join @destination, filename -+ -+ assert_equal("installing into parent path #{parent} of " + -+ "#{@destination} is not allowed", e.message) -+ end -+ - def test_load_spec - entry = StringIO.new Gem.gzip @spec.to_yaml - def entry.full_name() 'metadata.gz' end -@@ -620,7 +660,7 @@ def test_verify_checksum_bad - end - end - -- open 'mismatch.gem', 'wb' do |io| -+ File.open 'mismatch.gem', 'wb' do |io| - io.write gem.string - end - -@@ -670,7 +710,7 @@ def test_verify_checksum_missing - end - end - -- open 'data_checksum_missing.gem', 'wb' do |io| -+ File.open 'data_checksum_missing.gem', 'wb' do |io| - io.write gem.string - end - -@@ -723,6 +763,32 @@ def test_verify_nonexistent - assert_match %r%nonexistent.gem$%, e.message - end - -+ def test_verify_duplicate_file -+ FileUtils.mkdir_p 'lib' -+ FileUtils.touch 'lib/code.rb' -+ -+ build = Gem::Package.new @gem -+ build.spec = @spec -+ build.setup_signer -+ open @gem, 'wb' do |gem_io| -+ Gem::Package::TarWriter.new gem_io do |gem| -+ build.add_metadata gem -+ build.add_contents gem -+ -+ gem.add_file_simple 'a.sig', 0444, 0 -+ gem.add_file_simple 'a.sig', 0444, 0 -+ end -+ end -+ -+ package = Gem::Package.new @gem -+ -+ e = assert_raises Gem::Security::Exception do -+ package.verify -+ end -+ -+ assert_equal 'duplicate files in the package: ("a.sig")', e.message -+ end -+ - def test_verify_security_policy - skip 'openssl is missing' unless defined?(OpenSSL::SSL) - -@@ -773,14 +839,20 @@ def test_verify_security_policy_checksum_missing - FileUtils.mkdir 'lib' - FileUtils.touch 'lib/code.rb' - -- open @gem, 'wb' do |gem_io| -+ File.open @gem, 'wb' do |gem_io| - Gem::Package::TarWriter.new gem_io do |gem| - build.add_metadata gem - build.add_contents gem - - # write bogus data.tar.gz to foil signature - bogus_data = Gem.gzip 'hello' -- gem.add_file_simple 'data.tar.gz', 0444, bogus_data.length do |io| -+ fake_signer = Class.new do -+ def digest_name; 'SHA512'; end -+ def digest_algorithm; Digest(:SHA512); end -+ def key; 'key'; end -+ def sign(*); 'fake_sig'; end -+ end -+ gem.add_file_signed 'data2.tar.gz', 0444, fake_signer.new do |io| - io.write bogus_data - end - -@@ -804,7 +876,7 @@ def test_verify_security_policy_checksum_missing - end - - def test_verify_truncate -- open 'bad.gem', 'wb' do |io| -+ File.open 'bad.gem', 'wb' do |io| - io.write File.read(@gem, 1024) # don't care about newlines - end - -diff --git test/rubygems/test_gem_package_old.rb test/rubygems/test_gem_package_old.rb -index c15475b0c7..604981b3c1 100644 ---- test/rubygems/test_gem_package_old.rb -+++ test/rubygems/test_gem_package_old.rb -@@ -7,7 +7,7 @@ class TestGemPackageOld < Gem::TestCase - def setup - super - -- open 'old_format.gem', 'wb' do |io| -+ File.open 'old_format.gem', 'wb' do |io| - io.write SIMPLE_GEM - end - -diff --git test/rubygems/test_gem_package_tar_header.rb test/rubygems/test_gem_package_tar_header.rb -index d33877057d..43f508df45 100644 ---- test/rubygems/test_gem_package_tar_header.rb -+++ test/rubygems/test_gem_package_tar_header.rb -@@ -143,5 +143,26 @@ def test_update_checksum - assert_equal '012467', @tar_header.checksum - end - -+ def test_from_bad_octal -+ test_cases = [ -+ "00000006,44\000", # bogus character -+ "00000006789\000", # non-octal digit -+ "+0000001234\000", # positive sign -+ "-0000001000\000", # negative sign -+ "0x000123abc\000", # radix prefix -+ ] -+ -+ test_cases.each do |val| -+ header_s = @tar_header.to_s -+ # overwrite the size field -+ header_s[124, 12] = val -+ io = TempIO.new header_s -+ assert_raises ArgumentError do -+ new_header = Gem::Package::TarHeader.from io -+ end -+ io.close! if io.respond_to? :close! -+ end -+ end -+ - end - -diff --git test/rubygems/test_gem_rdoc.rb test/rubygems/test_gem_rdoc.rb -index 76ca8c45a9..0355883cb3 100644 ---- test/rubygems/test_gem_rdoc.rb -+++ test/rubygems/test_gem_rdoc.rb -@@ -223,6 +223,7 @@ def test_remove - - def test_remove_unwritable - skip 'chmod not supported' if Gem.win_platform? -+ skip 'skipped in root privilege' if Process.uid.zero? - FileUtils.mkdir_p @a.base_dir - FileUtils.chmod 0, @a.base_dir - -@@ -251,6 +252,7 @@ def test_setup - - def test_setup_unwritable - skip 'chmod not supported' if Gem.win_platform? -+ skip 'skipped in root privilege' if Process.uid.zero? - FileUtils.mkdir_p @a.doc_dir - FileUtils.chmod 0, @a.doc_dir - -diff --git test/rubygems/test_gem_remote_fetcher.rb test/rubygems/test_gem_remote_fetcher.rb -index ee5ac77717..20e34e84e1 100644 ---- test/rubygems/test_gem_remote_fetcher.rb -+++ test/rubygems/test_gem_remote_fetcher.rb -@@ -431,7 +431,7 @@ def test_download_install_dir - assert File.exist?(a1_cache_gem) - end - -- unless win_platform? # File.chmod doesn't work -+ unless win_platform? || Process.uid.zero? # File.chmod doesn't work - def test_download_local_read_only - FileUtils.mv @a1_gem, @tempdir - local_path = File.join @tempdir, @a1.file_name -diff --git test/rubygems/test_gem_request_set.rb test/rubygems/test_gem_request_set.rb -index 3a48827481..5dc6c1518d 100644 ---- test/rubygems/test_gem_request_set.rb -+++ test/rubygems/test_gem_request_set.rb -@@ -52,7 +52,7 @@ def test_install_from_gemdeps - rs = Gem::RequestSet.new - installed = [] - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "a"' - io.flush - -@@ -78,7 +78,7 @@ def test_install_from_gemdeps_explain - - rs = Gem::RequestSet.new - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "a"' - io.flush - -@@ -104,7 +104,7 @@ def test_install_from_gemdeps_install_dir - rs = Gem::RequestSet.new - installed = [] - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "a"' - end - -@@ -128,7 +128,7 @@ def test_install_from_gemdeps_local - - rs = Gem::RequestSet.new - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "a"' - io.flush - -@@ -150,7 +150,7 @@ def test_install_from_gemdeps_lockfile - rs = Gem::RequestSet.new - installed = [] - -- open 'gem.deps.rb.lock', 'w' do |io| -+ File.open 'gem.deps.rb.lock', 'w' do |io| - io.puts <<-LOCKFILE - GEM - remote: #{@gem_repo} -@@ -167,7 +167,7 @@ def test_install_from_gemdeps_lockfile - LOCKFILE - end - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "b"' - end - -@@ -190,7 +190,7 @@ def test_install_from_gemdeps_version_mismatch - rs = Gem::RequestSet.new - installed = [] - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts <<-GEM_DEPS - gem "a" - ruby "0" -diff --git test/rubygems/test_gem_request_set_lockfile.rb test/rubygems/test_gem_request_set_lockfile.rb -index 908f97303e..7460b7efad 100644 ---- test/rubygems/test_gem_request_set_lockfile.rb -+++ test/rubygems/test_gem_request_set_lockfile.rb -@@ -31,7 +31,7 @@ def lockfile - def write_lockfile lockfile - @lock_file = File.expand_path "#{@gem_deps_file}.lock" - -- open @lock_file, 'w' do |io| -+ File.open @lock_file, 'w' do |io| - io.write lockfile - end - end -@@ -387,7 +387,7 @@ def test_to_s_git - s.add_dependency 'c', '~> 1.0' - end - -- open 'b.gemspec', 'w' do |io| -+ File.open 'b.gemspec', 'w' do |io| - io.write b.to_ruby - end - -@@ -400,7 +400,7 @@ def test_to_s_git - Dir.chdir 'c' do - c = Gem::Specification.new 'c', 1 - -- open 'c.gemspec', 'w' do |io| -+ File.open 'c.gemspec', 'w' do |io| - io.write c.to_ruby - end - -@@ -455,7 +455,7 @@ def test_write_error - - gem_deps_lock_file = "#{@gem_deps_file}.lock" - -- open gem_deps_lock_file, 'w' do |io| -+ File.open gem_deps_lock_file, 'w' do |io| - io.write 'hello' - end - -diff --git test/rubygems/test_gem_request_set_lockfile_parser.rb test/rubygems/test_gem_request_set_lockfile_parser.rb -index 9946c522d9..f3517da43a 100644 ---- test/rubygems/test_gem_request_set_lockfile_parser.rb -+++ test/rubygems/test_gem_request_set_lockfile_parser.rb -@@ -536,7 +536,7 @@ def test_parse_missing - end - - def write_lockfile lockfile -- open @lock_file, 'w' do |io| -+ File.open @lock_file, 'w' do |io| - io.write lockfile - end - end -diff --git test/rubygems/test_gem_request_set_lockfile_tokenizer.rb test/rubygems/test_gem_request_set_lockfile_tokenizer.rb -index ab506a14e6..f4aba6d94a 100644 ---- test/rubygems/test_gem_request_set_lockfile_tokenizer.rb -+++ test/rubygems/test_gem_request_set_lockfile_tokenizer.rb -@@ -295,7 +295,7 @@ def test_unget - end - - def write_lockfile lockfile -- open @lock_file, 'w' do |io| -+ File.open @lock_file, 'w' do |io| - io.write lockfile - end - end -diff --git test/rubygems/test_gem_resolver_git_specification.rb test/rubygems/test_gem_resolver_git_specification.rb -index 9e8e2c5715..211757eb20 100644 ---- test/rubygems/test_gem_resolver_git_specification.rb -+++ test/rubygems/test_gem_resolver_git_specification.rb -@@ -70,7 +70,7 @@ def test_install_extension - Dir.chdir 'git/a' do - FileUtils.mkdir_p 'ext/lib' - -- open 'ext/extconf.rb', 'w' do |io| -+ File.open 'ext/extconf.rb', 'w' do |io| - io.puts 'require "mkmf"' - io.puts 'create_makefile "a"' - end -diff --git test/rubygems/test_gem_server.rb test/rubygems/test_gem_server.rb -index 6fe02e480f..a018e65512 100644 ---- test/rubygems/test_gem_server.rb -+++ test/rubygems/test_gem_server.rb -@@ -100,7 +100,7 @@ def test_latest_specs_gemdirs - specs_dir = File.join dir, 'specifications' - FileUtils.mkdir_p specs_dir - -- open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| - io.write spec.to_ruby - end - -@@ -198,7 +198,7 @@ def test_quick_gemdirs - - FileUtils.mkdir_p specs_dir - -- open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| - io.write spec.to_ruby - end - -@@ -339,7 +339,7 @@ def test_root_gemdirs - specs_dir = File.join dir, 'specifications' - FileUtils.mkdir_p specs_dir - -- open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| - io.write spec.to_ruby - end - -@@ -353,6 +353,171 @@ def test_root_gemdirs - assert_match 'z 9', @res.body - end - -+ -+ def test_xss_homepage_fix_289313 -+ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" -+ dir = "#{@gemhome}2" -+ -+ spec = util_spec 'xsshomepagegem', 1 -+ spec.homepage = "javascript:confirm(document.domain)" -+ -+ specs_dir = File.join dir, 'specifications' -+ FileUtils.mkdir_p specs_dir -+ -+ open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ io.write spec.to_ruby -+ end -+ -+ server = Gem::Server.new dir, process_based_port, false -+ -+ @req.parse data -+ -+ server.root @req, @res -+ -+ assert_equal 200, @res.status -+ assert_match 'xsshomepagegem 1', @res.body -+ -+ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a -+ # valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here, -+ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be -+ # validated in future versions of Gem::Specification. -+ # -+ # There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex: -+ # -+ # Variant #1 - rdoc not installed -+ # -+ # xsshomepagegem 1 -+ # -+ # -+ # [rdoc] -+ # -+ # -+ # -+ # [www] -+ # -+ # Variant #2 - rdoc installed -+ # -+ # xsshomepagegem 1 -+ # -+ # -+ # \[rdoc\]<\/a> -+ # -+ # -+ # -+ # [www] -+ regex_match = /xsshomepagegem 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ -+ assert_match regex_match, @res.body -+ end -+ -+ def test_invalid_homepage -+ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" -+ dir = "#{@gemhome}2" -+ -+ spec = util_spec 'invalidhomepagegem', 1 -+ spec.homepage = "notavalidhomepageurl" -+ -+ specs_dir = File.join dir, 'specifications' -+ FileUtils.mkdir_p specs_dir -+ -+ open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ io.write spec.to_ruby -+ end -+ -+ server = Gem::Server.new dir, process_based_port, false -+ -+ @req.parse data -+ -+ server.root @req, @res -+ -+ assert_equal 200, @res.status -+ assert_match 'invalidhomepagegem 1', @res.body -+ -+ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a -+ # valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here, -+ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be -+ # validated in future versions of Gem::Specification. -+ # -+ # There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex: -+ # -+ # Variant #1 - rdoc not installed -+ # -+ # invalidhomepagegem 1 -+ # -+ # -+ # [rdoc] -+ # -+ # -+ # -+ # [www] -+ # -+ # Variant #2 - rdoc installed -+ # -+ # invalidhomepagegem 1 -+ # -+ # -+ # \[rdoc\]<\/a> -+ # -+ # -+ # -+ # [www] -+ regex_match = /invalidhomepagegem 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ -+ assert_match regex_match, @res.body -+ end -+ -+ def test_valid_homepage_http -+ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" -+ dir = "#{@gemhome}2" -+ -+ spec = util_spec 'validhomepagegemhttp', 1 -+ spec.homepage = "http://rubygems.org" -+ -+ specs_dir = File.join dir, 'specifications' -+ FileUtils.mkdir_p specs_dir -+ -+ open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ io.write spec.to_ruby -+ end -+ -+ server = Gem::Server.new dir, process_based_port, false -+ -+ @req.parse data -+ -+ server.root @req, @res -+ -+ assert_equal 200, @res.status -+ assert_match 'validhomepagegemhttp 1', @res.body -+ -+ regex_match = /validhomepagegemhttp 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ -+ assert_match regex_match, @res.body -+ end -+ -+ def test_valid_homepage_https -+ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" -+ dir = "#{@gemhome}2" -+ -+ spec = util_spec 'validhomepagegemhttps', 1 -+ spec.homepage = "https://rubygems.org" -+ -+ specs_dir = File.join dir, 'specifications' -+ FileUtils.mkdir_p specs_dir -+ -+ open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ io.write spec.to_ruby -+ end -+ -+ server = Gem::Server.new dir, process_based_port, false -+ -+ @req.parse data -+ -+ server.root @req, @res -+ -+ assert_equal 200, @res.status -+ assert_match 'validhomepagegemhttps 1', @res.body -+ -+ regex_match = /validhomepagegemhttps 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ -+ assert_match regex_match, @res.body -+ end -+ - def test_specs - data = StringIO.new "GET /specs.#{Gem.marshal_version} HTTP/1.0\r\n\r\n" - @req.parse data -@@ -378,7 +543,7 @@ def test_specs_gemdirs - specs_dir = File.join dir, 'specifications' - FileUtils.mkdir_p specs_dir - -- open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| - io.write spec.to_ruby - end - -diff --git test/rubygems/test_gem_source.rb test/rubygems/test_gem_source.rb -index 4a93e222f8..8805a9b404 100644 ---- test/rubygems/test_gem_source.rb -+++ test/rubygems/test_gem_source.rb -@@ -110,7 +110,7 @@ def test_fetch_spec_cached - - cache_file = File.join cache_dir, a1.spec_name - -- open cache_file, 'wb' do |io| -+ File.open cache_file, 'wb' do |io| - Marshal.dump a1, io - end - -@@ -163,7 +163,7 @@ def test_load_specs_cached - - cache_file = File.join cache_dir, "latest_specs.#{Gem.marshal_version}" - -- open cache_file, 'wb' do |io| -+ File.open cache_file, 'wb' do |io| - Marshal.dump latest_specs, io - end - -@@ -187,7 +187,7 @@ def test_load_specs_cached_empty - - cache_file = File.join cache_dir, "latest_specs.#{Gem.marshal_version}" - -- open cache_file, 'wb' do |io| -+ File.open cache_file, 'wb' do |io| - # Setup invalid data in the cache: - io.write Marshal.dump(latest_specs)[0, 10] - end -diff --git test/rubygems/test_gem_source_git.rb test/rubygems/test_gem_source_git.rb -index 0e13a11e7e..8f5d3ee745 100644 ---- test/rubygems/test_gem_source_git.rb -+++ test/rubygems/test_gem_source_git.rb -@@ -229,7 +229,7 @@ def test_specs - Dir.chdir 'b' do - b = Gem::Specification.new 'b', 1 - -- open 'b.gemspec', 'w' do |io| -+ File.open 'b.gemspec', 'w' do |io| - io.write b.to_ruby - end - -diff --git test/rubygems/test_gem_specification.rb test/rubygems/test_gem_specification.rb -index bb6acbc7de..badb297eee 100644 ---- test/rubygems/test_gem_specification.rb -+++ test/rubygems/test_gem_specification.rb -@@ -922,7 +922,7 @@ def test_self_load - end - - def test_self_load_relative -- open 'a-2.gemspec', 'w' do |io| -+ File.open 'a-2.gemspec', 'w' do |io| - io.write @a2.to_ruby_for_cache - end - -@@ -948,6 +948,9 @@ def test_self_load_tainted - @a2.files.clear - - assert_equal @a2, spec -+ -+ ensure -+ $SAFE = 0 - end - - def test_self_load_escape_curly -@@ -1111,7 +1114,7 @@ def test_self_remove_spec - end - - def test_self_remove_spec_removed -- open @a1.spec_file, 'w' do |io| -+ File.open @a1.spec_file, 'w' do |io| - io.write @a1.to_ruby - end - -@@ -1363,13 +1366,13 @@ def test_build_args - - assert_empty @ext.build_args - -- open @ext.build_info_file, 'w' do |io| -+ File.open @ext.build_info_file, 'w' do |io| - io.puts - end - - assert_empty @ext.build_args - -- open @ext.build_info_file, 'w' do |io| -+ File.open @ext.build_info_file, 'w' do |io| - io.puts '--with-foo-dir=wherever' - end - -@@ -1385,9 +1388,9 @@ def test_build_extensions - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -1435,9 +1438,9 @@ def test_build_extensions_default_gem - extconf_rb = File.join spec.gem_dir, spec.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" - end -@@ -1461,6 +1464,7 @@ def test_build_extensions_error - - def test_build_extensions_extensions_dir_unwritable - skip 'chmod not supported' if Gem.win_platform? -+ skip 'skipped in root privilege' if Process.uid.zero? - - ext_spec - -@@ -1469,9 +1473,9 @@ def test_build_extensions_extensions_dir_unwritable - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -1486,7 +1490,7 @@ def test_build_extensions_extensions_dir_unwritable - @ext.build_extensions - refute_path_exists @ext.extension_dir - ensure -- unless ($DEBUG or win_platform?) then -+ unless ($DEBUG or win_platform? or Process.uid.zero?) then - FileUtils.chmod 0755, File.join(@ext.base_dir, 'extensions') - FileUtils.chmod 0755, @ext.base_dir - end -@@ -1502,9 +1506,9 @@ def test_build_extensions_no_extensions_dir_unwritable - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -1551,9 +1555,9 @@ def test_build_extensions_preview - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -2882,7 +2886,22 @@ def test_validate_homepage - @a1.validate - end - -- assert_equal '"over at my cool site" is not a URI', e.message -+ assert_equal '"over at my cool site" is not a valid HTTP URI', e.message -+ -+ @a1.homepage = 'ftp://rubygems.org' -+ -+ e = assert_raises Gem::InvalidSpecificationException do -+ @a1.validate -+ end -+ -+ assert_equal '"ftp://rubygems.org" is not a valid HTTP URI', e.message -+ -+ @a1.homepage = 'http://rubygems.org' -+ assert_equal true, @a1.validate -+ -+ @a1.homepage = 'https://rubygems.org' -+ assert_equal true, @a1.validate -+ - end - end - -@@ -3418,9 +3437,9 @@ def test_missing_extensions_eh - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -diff --git test/rubygems/test_gem_stub_specification.rb test/rubygems/test_gem_stub_specification.rb -index 43680265c7..f9a3a236c0 100644 ---- test/rubygems/test_gem_stub_specification.rb -+++ test/rubygems/test_gem_stub_specification.rb -@@ -127,9 +127,9 @@ def test_missing_extensions_eh - extconf_rb = File.join s.gem_dir, s.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -149,7 +149,7 @@ def test_missing_extensions_eh_default_gem - spec = new_default_spec 'default', 1 - spec.extensions << 'extconf.rb' - -- open spec.loaded_from, 'w' do |io| -+ File.open spec.loaded_from, 'w' do |io| - io.write spec.to_ruby_for_cache - end - -@@ -198,7 +198,7 @@ def test_to_spec_missing_extensions - - def stub_with_version - spec = File.join @gemhome, 'specifications', 'stub_e-2.gemspec' -- open spec, 'w' do |io| -+ File.open spec, 'w' do |io| - io.write <<-STUB - # -*- encoding: utf-8 -*- - # stub: stub_v 2 ruby lib -@@ -221,7 +221,7 @@ def stub_with_version - - def stub_without_version - spec = File.join @gemhome, 'specifications', 'stub-2.gemspec' -- open spec, 'w' do |io| -+ File.open spec, 'w' do |io| - io.write <<-STUB - # -*- encoding: utf-8 -*- - # stub: stub_v ruby lib -@@ -245,7 +245,7 @@ def stub_without_version - - def stub_with_extension - spec = File.join @gemhome, 'specifications', 'stub_e-2.gemspec' -- open spec, 'w' do |io| -+ File.open spec, 'w' do |io| - io.write <<-STUB - # -*- encoding: utf-8 -*- - # stub: stub_e 2 ruby lib -@@ -271,7 +271,7 @@ def stub_with_extension - - def stub_without_extension - spec = File.join @gemhome, 'specifications', 'stub-2.gemspec' -- open spec, 'w' do |io| -+ File.open spec, 'w' do |io| - io.write <<-STUB - # -*- encoding: utf-8 -*- - # stub: stub 2 ruby lib -diff --git test/rubygems/test_gem_util.rb test/rubygems/test_gem_util.rb -index b85db44d51..3b7887d931 100644 ---- test/rubygems/test_gem_util.rb -+++ test/rubygems/test_gem_util.rb -@@ -5,6 +5,7 @@ - class TestGemUtil < Gem::TestCase - - def test_class_popen -+ skip "MJIT executes process and it's caught by Process.wait(-1)" if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? - assert_equal "0\n", Gem::Util.popen(Gem.ruby, '-e', 'p 0') - - assert_raises Errno::ECHILD do -@@ -29,6 +30,30 @@ def test_traverse_parents - loop { break if enum.next.nil? } # exhaust the enumerator - end - -+ def test_traverse_parents_does_not_crash_on_permissions_error -+ skip 'skipped on MS Windows (chmod has no effect)' if win_platform? -+ -+ FileUtils.mkdir_p 'd/e/f' -+ # remove 'execute' permission from "e" directory and make it -+ # impossible to cd into it and its children -+ FileUtils.chmod(0666, 'd/e') -+ -+ paths = Gem::Util.traverse_parents('d/e/f').to_a -+ -+ assert_equal File.join(@tempdir, 'd'), paths[0] -+ assert_equal @tempdir, paths[1] -+ if File.respond_to?(:realpath) -+ assert_equal File.realpath(Dir.tmpdir), paths[2] -+ assert_equal File.realpath("..", Dir.tmpdir), paths[3] -+ elsif RUBY_PLATFORM !~ /darwin/ -+ assert_equal Dir.tmpdir, paths[2] -+ assert_equal '/', paths[3] -+ end -+ ensure -+ # restore default permissions, allow the directory to be removed -+ FileUtils.chmod(0775, 'd/e') unless win_platform? -+ end -+ - def test_linked_list_find - list = [1,2,3,4,5].inject(Gem::List.new(0)) { |m,o| - Gem::List.new o, m -diff --git test/rubygems/test_gem_version.rb test/rubygems/test_gem_version.rb -index 56c818663e..792ad5f084 100644 ---- test/rubygems/test_gem_version.rb -+++ test/rubygems/test_gem_version.rb -@@ -2,6 +2,8 @@ - require 'rubygems/test_case' - require "rubygems/version" - -+require "minitest/benchmark" -+ - class TestGemVersion < Gem::TestCase - - class V < ::Gem::Version -@@ -102,6 +104,15 @@ def test_initialize_invalid - end - end - -+ def bench_anchored_version_pattern -+ assert_performance_linear 0.5 do |count| -+ version_string = count.times.map {|i| "0" * i.succ }.join(".") << "." -+ version_string =~ Gem::Version::ANCHORED_VERSION_PATTERN -+ end -+ rescue RegexpError -+ skip "It fails to allocate the memory for regex pattern of Gem::Version::ANCHORED_VERSION_PATTERN" -+ end -+ - def test_empty_version - ["", " ", " "].each do |empty| - assert_equal "0", Gem::Version.new(empty).version -diff --git test/rubygems/test_require.rb test/rubygems/test_require.rb -index a846f46833..e292ce226d 100644 ---- test/rubygems/test_require.rb -+++ test/rubygems/test_require.rb -@@ -38,18 +38,6 @@ def assert_require(path) - assert require(path), "'#{path}' was already required" - end - -- def append_latch spec -- dir = spec.gem_dir -- Dir.chdir dir do -- spec.files.each do |file| -- File.open file, 'a' do |fp| -- fp.puts "FILE_ENTERED_LATCH.release" -- fp.puts "FILE_EXIT_LATCH.await" -- end -- end -- end -- end -- - # Providing -I on the commandline should always beat gems - def test_dash_i_beats_gems - a1 = new_spec "a", "1", {"b" => "= 1"}, "lib/test_gem_require_a.rb" -@@ -80,6 +68,17 @@ def test_dash_i_beats_gems - Object.send :remove_const, :HELLO if Object.const_defined? :HELLO - end - -+ def create_sync_thread -+ Thread.new do -+ begin -+ yield -+ ensure -+ FILE_ENTERED_LATCH.release -+ FILE_EXIT_LATCH.await -+ end -+ end -+ end -+ - def test_concurrent_require - skip 'deadlock' if /^1\.8\./ =~ RUBY_VERSION - -@@ -91,11 +90,8 @@ def test_concurrent_require - - install_specs a1, b1 - -- append_latch a1 -- append_latch b1 -- -- t1 = Thread.new { assert_require 'a' } -- t2 = Thread.new { assert_require 'b' } -+ t1 = create_sync_thread{ assert_require 'a' } -+ t2 = create_sync_thread{ assert_require 'b' } - - # wait until both files are waiting on the exit latch - FILE_ENTERED_LATCH.await -@@ -106,10 +102,8 @@ def test_concurrent_require - assert t1.join, "thread 1 should exit" - assert t2.join, "thread 2 should exit" - ensure -- return if $! # skipping -- -- Object.send :remove_const, :FILE_ENTERED_LATCH -- Object.send :remove_const, :FILE_EXIT_LATCH -+ Object.send :remove_const, :FILE_ENTERED_LATCH if Object.const_defined? :FILE_ENTERED_LATCH -+ Object.send :remove_const, :FILE_EXIT_LATCH if Object.const_defined? :FILE_EXIT_LATCH - end - - def test_require_is_not_lazy_with_exact_req diff --git a/sources b/sources index a289e4c..7ef486c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruby-2.5.0.tar.xz) = 55714a33d7661fe8b432f73c34fd67b49699f8b79df1cbd680a74899124d31111ab0f444677672aac1ba725820182940d485efb2db0bf2bc96737c5d40c54578 +SHA512 (ruby-2.5.1.tar.xz) = 31bacf58469953282cd5d8b51862dcf4b84dedb927c1871bc3fca32fc157fe49187631575a70838705fe246f4555647577a7ecc26894445a7d64de5503dc11b4 From f571c557e21b5573dff83a279088b624f1095748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 10 Apr 2018 09:07:02 +0200 Subject: [PATCH 520/529] Conflict requirement needs to generate dependency. If there is only conflict requirement, this still menas that there is dependency on that package and appropriate requirement must be generated (rhbz#1561487) --- ruby.spec | 3 +++ rubygems.req | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index c86034c..70598d2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1073,6 +1073,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Tue Apr 10 2018 V鱈t Ondruch - 2.5.1-92 +- Conflict requirement needs to generate dependency. + * Thu Mar 29 2018 Pavel Valena - 2.5.1-92 - Update to Ruby 2.5.1. diff --git a/rubygems.req b/rubygems.req index 6868bdd..d75247d 100644 --- a/rubygems.req +++ b/rubygems.req @@ -11,7 +11,13 @@ module RubyGemsReq when '~>' expand_pessimistic_requirement(r) when '!=' - [] + # If there is only the conflict requirement, we still need to depend + # on the specified gem. + if requirements.size == 1 + Gem::Requirement.default.requirements + else + [] + end else [r] end From ecbc53b331bd1e2cec6f51a36f4be869a2720630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 10 Apr 2018 09:09:46 +0200 Subject: [PATCH 521/529] Revert "Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239)" This reverts commit a3207ebb169bacb722745448c114f015d63cd25c. This should not be needed, since changes in GCC were reverted. --- ruby.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 70598d2..fb10f6e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -560,9 +560,6 @@ autoconf --with-ruby-version='' \ --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ -%ifarch aarch64 - --with-setjmp-type=setjmp \ -%endif # Q= makes the build output more verbose and allows to check Fedora # compiler options. @@ -1075,6 +1072,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Tue Apr 10 2018 V鱈t Ondruch - 2.5.1-92 - Conflict requirement needs to generate dependency. +- Stop using --with-setjmp-type=setjmp on aarch64 (rhbz#1545239). * Thu Mar 29 2018 Pavel Valena - 2.5.1-92 - Update to Ruby 2.5.1. From d649e8e83af9e3dfd0bb19273be2f5bd82fd3d0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 6 Mar 2018 10:46:34 +0100 Subject: [PATCH 522/529] Disable additional SIGSEV handler test. --- ruby.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 03d7f49..3c6aea5 100644 --- a/ruby.spec +++ b/ruby.spec @@ -757,7 +757,7 @@ DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb" # SIGSEV handler does not provide correct output on AArch64. # https://bugs.ruby-lang.org/issues/13758 %ifarch aarch64 -DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\)/" +DISABLE_TESTS="$DISABLE_TESTS -n !/test_segv_\(setproctitle\|test\|loaded_features\)/" %endif # Disable failing TestResolvMDNS#test_mdns_each_address test, From 7bbdc3fdb9b98d2b5b7006a50c8e0bfc73c39ccb Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Thu, 29 Mar 2018 15:25:06 +0200 Subject: [PATCH 523/529] Update to Ruby 2.5.1. --- ...-additional-preludes-by-configuratio.patch | 2 +- ...0-Enable-configuration-of-archlibdir.patch | 2 +- ...ed-paths-when-empty-version-string-i.patch | 2 +- ruby-2.1.0-always-use-i386.patch | 2 +- ruby-2.1.0-custom-rubygems-location.patch | 4 +- ruby-2.3.0-ruby_version.patch | 6 +- ruby-2.5.0-Disable-Tokyo-TZ-tests.patch | 30 - ruby-2.5.0-parse.y-assignable_error.patch | 80 - ...5.0-st.c-retry-operations-if-rebuilt.patch | 602 ----- ...-test-failures-Kiritimati-and-Lisbon.patch | 115 + ruby.spec | 30 +- rubygems-2.5.0-multiple-vulnerabilities.patch | 2349 ----------------- sources | 2 +- 13 files changed, 133 insertions(+), 3093 deletions(-) delete mode 100644 ruby-2.5.0-Disable-Tokyo-TZ-tests.patch delete mode 100644 ruby-2.5.0-parse.y-assignable_error.patch delete mode 100644 ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch create mode 100644 ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch delete mode 100644 rubygems-2.5.0-multiple-vulnerabilities.patch diff --git a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch index 66cb565..47bf9bc 100644 --- a/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch +++ b/ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch @@ -39,7 +39,7 @@ diff --git a/configure.ac b/configure.ac index 028ef7ca3e..cdeff87871 100644 --- a/configure.ac +++ b/configure.ac -@@ -4395,6 +4395,13 @@ AC_SUBST(rubyarchhdrdir)dnl +@@ -4396,6 +4396,13 @@ AC_SUBST(rubyarchhdrdir)dnl AC_SUBST(sitearchhdrdir)dnl AC_SUBST(vendorarchhdrdir)dnl diff --git a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch index 41444c5..36ec460 100644 --- a/ruby-2.1.0-Enable-configuration-of-archlibdir.patch +++ b/ruby-2.1.0-Enable-configuration-of-archlibdir.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index 11fc237552..b77e88fc37 100644 --- a/configure.ac +++ b/configure.ac -@@ -3640,6 +3640,11 @@ AS_IF([test ${multiarch+set}], [ +@@ -3641,6 +3641,11 @@ AS_IF([test ${multiarch+set}], [ ]) archlibdir='${libdir}/${arch}' diff --git a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch index bdc074d..d0cffab 100644 --- a/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch +++ b/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch @@ -14,7 +14,7 @@ diff --git a/configure.ac b/configure.ac index 999e2d6d5d..11fc237552 100644 --- a/configure.ac +++ b/configure.ac -@@ -4250,7 +4250,8 @@ AS_CASE(["$ruby_version_dir_name"], +@@ -4251,7 +4251,8 @@ AS_CASE(["$ruby_version_dir_name"], ruby_version_dir=/'${ruby_version_dir_name}' if test -z "${ruby_version_dir_name}"; then diff --git a/ruby-2.1.0-always-use-i386.patch b/ruby-2.1.0-always-use-i386.patch index 4864741..555ad45 100644 --- a/ruby-2.1.0-always-use-i386.patch +++ b/ruby-2.1.0-always-use-i386.patch @@ -11,7 +11,7 @@ diff --git a/configure.ac b/configure.ac index b77e88fc37..6bba453e3c 100644 --- a/configure.ac +++ b/configure.ac -@@ -4314,6 +4314,8 @@ AC_SUBST(vendorarchdir)dnl +@@ -4315,6 +4315,8 @@ AC_SUBST(vendorarchdir)dnl AC_SUBST(CONFIGURE, "`echo $0 | sed 's|.*/||'`")dnl AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl diff --git a/ruby-2.1.0-custom-rubygems-location.patch b/ruby-2.1.0-custom-rubygems-location.patch index cc55c4a..cc45741 100644 --- a/ruby-2.1.0-custom-rubygems-location.patch +++ b/ruby-2.1.0-custom-rubygems-location.patch @@ -15,7 +15,7 @@ diff --git a/configure.ac b/configure.ac index 6bba453e3c..028ef7ca3e 100644 --- a/configure.ac +++ b/configure.ac -@@ -4286,6 +4286,10 @@ AC_ARG_WITH(vendorarchdir, +@@ -4287,6 +4287,10 @@ AC_ARG_WITH(vendorarchdir, [vendorarchdir=$withval], [vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby'${ruby_version_dir}}${multiarch-'${vendorlibdir}/${sitearch}'}]) @@ -26,7 +26,7 @@ index 6bba453e3c..028ef7ca3e 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_EXEC_PREFIX='' -@@ -4310,6 +4314,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4311,6 +4315,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl diff --git a/ruby-2.3.0-ruby_version.patch b/ruby-2.3.0-ruby_version.patch index 5e24003..8f57319 100644 --- a/ruby-2.3.0-ruby_version.patch +++ b/ruby-2.3.0-ruby_version.patch @@ -20,7 +20,7 @@ diff --git a/configure.ac b/configure.ac index 8ea969412f..a00f2b6776 100644 --- a/configure.ac +++ b/configure.ac -@@ -4201,9 +4201,6 @@ AS_CASE(["$target_os"], +@@ -4202,9 +4202,6 @@ AS_CASE(["$target_os"], rubyw_install_name='$(RUBYW_INSTALL_NAME)' ]) @@ -30,7 +30,7 @@ index 8ea969412f..a00f2b6776 100644 rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'} AC_ARG_WITH(rubyarchprefix, AS_HELP_STRING([--with-rubyarchprefix=DIR], -@@ -4226,56 +4223,62 @@ AC_ARG_WITH(ridir, +@@ -4227,56 +4224,62 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -120,7 +120,7 @@ index 8ea969412f..a00f2b6776 100644 AS_IF([test "${LOAD_RELATIVE+set}"], [ AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) -@@ -4292,6 +4295,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4293,6 +4296,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl diff --git a/ruby-2.5.0-Disable-Tokyo-TZ-tests.patch b/ruby-2.5.0-Disable-Tokyo-TZ-tests.patch deleted file mode 100644 index 01632eb..0000000 --- a/ruby-2.5.0-Disable-Tokyo-TZ-tests.patch +++ /dev/null @@ -1,30 +0,0 @@ -diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb -index 20a57fe7dd..5b9e5a8bde 100644 ---- a/test/ruby/test_time_tz.rb -+++ b/test/ruby/test_time_tz.rb -@@ -126,8 +126,8 @@ def test_asia_singapore - - def test_asia_tokyo - with_tz(tz="Asia/Tokyo") { -- assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0]) -- assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59]) -+# assert_time_constructor(tz, "1951-05-06 03:00:00 +1000", :local, [1951,5,6,2,0,0]) -+# assert_time_constructor(tz, "1951-05-06 03:59:59 +1000", :local, [1951,5,6,2,59,59]) - assert_time_constructor(tz, "2010-06-10 06:13:28 +0900", :local, [2010,6,10,6,13,28]) - } - end -@@ -329,10 +329,10 @@ def self.gen_zdump_test(data) - Asia/Singapore Sun Aug 8 16:30:00 1965 UTC = Mon Aug 9 00:00:00 1965 SGT isdst=0 gmtoff=27000 - Asia/Singapore Thu Dec 31 16:29:59 1981 UTC = Thu Dec 31 23:59:59 1981 SGT isdst=0 gmtoff=27000 - Asia/Singapore Thu Dec 31 16:30:00 1981 UTC = Fri Jan 1 00:30:00 1982 SGT isdst=0 gmtoff=28800 --Asia/Tokyo Sat May 5 16:59:59 1951 UTC = Sun May 6 01:59:59 1951 JST isdst=0 gmtoff=32400 --Asia/Tokyo Sat May 5 17:00:00 1951 UTC = Sun May 6 03:00:00 1951 JDT isdst=1 gmtoff=36000 --Asia/Tokyo Fri Sep 7 15:59:59 1951 UTC = Sat Sep 8 01:59:59 1951 JDT isdst=1 gmtoff=36000 --Asia/Tokyo Fri Sep 7 16:00:00 1951 UTC = Sat Sep 8 01:00:00 1951 JST isdst=0 gmtoff=32400 -+#Asia/Tokyo Sat May 5 16:59:59 1951 UTC = Sun May 6 01:59:59 1951 JST isdst=0 gmtoff=32400 -+#Asia/Tokyo Sat May 5 17:00:00 1951 UTC = Sun May 6 03:00:00 1951 JDT isdst=1 gmtoff=36000 -+#Asia/Tokyo Fri Sep 7 15:59:59 1951 UTC = Sat Sep 8 01:59:59 1951 JDT isdst=1 gmtoff=36000 -+#Asia/Tokyo Fri Sep 7 16:00:00 1951 UTC = Sat Sep 8 01:00:00 1951 JST isdst=0 gmtoff=32400 - America/St_Johns Sun Mar 11 03:30:59 2007 UTC = Sun Mar 11 00:00:59 2007 NST isdst=0 gmtoff=-12600 - America/St_Johns Sun Mar 11 03:31:00 2007 UTC = Sun Mar 11 01:01:00 2007 NDT isdst=1 gmtoff=-9000 - America/St_Johns Sun Nov 4 02:30:59 2007 UTC = Sun Nov 4 00:00:59 2007 NDT isdst=1 gmtoff=-9000 diff --git a/ruby-2.5.0-parse.y-assignable_error.patch b/ruby-2.5.0-parse.y-assignable_error.patch deleted file mode 100644 index ea7dad9..0000000 --- a/ruby-2.5.0-parse.y-assignable_error.patch +++ /dev/null @@ -1,80 +0,0 @@ -From: nobu -Date: Sun, 31 Dec 2017 11:25:38 +0000 -Subject: [PATCH] parse.y: assignable_error - -* parse.y (assignable_gen): should return valid NODE always even - on errors. [ruby-core:84565] [Bug #14261] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - parse.c | 14 ++++---------- - test/ruby/test_parse.rb | 6 ++++++ - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/parse.c b/parse.c -index 08c3461f7096..c260a046dc33 100644 ---- a/parse.c -+++ b/parse.c -@@ -6593,10 +6593,6 @@ - #line 1984 "parse.y" /* yacc.c:1646 */ - { - (yyval.node) = assignable(var_field((yyvsp[0].id)), 0, &(yyloc)); -- /*%%%*/ -- if (!(yyval.node)) (yyval.node) = new_begin(0, &(yyloc)); -- /*% -- %*/ - } - #line 6598 "parse.c" /* yacc.c:1646 */ - break; -@@ -6605,10 +6601,6 @@ - #line 1992 "parse.y" /* yacc.c:1646 */ - { - (yyval.node) = assignable(var_field((yyvsp[0].id)), 0, &(yyloc)); -- /*%%%*/ -- if (!(yyval.node)) (yyval.node) = new_begin(0, &(yyloc)); -- /*% -- %*/ - } - #line 6610 "parse.c" /* yacc.c:1646 */ - break; -@@ -16034,11 +16026,13 @@ - #ifdef RIPPER - ID id = get_id(lhs); - # define assignable_result(x) (lhs) -+# define assignable_error() (lhs) - # define parser_yyerror(parser, x) (lhs = assign_error_gen(parser, lhs)) - #else - # define assignable_result(x) assignable_result0(x, location) -+# define assignable_error() new_begin(0, location) - #endif -- if (!id) return assignable_result(0); -+ if (!id) return assignable_error(); - switch (id) { - case keyword_self: - yyerror0("Can't change the value of self"); -@@ -16101,7 +16095,7 @@ - compile_error(PARSER_ARG "identifier %"PRIsVALUE" is not valid to set", rb_id2str(id)); - } - error: -- return assignable_result(0); -+ return assignable_error(); - #undef assignable_result - #undef parser_yyerror - } -diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb -index e26bcdc07e19..15c6245bac2e 100644 ---- a/test/ruby/test_parse.rb -+++ b/test/ruby/test_parse.rb -@@ -746,6 +746,12 @@ def foo - end - END - end -+ assert_raise(SyntaxError) do -+ eval "#{<<~"begin;"}\n#{<<~'end;'}", nil, __FILE__, __LINE__+1 -+ begin; -+ x, true -+ end; -+ end - end - - def test_block_dup diff --git a/ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch b/ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch deleted file mode 100644 index 1e8e3b6..0000000 --- a/ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch +++ /dev/null @@ -1,602 +0,0 @@ -From 4663c224fa6c925ce54af32fd1c1cbac9508f5ec Mon Sep 17 00:00:00 2001 -From: normal -Date: Tue, 13 Feb 2018 10:02:07 +0000 -Subject: [PATCH] st.c: retry operations if rebuilt - -Calling the .eql? and .hash methods during a Hash operation can -result in a thread switch or a signal handler to run: allowing -one execution context to rebuild the hash table while another is -still reading or writing the table. This results in a -use-after-free bug affecting the thread_safe-0.3.6 test suite -and likely other bugs. - -This bug did not affect users of commonly keys (String, Symbol, -Fixnum) as those are optimized to avoid method dispatch -for .eql? and .hash methods. - -A separate version of this change needs to be ported to Ruby 2.3.x -which had a different implementation of st.c but was affected -by the same bug. - -* st.c: Add comment about table rebuilding during comparison. - (DO_PTR_EQUAL_CHECK): New macro. - (REBUILT_TABLE_ENTRY_IND, REBUILT_TABLE_BIN_IND): New macros. - (find_entry, find_table_entry_ind, find_table_bin_ind): Use new - macros. Return the rebuild flag. - (find_table_bin_ptr_and_reserve): Ditto. - (st_lookup, st_get_key, st_insert, st_insert2): Retry the - operation if the table was rebuilt. - (st_general_delete, st_shift, st_update, st_general_foreach): - Ditto. - (st_rehash_linear, st_rehash_indexed): Use DO_PTR_EQUAL_CHECK. - Return the rebuild flag. - (st_rehash): Retry the operation if the table was rebuilt. - [ruby-core:85510] [Ruby trunk Bug#14357] - -Thanks to Vit Ondruch for reporting the bug. - -From: Vladimir Makarov - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e ---- - st.c | 258 ++++++++++++++++++++++++++++++++++++++++++++++++------------------- - 1 file changed, 185 insertions(+), 73 deletions(-) - -diff --git a/st.c b/st.c -index 56ae30ce47..0c52e7a2ef 100644 ---- a/st.c -+++ b/st.c -@@ -90,6 +90,11 @@ - o To save more memory we use 8-, 16-, 32- and 64- bit indexes in - bins depending on the current hash table size. - -+ o The implementation takes into account that the table can be -+ rebuilt during hashing or comparison functions. It can happen if -+ the functions are implemented in Ruby and a thread switch occurs -+ during their execution. -+ - This implementation speeds up the Ruby hash table benchmarks in - average by more 40% on Intel Haswell CPU. - -@@ -174,6 +179,15 @@ static const struct st_hash_type type_strcasehash = { - #define PTR_EQUAL(tab, ptr, hash_val, key_) \ - ((ptr)->hash == (hash_val) && EQUAL((tab), (key_), (ptr)->key)) - -+/* As PRT_EQUAL only its result is returned in RES. REBUILT_P is set -+ up to TRUE if the table is rebuilt during the comparison. */ -+#define DO_PTR_EQUAL_CHECK(tab, ptr, hash_val, key, res, rebuilt_p) \ -+ do { \ -+ unsigned int _old_rebuilds_num = (tab)->rebuilds_num; \ -+ res = PTR_EQUAL(tab, ptr, hash_val, key); \ -+ rebuilt_p = _old_rebuilds_num != (tab)->rebuilds_num; \ -+ } while (FALSE) -+ - /* Features of a table. */ - struct st_features { - /* Power of 2 used for number of allocated entries. */ -@@ -380,6 +394,11 @@ set_bin(st_index_t *bins, int s, st_index_t n, st_index_t v) - #define UNDEFINED_ENTRY_IND (~(st_index_t) 0) - #define UNDEFINED_BIN_IND (~(st_index_t) 0) - -+/* Entry and bin values returned when we found a table rebuild during -+ the search. */ -+#define REBUILT_TABLE_ENTRY_IND (~(st_index_t) 1) -+#define REBUILT_TABLE_BIN_IND (~(st_index_t) 1) -+ - /* Mark I-th bin of table TAB as corresponding to a deleted table - entry. Update number of entries in the table and number of bins - corresponding to deleted entries. */ -@@ -823,17 +842,22 @@ secondary_hash(st_index_t ind, st_table *tab, st_index_t *perterb) - - /* Find an entry with HASH_VALUE and KEY in TABLE using a linear - search. Return the index of the found entry in array `entries`. -- If it is not found, return UNDEFINED_ENTRY_IND. */ -+ If it is not found, return UNDEFINED_ENTRY_IND. If the table was -+ rebuilt during the search, return REBUILT_TABLE_ENTRY_IND. */ - static inline st_index_t - find_entry(st_table *tab, st_hash_t hash_value, st_data_t key) - { -+ int eq_p, rebuilt_p; - st_index_t i, bound; - st_table_entry *entries; - - bound = tab->entries_bound; - entries = tab->entries; - for (i = tab->entries_start; i < bound; i++) { -- if (PTR_EQUAL(tab, &entries[i], hash_value, key)) -+ DO_PTR_EQUAL_CHECK(tab, &entries[i], hash_value, key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return REBUILT_TABLE_ENTRY_IND; -+ if (eq_p) - return i; - } - return UNDEFINED_ENTRY_IND; -@@ -845,10 +869,12 @@ find_entry(st_table *tab, st_hash_t hash_value, st_data_t key) - /*#define QUADRATIC_PROBE*/ - - /* Return index of entry with HASH_VALUE and KEY in table TAB. If -- there is no such entry, return UNDEFINED_ENTRY_IND. */ -+ there is no such entry, return UNDEFINED_ENTRY_IND. If the table -+ was rebuilt during the search, return REBUILT_TABLE_ENTRY_IND. */ - static st_index_t - find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - { -+ int eq_p, rebuilt_p; - st_index_t ind; - #ifdef QUADRATIC_PROBE - st_index_t d; -@@ -869,10 +895,13 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - FOUND_BIN; - for (;;) { - bin = get_bin(tab->bins, get_size_ind(tab), ind); -- if (! EMPTY_OR_DELETED_BIN_P(bin) -- && PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key)) -- break; -- else if (EMPTY_BIN_P(bin)) -+ if (! EMPTY_OR_DELETED_BIN_P(bin)) { -+ DO_PTR_EQUAL_CHECK(tab, &entries[bin - ENTRY_BASE], hash_value, key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return REBUILT_TABLE_ENTRY_IND; -+ if (eq_p) -+ break; -+ } else if (EMPTY_BIN_P(bin)) - return UNDEFINED_ENTRY_IND; - #ifdef QUADRATIC_PROBE - ind = hash_bin(ind + d, tab); -@@ -887,10 +916,12 @@ find_table_entry_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - - /* Find and return index of table TAB bin corresponding to an entry - with HASH_VALUE and KEY. If there is no such bin, return -- UNDEFINED_BIN_IND. */ -+ UNDEFINED_BIN_IND. If the table was rebuilt during the search, -+ return REBUILT_TABLE_BIN_IND. */ - static st_index_t - find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - { -+ int eq_p, rebuilt_p; - st_index_t ind; - #ifdef QUADRATIC_PROBE - st_index_t d; -@@ -911,10 +942,13 @@ find_table_bin_ind(st_table *tab, st_hash_t hash_value, st_data_t key) - FOUND_BIN; - for (;;) { - bin = get_bin(tab->bins, get_size_ind(tab), ind); -- if (! EMPTY_OR_DELETED_BIN_P(bin) -- && PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key)) -- break; -- else if (EMPTY_BIN_P(bin)) -+ if (! EMPTY_OR_DELETED_BIN_P(bin)) { -+ DO_PTR_EQUAL_CHECK(tab, &entries[bin - ENTRY_BASE], hash_value, key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return REBUILT_TABLE_BIN_IND; -+ if (eq_p) -+ break; -+ } else if (EMPTY_BIN_P(bin)) - return UNDEFINED_BIN_IND; - #ifdef QUADRATIC_PROBE - ind = hash_bin(ind + d, tab); -@@ -955,7 +989,7 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key) - bin = get_bin(tab->bins, get_size_ind(tab), ind); - if (EMPTY_OR_DELETED_BIN_P(bin)) - return ind; -- st_assert (! PTR_EQUAL(tab, &entries[bin - ENTRY_BASE], hash_value, key)); -+ st_assert (entries[bin - ENTRY_BASE].hash != hash_value); - #ifdef QUADRATIC_PROBE - ind = hash_bin(ind + d, tab); - d++; -@@ -973,11 +1007,13 @@ find_table_bin_ind_direct(st_table *tab, st_hash_t hash_value, st_data_t key) - bigger entries array. Although we can reuse a deleted bin, the - result bin value is always empty if the table has no entry with - KEY. Return the entries array index of the found entry or -- UNDEFINED_ENTRY_IND if it is not found. */ -+ UNDEFINED_ENTRY_IND if it is not found. If the table was rebuilt -+ during the search, return REBUILT_TABLE_ENTRY_IND. */ - static st_index_t - find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value, - st_data_t key, st_index_t *bin_ind) - { -+ int eq_p, rebuilt_p; - st_index_t ind; - st_hash_t curr_hash_value = *hash_value; - #ifdef QUADRATIC_PROBE -@@ -1015,7 +1051,10 @@ find_table_bin_ptr_and_reserve(st_table *tab, st_hash_t *hash_value, - break; - } - else if (! DELETED_BIN_P(entry_index)) { -- if (PTR_EQUAL(tab, &entries[entry_index - ENTRY_BASE], curr_hash_value, key)) -+ DO_PTR_EQUAL_CHECK(tab, &entries[entry_index - ENTRY_BASE], curr_hash_value, key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return REBUILT_TABLE_ENTRY_IND; -+ if (eq_p) - break; - } - else if (first_deleted_bin_ind == UNDEFINED_BIN_IND) -@@ -1040,13 +1079,18 @@ st_lookup(st_table *tab, st_data_t key, st_data_t *value) - st_index_t bin; - st_hash_t hash = do_hash(key, tab); - -+ retry: - if (tab->bins == NULL) { - bin = find_entry(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) - return 0; - } - else { - bin = find_table_entry_ind(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) - return 0; - bin -= ENTRY_BASE; -@@ -1064,13 +1108,18 @@ st_get_key(st_table *tab, st_data_t key, st_data_t *result) - st_index_t bin; - st_hash_t hash = do_hash(key, tab); - -+ retry: - if (tab->bins == NULL) { - bin = find_entry(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) - return 0; - } - else { - bin = find_table_entry_ind(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) - return 0; - bin -= ENTRY_BASE; -@@ -1104,10 +1153,13 @@ st_insert(st_table *tab, st_data_t key, st_data_t value) - st_index_t bin_ind; - int new_p; - -- rebuild_table_if_necessary(tab); - hash_value = do_hash(key, tab); -+ retry: -+ rebuild_table_if_necessary(tab); - if (tab->bins == NULL) { - bin = find_entry(tab, hash_value, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - new_p = bin == UNDEFINED_ENTRY_IND; - if (new_p) - tab->num_entries++; -@@ -1116,6 +1168,8 @@ st_insert(st_table *tab, st_data_t key, st_data_t value) - else { - bin = find_table_bin_ptr_and_reserve(tab, &hash_value, - key, &bin_ind); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - new_p = bin == UNDEFINED_ENTRY_IND; - bin -= ENTRY_BASE; - } -@@ -1192,10 +1246,13 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, - st_index_t bin_ind; - int new_p; - -- rebuild_table_if_necessary (tab); - hash_value = do_hash(key, tab); -+ retry: -+ rebuild_table_if_necessary (tab); - if (tab->bins == NULL) { - bin = find_entry(tab, hash_value, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - new_p = bin == UNDEFINED_ENTRY_IND; - if (new_p) - tab->num_entries++; -@@ -1204,6 +1261,8 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, - else { - bin = find_table_bin_ptr_and_reserve(tab, &hash_value, - key, &bin_ind); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - new_p = bin == UNDEFINED_ENTRY_IND; - bin -= ENTRY_BASE; - } -@@ -1212,7 +1271,6 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, - check = tab->rebuilds_num; - key = (*func)(key); - st_assert(check == tab->rebuilds_num); -- st_assert(do_hash(key, tab) == hash_value); - ind = tab->entries_bound++; - entry = &tab->entries[ind]; - entry->hash = hash_value; -@@ -1220,6 +1278,7 @@ st_insert2(st_table *tab, st_data_t key, st_data_t value, - entry->record = value; - if (bin_ind != UNDEFINED_BIN_IND) - set_bin(tab->bins, get_size_ind(tab), bin_ind, ind + ENTRY_BASE); -+ st_assert(do_hash(key, tab) == hash_value); - #ifdef ST_DEBUG - st_check(tab); - #endif -@@ -1281,8 +1340,11 @@ st_general_delete(st_table *tab, st_data_t *key, st_data_t *value) - - st_assert(tab != NULL); - hash = do_hash(*key, tab); -+ retry: - if (tab->bins == NULL) { - bin = find_entry(tab, hash, *key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - if (bin == UNDEFINED_ENTRY_IND) { - if (value != 0) *value = 0; - return 0; -@@ -1290,6 +1352,8 @@ st_general_delete(st_table *tab, st_data_t *key, st_data_t *value) - } - else { - bin_ind = find_table_bin_ind(tab, hash, *key); -+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) -+ goto retry; - if (bin_ind == UNDEFINED_BIN_IND) { - if (value != 0) *value = 0; - return 0; -@@ -1344,21 +1408,33 @@ st_shift(st_table *tab, st_data_t *key, st_data_t *value) - for (i = tab->entries_start; i < bound; i++) { - curr_entry_ptr = &entries[i]; - if (! DELETED_ENTRY_P(curr_entry_ptr)) { -+ st_hash_t entry_hash = curr_entry_ptr->hash; -+ st_data_t entry_key = curr_entry_ptr->key; -+ - if (value != 0) *value = curr_entry_ptr->record; -- *key = curr_entry_ptr->key; -+ *key = entry_key; -+ retry: - if (tab->bins == NULL) { -- bin = find_entry(tab, curr_entry_ptr->hash, curr_entry_ptr->key); -+ bin = find_entry(tab, entry_hash, entry_key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) { -+ entries = tab->entries; -+ goto retry; -+ } - st_assert(bin != UNDEFINED_ENTRY_IND); -- st_assert(&entries[bin] == curr_entry_ptr); -+ curr_entry_ptr = &entries[bin]; - } - else { -- bin_ind = find_table_bin_ind(tab, curr_entry_ptr->hash, -- curr_entry_ptr->key); -+ bin_ind = find_table_bin_ind(tab, entry_hash, entry_key); -+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) { -+ entries = tab->entries; -+ goto retry; -+ } - st_assert(bin_ind != UNDEFINED_BIN_IND); -- st_assert(&entries[get_bin(tab->bins, get_size_ind(tab), bin_ind) -- - ENTRY_BASE] == curr_entry_ptr); -+ curr_entry_ptr = &entries[get_bin(tab->bins, get_size_ind(tab), bin_ind) -+ - ENTRY_BASE]; - MARK_BIN_DELETED(tab, bin_ind); - } -+ st_assert(entry_hash != curr_entry_ptr->hash && entry_key == curr_entry_ptr->key); - MARK_ENTRY_DELETED(curr_entry_ptr); - tab->num_entries--; - update_range_for_deleted(tab, i); -@@ -1402,15 +1478,20 @@ st_update(st_table *tab, st_data_t key, - int retval, existing; - st_hash_t hash = do_hash(key, tab); - -+ retry: - entries = tab->entries; - if (tab->bins == NULL) { - bin = find_entry(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - existing = bin != UNDEFINED_ENTRY_IND; - entry = &entries[bin]; - bin_ind = UNDEFINED_BIN_IND; - } - else { - bin_ind = find_table_bin_ind(tab, hash, key); -+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) -+ goto retry; - existing = bin_ind != UNDEFINED_BIN_IND; - if (existing) { - bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE; -@@ -1489,14 +1570,19 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg, - hash = curr_entry_ptr->hash; - retval = (*func)(key, curr_entry_ptr->record, arg, 0); - if (rebuilds_num != tab->rebuilds_num) { -+ retry: - entries = tab->entries; - packed_p = tab->bins == NULL; - if (packed_p) { - i = find_entry(tab, hash, key); -+ if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - error_p = i == UNDEFINED_ENTRY_IND; - } - else { - i = find_table_entry_ind(tab, hash, key); -+ if (EXPECT(i == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto retry; - error_p = i == UNDEFINED_ENTRY_IND; - i -= ENTRY_BASE; - } -@@ -1512,36 +1598,44 @@ st_general_foreach(st_table *tab, int (*func)(ANYARGS), st_data_t arg, - } - switch (retval) { - case ST_CONTINUE: -- break; -+ break; - case ST_CHECK: -- if (check_p) -- break; -+ if (check_p) -+ break; - case ST_STOP: - #ifdef ST_DEBUG -- st_check(tab); --#endif -- return 0; -- case ST_DELETE: -- if (packed_p) { -- bin = find_entry(tab, hash, curr_entry_ptr->key); -- if (bin == UNDEFINED_ENTRY_IND) -- break; -- } -- else { -- bin_ind = find_table_bin_ind(tab, hash, curr_entry_ptr->key); -- if (bin_ind == UNDEFINED_BIN_IND) -- break; -- bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE; -- MARK_BIN_DELETED(tab, bin_ind); -- } -- st_assert(&entries[bin] == curr_entry_ptr); -- MARK_ENTRY_DELETED(curr_entry_ptr); -- tab->num_entries--; -- update_range_for_deleted(tab, bin); -+ st_check(tab); -+#endif -+ return 0; -+ case ST_DELETE: { -+ st_data_t key = curr_entry_ptr->key; -+ -+ again: -+ if (packed_p) { -+ bin = find_entry(tab, hash, key); -+ if (EXPECT(bin == REBUILT_TABLE_ENTRY_IND, 0)) -+ goto again; -+ if (bin == UNDEFINED_ENTRY_IND) -+ break; -+ } -+ else { -+ bin_ind = find_table_bin_ind(tab, hash, key); -+ if (EXPECT(bin_ind == REBUILT_TABLE_BIN_IND, 0)) -+ goto again; -+ if (bin_ind == UNDEFINED_BIN_IND) -+ break; -+ bin = get_bin(tab->bins, get_size_ind(tab), bin_ind) - ENTRY_BASE; -+ MARK_BIN_DELETED(tab, bin_ind); -+ } -+ curr_entry_ptr = &entries[bin]; -+ MARK_ENTRY_DELETED(curr_entry_ptr); -+ tab->num_entries--; -+ update_range_for_deleted(tab, bin); - #ifdef ST_DEBUG -- st_check(tab); -+ st_check(tab); - #endif -- break; -+ break; -+ } - } - } - #ifdef ST_DEBUG -@@ -2015,10 +2109,12 @@ st_expand_table(st_table *tab, st_index_t siz) - free(tmp); - } - --/* Rehash using linear search. */ --static void -+/* Rehash using linear search. Return TRUE if we found that the table -+ was rebuilt. */ -+static int - st_rehash_linear(st_table *tab) - { -+ int eq_p, rebuilt_p; - st_index_t i, j; - st_table_entry *p, *q; - if (tab->bins) { -@@ -2033,7 +2129,10 @@ st_rehash_linear(st_table *tab) - q = &tab->entries[j]; - if (DELETED_ENTRY_P(q)) - continue; -- if (PTR_EQUAL(tab, p, q->hash, q->key)) { -+ DO_PTR_EQUAL_CHECK(tab, p, q->hash, q->key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return TRUE; -+ if (eq_p) { - st_assert(p < q); - *p = *q; - MARK_ENTRY_DELETED(q); -@@ -2042,12 +2141,15 @@ st_rehash_linear(st_table *tab) - } - } - } -+ return FALSE; - } - --/* Rehash using index */ --static void -+/* Rehash using index. Return TRUE if we found that the table was -+ rebuilt. */ -+static int - st_rehash_indexed(st_table *tab) - { -+ int eq_p, rebuilt_p; - st_index_t i; - st_index_t const n = bins_size(tab); - unsigned int const size_ind = get_size_ind(tab); -@@ -2076,26 +2178,32 @@ st_rehash_indexed(st_table *tab) - set_bin(bins, size_ind, ind, i + ENTRY_BASE); - break; - } -- else if (PTR_EQUAL(tab, q, p->hash, p->key)) { -- /* duplicated key; delete it */ -- st_assert(q < p); -- q->record = p->record; -- MARK_ENTRY_DELETED(p); -- tab->num_entries--; -- update_range_for_deleted(tab, bin); -- break; -- } - else { -- /* hash collision; skip it */ -+ DO_PTR_EQUAL_CHECK(tab, q, p->hash, p->key, eq_p, rebuilt_p); -+ if (EXPECT(rebuilt_p, 0)) -+ return TRUE; -+ if (eq_p) { -+ /* duplicated key; delete it */ -+ st_assert(q < p); -+ q->record = p->record; -+ MARK_ENTRY_DELETED(p); -+ tab->num_entries--; -+ update_range_for_deleted(tab, bin); -+ break; -+ } -+ else { -+ /* hash collision; skip it */ - #ifdef QUADRATIC_PROBE -- ind = hash_bin(ind + d, tab); -- d++; -+ ind = hash_bin(ind + d, tab); -+ d++; - #else -- ind = secondary_hash(ind, tab, &peterb); -+ ind = secondary_hash(ind, tab, &peterb); - #endif -- } -+ } -+ } - } - } -+ return FALSE; - } - - /* Reconstruct TAB's bins according to TAB's entries. This function -@@ -2104,10 +2212,14 @@ st_rehash_indexed(st_table *tab) - static void - st_rehash(st_table *tab) - { -- if (tab->bin_power <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS) -- st_rehash_linear(tab); -- else -- st_rehash_indexed(tab); -+ int rebuilt_p; -+ -+ do { -+ if (tab->bin_power <= MAX_POWER2_FOR_TABLES_WITHOUT_BINS) -+ rebuilt_p = st_rehash_linear(tab); -+ else -+ rebuilt_p = st_rehash_indexed(tab); -+ } while (rebuilt_p); - } - - #ifdef RUBY --- -2.16.1 - diff --git a/ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch b/ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch new file mode 100644 index 0000000..fa5ad3e --- /dev/null +++ b/ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch @@ -0,0 +1,115 @@ +From 584b5929f9b769c4d0b03e322a9fddf2b2dd3454 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sun, 1 Apr 2018 13:02:11 +0000 +Subject: [PATCH] test_time_tz.rb: Kiritimati tzdata fix + +* test/ruby/test_time_tz.rb (gen_zdump_test): fix the expected + data at the Kiritimati's skip of New Year's Eve 1994. + [Bug #14655] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/ruby/test_time_tz.rb | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index dfe139033ed3..ac5f81892878 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -364,9 +364,18 @@ def self.gen_zdump_test(data) + Europe/London Sun Aug 10 01:00:00 1947 UTC = Sun Aug 10 02:00:00 1947 BST isdst=1 gmtoff=3600 + Europe/London Sun Nov 2 01:59:59 1947 UTC = Sun Nov 2 02:59:59 1947 BST isdst=1 gmtoff=3600 + Europe/London Sun Nov 2 02:00:00 1947 UTC = Sun Nov 2 02:00:00 1947 GMT isdst=0 gmtoff=0 ++End ++ if CORRECT_KIRITIMATI_SKIP_1994 ++ gen_zdump_test <<'End' ++Pacific/Kiritimati Sat Dec 31 09:59:59 1994 UTC = Fri Dec 30 23:59:59 1994 LINT isdst=0 gmtoff=-36000 ++Pacific/Kiritimati Sat Dec 31 10:00:00 1994 UTC = Sun Jan 1 00:00:00 1995 LINT isdst=0 gmtoff=50400 ++End ++ else ++ gen_zdump_test <<'End' + Pacific/Kiritimati Sun Jan 1 09:59:59 1995 UTC = Sat Dec 31 23:59:59 1994 LINT isdst=0 gmtoff=-36000 + Pacific/Kiritimati Sun Jan 1 10:00:00 1995 UTC = Mon Jan 2 00:00:00 1995 LINT isdst=0 gmtoff=50400 + End ++ end + gen_zdump_test <<'End' if has_right_tz + right/America/Los_Angeles Fri Jun 30 23:59:60 1972 UTC = Fri Jun 30 16:59:60 1972 PDT isdst=1 gmtoff=-25200 + right/America/Los_Angeles Wed Dec 31 23:59:60 2008 UTC = Wed Dec 31 15:59:60 2008 PST isdst=0 gmtoff=-28800 +-- + +From 2965c2d4df78e6f5acf8759f84c88ce14a4e70f1 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sun, 1 Apr 2018 02:00:36 +0000 +Subject: [PATCH] test_time_tz.rb: Kiritimati tzdata fix + +* test/ruby/test_time_tz.rb (TestTimeTZ#test_pacific_kiritimati): + fix the expected data at the skip of New Year's Eve 1994. + [Bug #14655] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/ruby/test_time_tz.rb | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index 39b830d28a3d..dfe139033ed3 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -89,6 +89,9 @@ def group_by(e, &block) + Time.local(1951, 5, 6, 1, 0, 0).dst? # DST with fixed tzdata + end + } ++ CORRECT_KIRITIMATI_SKIP_1994 = with_tz("Pacific/Kiritimati") { ++ Time.local(1994, 12, 31, 0, 0, 0).year == 1995 ++ } + + def time_to_s(t) + t.to_s +@@ -178,9 +181,17 @@ def test_europe_lisbon + + def test_pacific_kiritimati + with_tz(tz="Pacific/Kiritimati") { +- assert_time_constructor(tz, "1994-12-31 23:59:59 -1000", :local, [1994,12,31,23,59,59]) +- assert_time_constructor(tz, "1995-01-02 00:00:00 +1400", :local, [1995,1,1,0,0,0]) +- assert_time_constructor(tz, "1995-01-02 23:59:59 +1400", :local, [1995,1,1,23,59,59]) ++ assert_time_constructor(tz, "1994-12-30 00:00:00 -1000", :local, [1994,12,30,0,0,0]) ++ assert_time_constructor(tz, "1994-12-30 23:59:59 -1000", :local, [1994,12,30,23,59,59]) ++ if CORRECT_KIRITIMATI_SKIP_1994 ++ assert_time_constructor(tz, "1995-01-01 00:00:00 +1400", :local, [1994,12,31,0,0,0]) ++ assert_time_constructor(tz, "1995-01-01 23:59:59 +1400", :local, [1994,12,31,23,59,59]) ++ assert_time_constructor(tz, "1995-01-01 00:00:00 +1400", :local, [1995,1,1,0,0,0]) ++ else ++ assert_time_constructor(tz, "1994-12-31 23:59:59 -1000", :local, [1994,12,31,23,59,59]) ++ assert_time_constructor(tz, "1995-01-02 00:00:00 +1400", :local, [1995,1,1,0,0,0]) ++ assert_time_constructor(tz, "1995-01-02 23:59:59 +1400", :local, [1995,1,1,23,59,59]) ++ end + assert_time_constructor(tz, "1995-01-02 00:00:00 +1400", :local, [1995,1,2,0,0,0]) + } + end +-- + +From a0e6607a8172f9eaf9a15f03065736deb2035771 Mon Sep 17 00:00:00 2001 +From: nobu +Date: Sun, 1 Apr 2018 13:16:14 +0000 +Subject: [PATCH] test_time_tz.rb: Lisbon tzdata fix + +* test/ruby/test_time_tz.rb (gen_variational_zdump_test): Update + Lisbon zdump data, which fixed the 1912-01-01 transition for + Portugual and its colonies. [Bug #14655] + +git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e +--- + test/ruby/test_time_tz.rb | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/test/ruby/test_time_tz.rb b/test/ruby/test_time_tz.rb +index ac5f81892878..b32caff9c539 100644 +--- a/test/ruby/test_time_tz.rb ++++ b/test/ruby/test_time_tz.rb +@@ -434,5 +434,6 @@ def self.gen_variational_zdump_test(hint, data) + gen_variational_zdump_test "lisbon", <<'End' if has_lisbon_tz + Europe/Lisbon Mon Jan 1 00:36:31 1912 UTC = Sun Dec 31 23:59:59 1911 LMT isdst=0 gmtoff=-2192 + Europe/Lisbon Mon Jan 1 00:36:44 1912 UT = Sun Dec 31 23:59:59 1911 LMT isdst=0 gmtoff=-2205 ++Europe/Lisbon Sun Dec 31 23:59:59 1911 UT = Sun Dec 31 23:23:14 1911 LMT isdst=0 gmtoff=-2205 + End + end diff --git a/ruby.spec b/ruby.spec index 3c6aea5..757cc97 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,6 +1,6 @@ %global major_version 2 %global minor_version 5 -%global teeny_version 0 +%global teeny_version 1 %global major_minor_version %{major_version}.%{minor_version} %global ruby_version %{major_minor_version}.%{teeny_version} @@ -21,7 +21,7 @@ %endif -%global release 90 +%global release 92 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -135,19 +135,9 @@ Patch9: ruby-2.3.1-Rely-on-ldd-to-detect-glibc.patch # Add Gem.operating_system_defaults to allow packagers to override defaults. # https://github.com/rubygems/rubygems/pull/2116 Patch10: ruby-2.5.0-Add-Gem.operating_system_defaults.patch -# Fix segfault during generating documentation. -# https://bugs.ruby-lang.org/issues/14343 -Patch11: ruby-2.5.0-parse.y-assignable_error.patch -# Recent tzdata change breaks Ruby test suite. -# https://bugs.ruby-lang.org/issues/14438 -Patch12: ruby-2.5.0-Disable-Tokyo-TZ-tests.patch -# Fix thread_safe tests suite segfaults. -# https://bugs.ruby-lang.org/issues/14357 -Patch13: ruby-2.5.0-st.c-retry-operations-if-rebuilt.patch -# Fix: Multiple vulnerabilities in RubyGems -# https://bugzilla.redhat.com/show_bug.cgi?id=1547431 -# https://www.ruby-lang.org/en/news/2018/02/17/multiple-vulnerabilities-in-rubygems/ -Patch14: rubygems-2.5.0-multiple-vulnerabilities.patch +# TestTimeTZ test failures Kiritimati and Lisbon +# https://bugs.ruby-lang.org/issues/14655 +Patch11: ruby-2.5.1-TestTimeTZ-test-failures-Kiritimati-and-Lisbon.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -532,9 +522,6 @@ rm -rf ext/fiddle/libffi* %patch9 -p1 %patch10 -p1 %patch11 -p1 -%patch12 -p1 -%patch13 -p1 -%patch14 -p0 # Provide an example of usage of the tapset: cp -a %{SOURCE3} . @@ -750,10 +737,6 @@ make runruby TESTRUN_SCRIPT="--enable-gems %{SOURCE13}" DISABLE_TESTS="" -# https://bugs.ruby-lang.org/issues/11480 -# Once seen: http://koji.fedoraproject.org/koji/taskinfo?taskID=12556650 -DISABLE_TESTS="$DISABLE_TESTS -x test_fork.rb" - # SIGSEV handler does not provide correct output on AArch64. # https://bugs.ruby-lang.org/issues/13758 %ifarch aarch64 @@ -1084,6 +1067,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu Mar 29 2018 Pavel Valena - 2.5.1-92 +- Update to Ruby 2.5.1. + * Thu Mar 01 2018 V鱈t Ondruch - 2.5.0-90 - Drop GMP dependency. diff --git a/rubygems-2.5.0-multiple-vulnerabilities.patch b/rubygems-2.5.0-multiple-vulnerabilities.patch deleted file mode 100644 index e32926a..0000000 --- a/rubygems-2.5.0-multiple-vulnerabilities.patch +++ /dev/null @@ -1,2349 +0,0 @@ -diff --git lib/rubygems.rb lib/rubygems.rb -index 0475ced164..2762bfcb88 100644 ---- lib/rubygems.rb -+++ lib/rubygems.rb -@@ -10,7 +10,7 @@ - require 'thread' - - module Gem -- VERSION = "2.7.3" -+ VERSION = "2.7.6" - end - - # Must be first since it unloads the prelude from 1.9.2 -@@ -161,7 +161,7 @@ module Gem - # these are defined in Ruby 1.8.7, hence the need for this convoluted setup. - - READ_BINARY_ERRORS = begin -- read_binary_errors = [Errno::EACCES, Errno::EROFS] -+ read_binary_errors = [Errno::EACCES, Errno::EROFS, Errno::ENOSYS] - read_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) - read_binary_errors - end.freeze -@@ -171,7 +171,7 @@ module Gem - # these are defined in Ruby 1.8.7. - - WRITE_BINARY_ERRORS = begin -- write_binary_errors = [] -+ write_binary_errors = [Errno::ENOSYS] - write_binary_errors << Errno::ENOTSUP if Errno.const_defined?(:ENOTSUP) - write_binary_errors - end.freeze -@@ -871,19 +871,19 @@ def self.refresh - # Safely read a file in binary mode on all platforms. - - def self.read_binary(path) -- open path, 'rb+' do |f| -+ File.open path, 'rb+' do |f| - f.flock(File::LOCK_EX) - f.read - end - rescue *READ_BINARY_ERRORS -- open path, 'rb' do |f| -+ File.open path, 'rb' do |f| - f.read - end - rescue Errno::ENOLCK # NFS - if Thread.main != Thread.current - raise - else -- open path, 'rb' do |f| -+ File.open path, 'rb' do |f| - f.read - end - end -diff --git lib/rubygems/commands/generate_index_command.rb lib/rubygems/commands/generate_index_command.rb -index 01f1f88405..0b677b73a9 100644 ---- lib/rubygems/commands/generate_index_command.rb -+++ lib/rubygems/commands/generate_index_command.rb -@@ -68,7 +68,7 @@ def execute - - if not File.exist?(options[:directory]) or - not File.directory?(options[:directory]) then -- alert_error "unknown directory name #{directory}." -+ alert_error "unknown directory name #{options[:directory]}." - terminate_interaction 1 - else - indexer = Gem::Indexer.new options.delete(:directory), options -diff --git lib/rubygems/commands/owner_command.rb lib/rubygems/commands/owner_command.rb -index 8e2271657a..637b5bdc4d 100644 ---- lib/rubygems/commands/owner_command.rb -+++ lib/rubygems/commands/owner_command.rb -@@ -64,7 +64,7 @@ def show_owners name - end - - with_response response do |resp| -- owners = YAML.load resp.body -+ owners = Gem::SafeYAML.load resp.body - - say "Owners for gem: #{name}" - owners.each do |owner| -diff --git lib/rubygems/commands/setup_command.rb lib/rubygems/commands/setup_command.rb -index 5d1414d102..6966cde01a 100644 ---- lib/rubygems/commands/setup_command.rb -+++ lib/rubygems/commands/setup_command.rb -@@ -350,7 +350,9 @@ def fake_spec.full_gem_path - def install_default_bundler_gem - return unless Gem::USE_BUNDLER_FOR_GEMDEPS - -- mkdir_p Gem::Specification.default_specifications_dir -+ specs_dir = Gem::Specification.default_specifications_dir -+ File.join(options[:destdir], specs_dir) unless Gem.win_platform? -+ mkdir_p specs_dir - - # Workaround for non-git environment. - gemspec = File.open('bundler/bundler.gemspec', 'rb'){|f| f.read.gsub(/`git ls-files -z`/, "''") } -@@ -359,23 +361,36 @@ def install_default_bundler_gem - bundler_spec = Gem::Specification.load("bundler/bundler.gemspec") - bundler_spec.files = Dir.chdir("bundler") { Dir["{*.md,{lib,exe,man}/**/*}"] } - bundler_spec.executables -= %w[bundler bundle_ruby] -- Dir.entries(Gem::Specification.default_specifications_dir). -+ -+ # Remove bundler-*.gemspec in default specification directory. -+ Dir.entries(specs_dir). - select {|gs| gs.start_with?("bundler-") }. -- each {|gs| File.delete(File.join(Gem::Specification.default_specifications_dir, gs)) } -+ each {|gs| File.delete(File.join(specs_dir, gs)) } - -- default_spec_path = File.join(Gem::Specification.default_specifications_dir, "#{bundler_spec.full_name}.gemspec") -+ default_spec_path = File.join(specs_dir, "#{bundler_spec.full_name}.gemspec") - Gem.write_binary(default_spec_path, bundler_spec.to_ruby) - - bundler_spec = Gem::Specification.load(default_spec_path) - -+ # Remove gemspec that was same version of vendored bundler. -+ normal_gemspec = File.join(Gem.default_dir, "specifications", "bundler-#{bundler_spec.version}.gemspec") -+ if File.file? normal_gemspec -+ File.delete normal_gemspec -+ end -+ -+ # Remove gem files that were same version of vendored bundler. - if File.directory? bundler_spec.gems_dir - Dir.entries(bundler_spec.gems_dir). -- select {|default_gem| File.basename(default_gem).match(/^bundler-#{Gem::Version::VERSION_PATTERN}$/) }. -+ select {|default_gem| File.basename(default_gem) == "bundler-#{bundler_spec.version}" }. - each {|default_gem| rm_r File.join(bundler_spec.gems_dir, default_gem) } - end - -- mkdir_p bundler_spec.bin_dir -- bundler_spec.executables.each {|e| cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_spec.bin_dir, e) } -+ bundler_bin_dir = File.join(Gem.default_dir, 'gems', bundler_spec.full_name, bundler_spec.bindir) -+ File.join(options[:destdir], bundler_bin_dir) unless Gem.win_platform? -+ mkdir_p bundler_bin_dir -+ bundler_spec.executables.each do |e| -+ cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_bin_dir, e) -+ end - - if Gem.win_platform? - require 'rubygems/installer' -diff --git lib/rubygems/commands/unpack_command.rb lib/rubygems/commands/unpack_command.rb -index eb7f550673..b873f20d28 100644 ---- lib/rubygems/commands/unpack_command.rb -+++ lib/rubygems/commands/unpack_command.rb -@@ -94,7 +94,7 @@ def execute - - spec_file = File.basename spec.spec_file - -- open spec_file, 'w' do |io| -+ File.open spec_file, 'w' do |io| - io.write metadata - end - else -@@ -176,7 +176,7 @@ def get_metadata path, security_policy = nil - - metadata = nil - -- open path, Gem.binary_mode do |io| -+ File.open path, Gem.binary_mode do |io| - tar = Gem::Package::TarReader.new io - tar.each_entry do |entry| - case entry.full_name -diff --git lib/rubygems/config_file.rb lib/rubygems/config_file.rb -index a4efed0f5a..c0d19dbfc2 100644 ---- lib/rubygems/config_file.rb -+++ lib/rubygems/config_file.rb -@@ -458,7 +458,7 @@ def to_yaml # :nodoc: - - # Writes out this config file, replacing its source. - def write -- open config_file_name, 'w' do |io| -+ File.open config_file_name, 'w' do |io| - io.write to_yaml - end - end -diff --git lib/rubygems/ext/builder.rb lib/rubygems/ext/builder.rb -index a1619c97d7..eb9db199d5 100644 ---- lib/rubygems/ext/builder.rb -+++ lib/rubygems/ext/builder.rb -@@ -212,7 +212,7 @@ def write_gem_make_out output # :nodoc: - - FileUtils.mkdir_p @spec.extension_dir - -- open destination, 'wb' do |io| io.puts output end -+ File.open destination, 'wb' do |io| io.puts output end - - destination - end -diff --git lib/rubygems/indexer.rb lib/rubygems/indexer.rb -index 871cc09d8d..3ea994414b 100644 ---- lib/rubygems/indexer.rb -+++ lib/rubygems/indexer.rb -@@ -2,6 +2,7 @@ - require 'rubygems' - require 'rubygems/package' - require 'time' -+require 'tmpdir' - - begin - gem 'builder' -@@ -64,7 +65,7 @@ def initialize(directory, options = {}) - @build_modern = options[:build_modern] - - @dest_directory = directory -- @directory = File.join(Dir.tmpdir, "gem_generate_index_#{$$}") -+ @directory = Dir.mktmpdir 'gem_generate_index' - - marshal_name = "Marshal.#{Gem.marshal_version}" - -@@ -123,7 +124,7 @@ def build_marshal_gemspecs specs - marshal_name = File.join @quick_marshal_dir, spec_file_name - - marshal_zipped = Gem.deflate Marshal.dump(spec) -- open marshal_name, 'wb' do |io| io.write marshal_zipped end -+ File.open marshal_name, 'wb' do |io| io.write marshal_zipped end - - files << marshal_name - -@@ -261,7 +262,7 @@ def compress(filename, extension) - - zipped = Gem.deflate data - -- open "#{filename}.#{extension}", 'wb' do |io| -+ File.open "#{filename}.#{extension}", 'wb' do |io| - io.write zipped - end - end -@@ -427,7 +428,7 @@ def update_specs_index(index, source, dest) - - specs_index = compact_specs specs_index.uniq.sort - -- open dest, 'wb' do |io| -+ File.open dest, 'wb' do |io| - Marshal.dump specs_index, io - end - end -diff --git lib/rubygems/installer.rb lib/rubygems/installer.rb -index 0cbca0791b..ee5fedeb64 100644 ---- lib/rubygems/installer.rb -+++ lib/rubygems/installer.rb -@@ -206,7 +206,7 @@ def check_executable_overwrite filename # :nodoc: - ruby_executable = false - existing = nil - -- open generated_bin, 'rb' do |io| -+ File.open generated_bin, 'rb' do |io| - next unless io.gets =~ /^#!/ # shebang - io.gets # blankline - -@@ -427,7 +427,7 @@ def default_spec_file - # specifications directory. - - def write_spec -- open spec_file, 'w' do |file| -+ File.open spec_file, 'w' do |file| - spec.installed_by_version = Gem.rubygems_version - - file.puts spec.to_ruby_for_cache -@@ -464,7 +464,12 @@ def generate_windows_script(filename, bindir) - def generate_bin # :nodoc: - return if spec.executables.nil? or spec.executables.empty? - -- Dir.mkdir @bin_dir unless File.exist? @bin_dir -+ begin -+ Dir.mkdir @bin_dir -+ rescue SystemCallError -+ raise unless File.directory? @bin_dir -+ end -+ - raise Gem::FilePermissionError.new(@bin_dir) unless File.writable? @bin_dir - - spec.executables.each do |filename| -@@ -863,7 +868,7 @@ def write_build_info_file - - build_info_file = File.join build_info_dir, "#{spec.full_name}.info" - -- open build_info_file, 'w' do |io| -+ File.open build_info_file, 'w' do |io| - @build_args.each do |arg| - io.puts arg - end -diff --git lib/rubygems/package.rb lib/rubygems/package.rb -index 77811ed5ec..b924122827 100644 ---- lib/rubygems/package.rb -+++ lib/rubygems/package.rb -@@ -219,7 +219,7 @@ def add_files tar # :nodoc: - next unless stat.file? - - tar.add_file_simple file, stat.mode, stat.size do |dst_io| -- open file, 'rb' do |src_io| -+ File.open file, 'rb' do |src_io| - dst_io.write src_io.read 16384 until src_io.eof? - end - end -@@ -378,9 +378,9 @@ def extract_tar_gz io, destination_dir, pattern = "*" # :nodoc: - File.dirname destination - end - -- FileUtils.mkdir_p mkdir, mkdir_options -+ mkdir_p_safe mkdir, mkdir_options, destination_dir, entry.full_name - -- open destination, 'wb' do |out| -+ File.open destination, 'wb' do |out| - out.write entry.read - FileUtils.chmod entry.header.mode, destination - end if entry.file? -@@ -416,20 +416,35 @@ def install_location filename, destination_dir # :nodoc: - raise Gem::Package::PathError.new(filename, destination_dir) if - filename.start_with? '/' - -- destination_dir = File.realpath destination_dir if -- File.respond_to? :realpath -+ destination_dir = realpath destination_dir - destination_dir = File.expand_path destination_dir - - destination = File.join destination_dir, filename - destination = File.expand_path destination - - raise Gem::Package::PathError.new(destination, destination_dir) unless -- destination.start_with? destination_dir -+ destination.start_with? destination_dir + '/' - - destination.untaint - destination - end - -+ def mkdir_p_safe mkdir, mkdir_options, destination_dir, file_name -+ destination_dir = realpath File.expand_path(destination_dir) -+ parts = mkdir.split(File::SEPARATOR) -+ parts.reduce do |path, basename| -+ path = realpath path unless path == "" -+ path = File.expand_path(path + File::SEPARATOR + basename) -+ lstat = File.lstat path rescue nil -+ if !lstat || !lstat.directory? -+ unless path.start_with? destination_dir and (FileUtils.mkdir path, mkdir_options rescue false) -+ raise Gem::Package::PathError.new(file_name, destination_dir) -+ end -+ end -+ path -+ end -+ end -+ - ## - # Loads a Gem::Specification from the TarEntry +entry+ - -@@ -603,6 +618,10 @@ def verify_files gem - raise Gem::Package::FormatError.new \ - 'package content (data.tar.gz) is missing', @gem - end -+ -+ if duplicates = @files.group_by {|f| f }.select {|k,v| v.size > 1 }.map(&:first) and duplicates.any? -+ raise Gem::Security::Exception, "duplicate files in the package: (#{duplicates.map(&:inspect).join(', ')})" -+ end - end - - ## -@@ -616,6 +635,16 @@ def verify_gz entry # :nodoc: - raise Gem::Package::FormatError.new(e.message, entry.full_name) - end - -+ if File.respond_to? :realpath -+ def realpath file -+ File.realpath file -+ end -+ else -+ def realpath file -+ file -+ end -+ end -+ - end - - require 'rubygems/package/digest_io' -diff --git lib/rubygems/package/file_source.rb lib/rubygems/package/file_source.rb -index 1a4dc4c824..ecc3a68677 100644 ---- lib/rubygems/package/file_source.rb -+++ lib/rubygems/package/file_source.rb -@@ -23,11 +23,11 @@ def present? - end - - def with_write_io &block -- open path, 'wb', &block -+ File.open path, 'wb', &block - end - - def with_read_io &block -- open path, 'rb', &block -+ File.open path, 'rb', &block - end - - end -diff --git lib/rubygems/package/old.rb lib/rubygems/package/old.rb -index f6e6e67c38..322d682ca8 100644 ---- lib/rubygems/package/old.rb -+++ lib/rubygems/package/old.rb -@@ -80,7 +80,7 @@ def extract_files destination_dir - - FileUtils.mkdir_p File.dirname destination - -- open destination, 'wb', entry['mode'] do |out| -+ File.open destination, 'wb', entry['mode'] do |out| - out.write file_data - end - -diff --git lib/rubygems/package/tar_header.rb lib/rubygems/package/tar_header.rb -index c54bd14d57..d557357114 100644 ---- lib/rubygems/package/tar_header.rb -+++ lib/rubygems/package/tar_header.rb -@@ -104,25 +104,30 @@ def self.from(stream) - fields = header.unpack UNPACK_FORMAT - - new :name => fields.shift, -- :mode => fields.shift.oct, -- :uid => fields.shift.oct, -- :gid => fields.shift.oct, -- :size => fields.shift.oct, -- :mtime => fields.shift.oct, -- :checksum => fields.shift.oct, -+ :mode => strict_oct(fields.shift), -+ :uid => strict_oct(fields.shift), -+ :gid => strict_oct(fields.shift), -+ :size => strict_oct(fields.shift), -+ :mtime => strict_oct(fields.shift), -+ :checksum => strict_oct(fields.shift), - :typeflag => fields.shift, - :linkname => fields.shift, - :magic => fields.shift, -- :version => fields.shift.oct, -+ :version => strict_oct(fields.shift), - :uname => fields.shift, - :gname => fields.shift, -- :devmajor => fields.shift.oct, -- :devminor => fields.shift.oct, -+ :devmajor => strict_oct(fields.shift), -+ :devminor => strict_oct(fields.shift), - :prefix => fields.shift, - - :empty => empty - end - -+ def self.strict_oct(str) -+ return str.oct if str =~ /\A[0-7]*\z/ -+ raise ArgumentError, "#{str.inspect} is not an octal string" -+ end -+ - ## - # Creates a new TarHeader using +vals+ - -diff --git lib/rubygems/package/tar_writer.rb lib/rubygems/package/tar_writer.rb -index f68b8d4c5e..390f7851a3 100644 ---- lib/rubygems/package/tar_writer.rb -+++ lib/rubygems/package/tar_writer.rb -@@ -196,6 +196,8 @@ def add_file_signed name, mode, signer - digest_name == signer.digest_name - end - -+ raise "no #{signer.digest_name} in #{digests.values.compact}" unless signature_digest -+ - if signer.key then - signature = signer.sign signature_digest.digest - -diff --git lib/rubygems/request_set/lockfile.rb lib/rubygems/request_set/lockfile.rb -index 7f6eadb939..76ad17d486 100644 ---- lib/rubygems/request_set/lockfile.rb -+++ lib/rubygems/request_set/lockfile.rb -@@ -223,7 +223,7 @@ def to_s - def write - content = to_s - -- open "#{@gem_deps_file}.lock", 'w' do |io| -+ File.open "#{@gem_deps_file}.lock", 'w' do |io| - io.write content - end - end -diff --git lib/rubygems/security.rb lib/rubygems/security.rb -index 4690dd9230..236577c5a3 100644 ---- lib/rubygems/security.rb -+++ lib/rubygems/security.rb -@@ -578,7 +578,7 @@ def self.trusted_certificates &block - def self.write pemmable, path, permissions = 0600, passphrase = nil, cipher = KEY_CIPHER - path = File.expand_path path - -- open path, 'wb', permissions do |io| -+ File.open path, 'wb', permissions do |io| - if passphrase and cipher - io.write pemmable.to_pem cipher, passphrase - else -diff --git lib/rubygems/security/trust_dir.rb lib/rubygems/security/trust_dir.rb -index bf44975cc6..849cf3cd3e 100644 ---- lib/rubygems/security/trust_dir.rb -+++ lib/rubygems/security/trust_dir.rb -@@ -93,7 +93,7 @@ def trust_cert certificate - - destination = cert_path certificate - -- open destination, 'wb', @permissions[:trusted_cert] do |io| -+ File.open destination, 'wb', @permissions[:trusted_cert] do |io| - io.write certificate.to_pem - end - end -diff --git lib/rubygems/server.rb lib/rubygems/server.rb -index 93b3af36f8..62c3dfe9cf 100644 ---- lib/rubygems/server.rb -+++ lib/rubygems/server.rb -@@ -623,6 +623,18 @@ def root(req, res) - executables = nil if executables.empty? - executables.last["is_last"] = true if executables - -+ # Pre-process spec homepage for safety reasons -+ begin -+ homepage_uri = URI.parse(spec.homepage) -+ if [URI::HTTP, URI::HTTPS].member? homepage_uri.class -+ homepage_uri = spec.homepage -+ else -+ homepage_uri = "." -+ end -+ rescue URI::InvalidURIError -+ homepage_uri = "." -+ end -+ - specs << { - "authors" => spec.authors.sort.join(", "), - "date" => spec.date.to_s, -@@ -632,7 +644,7 @@ def root(req, res) - "only_one_executable" => (executables && executables.size == 1), - "full_name" => spec.full_name, - "has_deps" => !deps.empty?, -- "homepage" => spec.homepage, -+ "homepage" => homepage_uri, - "name" => spec.name, - "rdoc_installed" => Gem::RDoc.new(spec).rdoc_installed?, - "ri_installed" => Gem::RDoc.new(spec).ri_installed?, -diff --git lib/rubygems/source.rb lib/rubygems/source.rb -index bd84c217a7..b28b850660 100644 ---- lib/rubygems/source.rb -+++ lib/rubygems/source.rb -@@ -160,7 +160,7 @@ def fetch_spec name_tuple - if update_cache? then - FileUtils.mkdir_p cache_dir - -- open local_spec, 'wb' do |io| -+ File.open local_spec, 'wb' do |io| - io.write spec - end - end -diff --git lib/rubygems/specification.rb lib/rubygems/specification.rb -index efc08c4738..2560324b7a 100644 ---- lib/rubygems/specification.rb -+++ lib/rubygems/specification.rb -@@ -15,6 +15,7 @@ - require 'rubygems/stub_specification' - require 'rubygems/util/list' - require 'stringio' -+require 'uri' - - ## - # The Specification class contains the information for a Gem. Typically -@@ -2822,10 +2823,16 @@ def validate packaging = true - raise Gem::InvalidSpecificationException, "#{lazy} is not a summary" - end - -- if homepage and not homepage.empty? and -- homepage !~ /\A[a-z][a-z\d+.-]*:/i then -- raise Gem::InvalidSpecificationException, -- "\"#{homepage}\" is not a URI" -+ # Make sure a homepage is valid HTTP/HTTPS URI -+ if homepage and not homepage.empty? -+ begin -+ homepage_uri = URI.parse(homepage) -+ unless [URI::HTTP, URI::HTTPS].member? homepage_uri.class -+ raise Gem::InvalidSpecificationException, "\"#{homepage}\" is not a valid HTTP URI" -+ end -+ rescue URI::InvalidURIError -+ raise Gem::InvalidSpecificationException, "\"#{homepage}\" is not a valid HTTP URI" -+ end - end - - # Warnings -diff --git lib/rubygems/stub_specification.rb lib/rubygems/stub_specification.rb -index 8337375ab4..ae2effbc84 100644 ---- lib/rubygems/stub_specification.rb -+++ lib/rubygems/stub_specification.rb -@@ -113,6 +113,8 @@ def data - unless @data - begin - saved_lineno = $. -+ -+ # TODO It should be use `File.open`, but bundler-1.16.1 example expects Kernel#open. - open loaded_from, OPEN_MODE do |file| - begin - file.readline # discard encoding line -diff --git lib/rubygems/test_case.rb lib/rubygems/test_case.rb -index f7f216e5e3..39aa4fc9a7 100644 ---- lib/rubygems/test_case.rb -+++ lib/rubygems/test_case.rb -@@ -488,7 +488,7 @@ def git_gem name = 'a', version = 1 - - gemspec = "#{name}.gemspec" - -- open File.join(directory, gemspec), 'w' do |io| -+ File.open File.join(directory, gemspec), 'w' do |io| - io.write git_spec.to_ruby - end - -@@ -592,7 +592,7 @@ def mu_pp(obj) - # Reads a Marshal file at +path+ - - def read_cache(path) -- open path.dup.untaint, 'rb' do |io| -+ File.open path.dup.untaint, 'rb' do |io| - Marshal.load io.read - end - end -@@ -612,7 +612,7 @@ def write_file(path) - dir = File.dirname path - FileUtils.mkdir_p dir unless File.directory? dir - -- open path, 'wb' do |io| -+ File.open path, 'wb' do |io| - yield io if block_given? - end - -@@ -727,7 +727,7 @@ def install_default_gems(*specs) - install_default_specs(*specs) - - specs.each do |spec| -- open spec.loaded_from, 'w' do |io| -+ File.open spec.loaded_from, 'w' do |io| - io.write spec.to_ruby_for_cache - end - end -@@ -1363,7 +1363,7 @@ def save_gemspec name = 'a', version = 1, directory = '.' - yield specification if block_given? - end - -- open File.join(directory, "#{name}.gemspec"), 'w' do |io| -+ File.open File.join(directory, "#{name}.gemspec"), 'w' do |io| - io.write vendor_spec.to_ruby - end - -diff --git lib/rubygems/test_utilities.rb lib/rubygems/test_utilities.rb -index 686916ea02..83c9d2d0fe 100644 ---- lib/rubygems/test_utilities.rb -+++ lib/rubygems/test_utilities.rb -@@ -346,7 +346,7 @@ def spec name, version, dependencies = nil, &block - end - - def write_spec spec # :nodoc: -- open spec.spec_file, 'w' do |io| -+ File.open spec.spec_file, 'w' do |io| - io.write spec.to_ruby_for_cache - end - end -diff --git lib/rubygems/util.rb lib/rubygems/util.rb -index 2de45c900b..6c75910004 100644 ---- lib/rubygems/util.rb -+++ lib/rubygems/util.rb -@@ -114,7 +114,8 @@ def self.traverse_parents directory, &block - - here = File.expand_path directory - loop do -- Dir.chdir here, &block -+ Dir.chdir here, &block rescue Errno::EACCES -+ - new_here = File.expand_path('..', here) - return if new_here == here # toplevel - here = new_here -diff --git lib/rubygems/validator.rb lib/rubygems/validator.rb -index 83448229bb..6842e4fa9c 100644 ---- lib/rubygems/validator.rb -+++ lib/rubygems/validator.rb -@@ -34,7 +34,7 @@ def verify_gem(gem_data) - # gem_path:: [String] Path to gem file - - def verify_gem_file(gem_path) -- open gem_path, Gem.binary_mode do |file| -+ File.open gem_path, Gem.binary_mode do |file| - gem_data = file.read - verify_gem gem_data - end -@@ -109,7 +109,7 @@ def alien(gems=[]) - - good, gone, unreadable = nil, nil, nil, nil - -- open gem_path, Gem.binary_mode do |file| -+ File.open gem_path, Gem.binary_mode do |file| - package = Gem::Package.new gem_path - - good, gone = package.contents.partition { |file_name| -@@ -134,7 +134,7 @@ def alien(gems=[]) - - source = File.join gem_directory, entry['path'] - -- open source, Gem.binary_mode do |f| -+ File.open source, Gem.binary_mode do |f| - unless f.read == data then - errors[gem_name][entry['path']] = "Modified from original" - end -diff --git test/rubygems/test_gem.rb test/rubygems/test_gem.rb -index 8a11cc2ecf..183771f0f3 100644 ---- test/rubygems/test_gem.rb -+++ test/rubygems/test_gem.rb -@@ -7,7 +7,7 @@ - require 'tmpdir' - - # TODO: push this up to test_case.rb once battle tested --$SAFE=1 -+ - $LOAD_PATH.map! do |path| - path.dup.untaint - end -@@ -463,7 +463,7 @@ def test_self_ensure_gem_directories_missing_parents - assert File.directory?(util_cache_dir) - end - -- unless win_platform? then # only for FS that support write protection -+ unless win_platform? || Process.uid.zero? then # only for FS that support write protection - def test_self_ensure_gem_directories_write_protected - gemdir = File.join @tempdir, "egd" - FileUtils.rm_r gemdir rescue nil -@@ -775,7 +775,7 @@ def test_self_prefix_sitelibdir - end - - def test_self_read_binary -- open 'test', 'w' do |io| -+ File.open 'test', 'w' do |io| - io.write "\xCF\x80" - end - -@@ -1643,7 +1643,7 @@ def test_use_gemdeps - spec = Gem::Specification.find { |s| s == spec } - refute spec.activated? - -- open gem_deps_file, 'w' do |io| -+ File.open gem_deps_file, 'w' do |io| - io.write 'gem "a"' - end - -@@ -1662,7 +1662,7 @@ def test_use_gemdeps_ENV - - refute spec.activated? - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.write 'gem "a"' - end - -@@ -1706,7 +1706,7 @@ def test_use_gemdeps_automatic - - refute spec.activated? - -- open 'Gemfile', 'w' do |io| -+ File.open 'Gemfile', 'w' do |io| - io.write 'gem "a"' - end - -@@ -1735,7 +1735,7 @@ def test_use_gemdeps_disabled - - refute spec.activated? - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.write 'gem "a"' - end - -@@ -1750,7 +1750,7 @@ def test_use_gemdeps_missing_gem - skip 'Insecure operation - read' if RUBY_VERSION <= "1.8.7" - rubygems_gemdeps, ENV['RUBYGEMS_GEMDEPS'] = ENV['RUBYGEMS_GEMDEPS'], 'x' - -- open 'x', 'w' do |io| -+ File.open 'x', 'w' do |io| - io.write 'gem "a"' - end - -@@ -1791,7 +1791,7 @@ def test_use_gemdeps_specific - spec = Gem::Specification.find { |s| s == spec } - refute spec.activated? - -- open 'x', 'w' do |io| -+ File.open 'x', 'w' do |io| - io.write 'gem "a"' - end - -diff --git test/rubygems/test_gem_commands_cleanup_command.rb test/rubygems/test_gem_commands_cleanup_command.rb -index c55e195975..60d208fcc0 100644 ---- test/rubygems/test_gem_commands_cleanup_command.rb -+++ test/rubygems/test_gem_commands_cleanup_command.rb -@@ -158,7 +158,7 @@ def test_execute_all_user_no_sudo - assert_path_exists @a_1_1.gem_dir - ensure - FileUtils.chmod 0755, @gemhome -- end unless win_platform? -+ end unless win_platform? || Process.uid.zero? - - def test_execute_dry_run - @cmd.options[:args] = %w[a] -diff --git test/rubygems/test_gem_commands_install_command.rb test/rubygems/test_gem_commands_install_command.rb -index dd86a85038..822d40e3f3 100644 ---- test/rubygems/test_gem_commands_install_command.rb -+++ test/rubygems/test_gem_commands_install_command.rb -@@ -131,6 +131,7 @@ def test_execute_local_transitive_prerelease - - def test_execute_no_user_install - skip 'skipped on MS Windows (chmod has no effect)' if win_platform? -+ skip 'skipped in root privilege' if Process.uid.zero? - - specs = spec_fetcher do |fetcher| - fetcher.gem 'a', 2 -diff --git test/rubygems/test_gem_commands_owner_command.rb test/rubygems/test_gem_commands_owner_command.rb -index 44652c1093..53cac4ce87 100644 ---- test/rubygems/test_gem_commands_owner_command.rb -+++ test/rubygems/test_gem_commands_owner_command.rb -@@ -43,6 +43,31 @@ def test_show_owners - assert_match %r{- 4}, @ui.output - end - -+ def test_show_owners_dont_load_objects -+ skip "testing a psych-only API" unless defined?(::Psych::DisallowedClass) -+ -+ response = < 0 -- assert Gem::Specification.find_all_by_name('x').length == 0 -+ assert Gem::Specification.find_all_by_name('x').length.zero? - end - - def test_execute_all -diff --git test/rubygems/test_gem_dependency_installer.rb test/rubygems/test_gem_dependency_installer.rb -index e55cc75682..3d76291668 100644 ---- test/rubygems/test_gem_dependency_installer.rb -+++ test/rubygems/test_gem_dependency_installer.rb -@@ -424,7 +424,7 @@ def test_install_dependency_existing_extension - extconf_rb = File.join @gemhome, 'gems', 'e-1', 'extconf.rb' - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |io| -+ File.open extconf_rb, 'w' do |io| - io.write <<-EXTCONF_RB - require 'mkmf' - create_makefile 'e' -diff --git test/rubygems/test_gem_doctor.rb test/rubygems/test_gem_doctor.rb -index 39b8a11692..8db65d70ce 100644 ---- test/rubygems/test_gem_doctor.rb -+++ test/rubygems/test_gem_doctor.rb -@@ -24,7 +24,7 @@ def test_doctor - - FileUtils.rm b.spec_file - -- open c.spec_file, 'w' do |io| -+ File.open c.spec_file, 'w' do |io| - io.write 'this will raise an exception when evaluated.' - end - -@@ -77,7 +77,7 @@ def test_doctor_dry_run - - FileUtils.rm b.spec_file - -- open c.spec_file, 'w' do |io| -+ File.open c.spec_file, 'w' do |io| - io.write 'this will raise an exception when evaluated.' - end - -diff --git test/rubygems/test_gem_ext_builder.rb test/rubygems/test_gem_ext_builder.rb -index d142ef28da..3dabd3e350 100644 ---- test/rubygems/test_gem_ext_builder.rb -+++ test/rubygems/test_gem_ext_builder.rb -@@ -32,7 +32,7 @@ def test_class_make - results = [] - - Dir.chdir @ext do -- open 'Makefile', 'w' do |io| -+ File.open 'Makefile', 'w' do |io| - io.puts <<-MAKEFILE - all: - \t@#{Gem.ruby} -e "puts %Q{all: \#{ENV['DESTDIR']}}" -@@ -72,7 +72,7 @@ def test_class_make_no_clean - results = [] - - Dir.chdir @ext do -- open 'Makefile', 'w' do |io| -+ File.open 'Makefile', 'w' do |io| - io.puts <<-MAKEFILE - all: - \t@#{Gem.ruby} -e "puts %Q{all: \#{ENV['DESTDIR']}}" -@@ -107,7 +107,7 @@ def test_build_extensions - - extconf_rb = File.join ext_dir, 'extconf.rb' - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' - require 'mkmf' - -@@ -168,7 +168,7 @@ def Gem.install_extension_in_lib - - extconf_rb = File.join ext_dir, 'extconf.rb' - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' - require 'mkmf' - -@@ -290,7 +290,7 @@ def test_build_extensions_with_build_args - - FileUtils.mkdir_p @spec.gem_dir - -- open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| -+ File.open File.join(@spec.gem_dir, "extconf.rb"), "w" do |f| - f.write <<-'RUBY' - puts "IN EXTCONF" - extconf_args = File.join File.dirname(__FILE__), 'extconf_args' -@@ -323,7 +323,7 @@ def test_initialize - - build_info_file = File.join build_info_dir, "#{@spec.full_name}.info" - -- open build_info_file, 'w' do |io| -+ File.open build_info_file, 'w' do |io| - io.puts '--with-foo-dir=/nonexistent' - end - -diff --git test/rubygems/test_gem_gem_runner.rb test/rubygems/test_gem_gem_runner.rb -index 0a1faa404a..d68ac4da81 100644 ---- test/rubygems/test_gem_gem_runner.rb -+++ test/rubygems/test_gem_gem_runner.rb -@@ -1,38 +1,6 @@ - # frozen_string_literal: true - require 'rubygems/test_case' --begin -- gem_home_files = lambda{ -- if Dir.exist?(ENV["GEM_HOME"]) -- require "find" -- ary = Find.find(ENV["GEM_HOME"]).to_a -- else -- [] -- end -- } -- prev_gem_home = ENV["GEM_HOME"] -- prev_gem_home_files = gem_home_files.call -- prev_threads = Thread.list.map{|e| e.inspect} -- -- require 'rubygems/gem_runner' --ensure -- if $! -- msg = < 'KEY' } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path - -- open Gem.configuration.credentials_path, 'w' do |f| -+ File.open Gem.configuration.credentials_path, 'w' do |f| - f.write keys.to_yaml - end - -@@ -59,7 +59,7 @@ def test_api_key_override - keys = { :rubygems_api_key => 'KEY', :other => 'OTHER' } - FileUtils.mkdir_p File.dirname Gem.configuration.credentials_path - -- open Gem.configuration.credentials_path, 'w' do |f| -+ File.open Gem.configuration.credentials_path, 'w' do |f| - f.write keys.to_yaml - end - -@@ -163,7 +163,7 @@ def test_sign_in_with_other_credentials_doesnt_overwrite_other_keys - other_api_key = 'f46dbb18bb6a9c97cdc61b5b85c186a17403cdcbf' - - FileUtils.mkdir_p File.dirname(Gem.configuration.credentials_path) -- open Gem.configuration.credentials_path, 'w' do |f| -+ File.open Gem.configuration.credentials_path, 'w' do |f| - f.write Hash[:other_api_key, other_api_key].to_yaml - end - util_sign_in [api_key, 200, 'OK'] -diff --git test/rubygems/test_gem_indexer.rb test/rubygems/test_gem_indexer.rb -index a4a966e8de..5a9075e676 100644 ---- test/rubygems/test_gem_indexer.rb -+++ test/rubygems/test_gem_indexer.rb -@@ -39,8 +39,7 @@ def setup - - def test_initialize - assert_equal @tempdir, @indexer.dest_directory -- assert_equal File.join(Dir.tmpdir, "gem_generate_index_#{$$}"), -- @indexer.directory -+ assert_match %r{#{Dir.mktmpdir('gem_generate_index').match(/.*-/)}}, @indexer.directory - - indexer = Gem::Indexer.new @tempdir - assert indexer.build_modern -diff --git test/rubygems/test_gem_install_update_options.rb test/rubygems/test_gem_install_update_options.rb -index e2d546307d..371e408d27 100644 ---- test/rubygems/test_gem_install_update_options.rb -+++ test/rubygems/test_gem_install_update_options.rb -@@ -141,6 +141,8 @@ def test_user_install_enabled - def test_user_install_disabled_read_only - if win_platform? - skip('test_user_install_disabled_read_only test skipped on MS Windows') -+ elsif Process.uid.zero? -+ skip('test_user_install_disabled_read_only test skipped in root privilege') - else - @cmd.handle_options %w[--no-user-install] - -diff --git test/rubygems/test_gem_installer.rb test/rubygems/test_gem_installer.rb -index 39095c7dee..93b0482407 100644 ---- test/rubygems/test_gem_installer.rb -+++ test/rubygems/test_gem_installer.rb -@@ -140,7 +140,7 @@ def test_check_executable_overwrite_format_executable - s.require_path = 'lib' - end - -- open File.join(util_inst_bindir, 'executable'), 'w' do |io| -+ File.open File.join(util_inst_bindir, 'executable'), 'w' do |io| - io.write <<-EXEC - #!/usr/local/bin/ruby - # -@@ -437,6 +437,8 @@ def test_generate_bin_script_no_perms - - if win_platform? - skip('test_generate_bin_script_no_perms skipped on MS Windows') -+ elsif Process.uid.zero? -+ skip('test_generate_bin_script_no_perms skipped in root privilege') - else - FileUtils.chmod 0000, util_inst_bindir - -@@ -529,6 +531,8 @@ def test_generate_bin_symlink_no_perms - - if win_platform? - skip('test_generate_bin_symlink_no_perms skipped on MS Windows') -+ elsif Process.uid.zero? -+ skip('test_user_install_disabled_read_only test skipped in root privilege') - else - FileUtils.chmod 0000, util_inst_bindir - -diff --git test/rubygems/test_gem_package.rb test/rubygems/test_gem_package.rb -index cec1981c4c..d1664cf285 100644 ---- test/rubygems/test_gem_package.rb -+++ test/rubygems/test_gem_package.rb -@@ -24,7 +24,7 @@ def setup - end - - def test_class_new_old_format -- open 'old_format.gem', 'wb' do |io| -+ File.open 'old_format.gem', 'wb' do |io| - io.write SIMPLE_GEM - end - -@@ -45,7 +45,7 @@ def test_add_checksums - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -110,8 +110,8 @@ def test_add_files - - FileUtils.mkdir_p 'lib/empty' - -- open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end -- open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end -+ File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end -+ File.open 'lib/extra.rb', 'w' do |io| io.write '# lib/extra.rb' end - - package = Gem::Package.new 'bogus.gem' - package.spec = spec -@@ -140,7 +140,7 @@ def test_add_files_symlink - spec.files = %w[lib/code.rb lib/code_sym.rb] - - FileUtils.mkdir_p 'lib' -- open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end -+ File.open 'lib/code.rb', 'w' do |io| io.write '# lib/code.rb' end - - # NOTE: 'code.rb' is correct, because it's relative to lib/code_sym.rb - File.symlink('code.rb', 'lib/code_sym.rb') -@@ -179,7 +179,7 @@ def test_build - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -218,7 +218,7 @@ def test_build_auto_signed - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -261,7 +261,7 @@ def test_build_auto_signed_encrypted_key - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -311,7 +311,7 @@ def test_build_signed - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -348,7 +348,7 @@ def test_build_signed_encrypted_key - - FileUtils.mkdir 'lib' - -- open 'lib/code.rb', 'w' do |io| -+ File.open 'lib/code.rb', 'w' do |io| - io.write '# lib/code.rb' - end - -@@ -408,7 +408,7 @@ def test_extract_files_empty - end - end - -- open 'empty.gem', 'wb' do |io| -+ File.open 'empty.gem', 'wb' do |io| - io.write gem.string - end - -@@ -455,6 +455,31 @@ def test_extract_tar_gz_symlink_relative_path - File.read(extracted) - end - -+ def test_extract_symlink_parent -+ skip 'symlink not supported' if Gem.win_platform? -+ -+ package = Gem::Package.new @gem -+ -+ tgz_io = util_tar_gz do |tar| -+ tar.mkdir 'lib', 0755 -+ tar.add_symlink 'lib/link', '../..', 0644 -+ tar.add_file 'lib/link/outside.txt', 0644 do |io| io.write 'hi' end -+ end -+ -+ # Extract into a subdirectory of @destination; if this test fails it writes -+ # a file outside destination_subdir, but we want the file to remain inside -+ # @destination so it will be cleaned up. -+ destination_subdir = File.join @destination, 'subdir' -+ FileUtils.mkdir_p destination_subdir -+ -+ e = assert_raises Gem::Package::PathError do -+ package.extract_tar_gz tgz_io, destination_subdir -+ end -+ -+ assert_equal("installing into parent path lib/link/outside.txt of " + -+ "#{destination_subdir} is not allowed", e.message) -+ end -+ - def test_extract_tar_gz_directory - package = Gem::Package.new @gem - -@@ -566,6 +591,21 @@ def test_install_location_relative - "#{@destination} is not allowed", e.message) - end - -+ def test_install_location_suffix -+ package = Gem::Package.new @gem -+ -+ filename = "../#{File.basename(@destination)}suffix.rb" -+ -+ e = assert_raises Gem::Package::PathError do -+ package.install_location filename, @destination -+ end -+ -+ parent = File.expand_path File.join @destination, filename -+ -+ assert_equal("installing into parent path #{parent} of " + -+ "#{@destination} is not allowed", e.message) -+ end -+ - def test_load_spec - entry = StringIO.new Gem.gzip @spec.to_yaml - def entry.full_name() 'metadata.gz' end -@@ -620,7 +660,7 @@ def test_verify_checksum_bad - end - end - -- open 'mismatch.gem', 'wb' do |io| -+ File.open 'mismatch.gem', 'wb' do |io| - io.write gem.string - end - -@@ -670,7 +710,7 @@ def test_verify_checksum_missing - end - end - -- open 'data_checksum_missing.gem', 'wb' do |io| -+ File.open 'data_checksum_missing.gem', 'wb' do |io| - io.write gem.string - end - -@@ -723,6 +763,32 @@ def test_verify_nonexistent - assert_match %r%nonexistent.gem$%, e.message - end - -+ def test_verify_duplicate_file -+ FileUtils.mkdir_p 'lib' -+ FileUtils.touch 'lib/code.rb' -+ -+ build = Gem::Package.new @gem -+ build.spec = @spec -+ build.setup_signer -+ open @gem, 'wb' do |gem_io| -+ Gem::Package::TarWriter.new gem_io do |gem| -+ build.add_metadata gem -+ build.add_contents gem -+ -+ gem.add_file_simple 'a.sig', 0444, 0 -+ gem.add_file_simple 'a.sig', 0444, 0 -+ end -+ end -+ -+ package = Gem::Package.new @gem -+ -+ e = assert_raises Gem::Security::Exception do -+ package.verify -+ end -+ -+ assert_equal 'duplicate files in the package: ("a.sig")', e.message -+ end -+ - def test_verify_security_policy - skip 'openssl is missing' unless defined?(OpenSSL::SSL) - -@@ -773,14 +839,20 @@ def test_verify_security_policy_checksum_missing - FileUtils.mkdir 'lib' - FileUtils.touch 'lib/code.rb' - -- open @gem, 'wb' do |gem_io| -+ File.open @gem, 'wb' do |gem_io| - Gem::Package::TarWriter.new gem_io do |gem| - build.add_metadata gem - build.add_contents gem - - # write bogus data.tar.gz to foil signature - bogus_data = Gem.gzip 'hello' -- gem.add_file_simple 'data.tar.gz', 0444, bogus_data.length do |io| -+ fake_signer = Class.new do -+ def digest_name; 'SHA512'; end -+ def digest_algorithm; Digest(:SHA512); end -+ def key; 'key'; end -+ def sign(*); 'fake_sig'; end -+ end -+ gem.add_file_signed 'data2.tar.gz', 0444, fake_signer.new do |io| - io.write bogus_data - end - -@@ -804,7 +876,7 @@ def test_verify_security_policy_checksum_missing - end - - def test_verify_truncate -- open 'bad.gem', 'wb' do |io| -+ File.open 'bad.gem', 'wb' do |io| - io.write File.read(@gem, 1024) # don't care about newlines - end - -diff --git test/rubygems/test_gem_package_old.rb test/rubygems/test_gem_package_old.rb -index c15475b0c7..604981b3c1 100644 ---- test/rubygems/test_gem_package_old.rb -+++ test/rubygems/test_gem_package_old.rb -@@ -7,7 +7,7 @@ class TestGemPackageOld < Gem::TestCase - def setup - super - -- open 'old_format.gem', 'wb' do |io| -+ File.open 'old_format.gem', 'wb' do |io| - io.write SIMPLE_GEM - end - -diff --git test/rubygems/test_gem_package_tar_header.rb test/rubygems/test_gem_package_tar_header.rb -index d33877057d..43f508df45 100644 ---- test/rubygems/test_gem_package_tar_header.rb -+++ test/rubygems/test_gem_package_tar_header.rb -@@ -143,5 +143,26 @@ def test_update_checksum - assert_equal '012467', @tar_header.checksum - end - -+ def test_from_bad_octal -+ test_cases = [ -+ "00000006,44\000", # bogus character -+ "00000006789\000", # non-octal digit -+ "+0000001234\000", # positive sign -+ "-0000001000\000", # negative sign -+ "0x000123abc\000", # radix prefix -+ ] -+ -+ test_cases.each do |val| -+ header_s = @tar_header.to_s -+ # overwrite the size field -+ header_s[124, 12] = val -+ io = TempIO.new header_s -+ assert_raises ArgumentError do -+ new_header = Gem::Package::TarHeader.from io -+ end -+ io.close! if io.respond_to? :close! -+ end -+ end -+ - end - -diff --git test/rubygems/test_gem_rdoc.rb test/rubygems/test_gem_rdoc.rb -index 76ca8c45a9..0355883cb3 100644 ---- test/rubygems/test_gem_rdoc.rb -+++ test/rubygems/test_gem_rdoc.rb -@@ -223,6 +223,7 @@ def test_remove - - def test_remove_unwritable - skip 'chmod not supported' if Gem.win_platform? -+ skip 'skipped in root privilege' if Process.uid.zero? - FileUtils.mkdir_p @a.base_dir - FileUtils.chmod 0, @a.base_dir - -@@ -251,6 +252,7 @@ def test_setup - - def test_setup_unwritable - skip 'chmod not supported' if Gem.win_platform? -+ skip 'skipped in root privilege' if Process.uid.zero? - FileUtils.mkdir_p @a.doc_dir - FileUtils.chmod 0, @a.doc_dir - -diff --git test/rubygems/test_gem_remote_fetcher.rb test/rubygems/test_gem_remote_fetcher.rb -index ee5ac77717..20e34e84e1 100644 ---- test/rubygems/test_gem_remote_fetcher.rb -+++ test/rubygems/test_gem_remote_fetcher.rb -@@ -431,7 +431,7 @@ def test_download_install_dir - assert File.exist?(a1_cache_gem) - end - -- unless win_platform? # File.chmod doesn't work -+ unless win_platform? || Process.uid.zero? # File.chmod doesn't work - def test_download_local_read_only - FileUtils.mv @a1_gem, @tempdir - local_path = File.join @tempdir, @a1.file_name -diff --git test/rubygems/test_gem_request_set.rb test/rubygems/test_gem_request_set.rb -index 3a48827481..5dc6c1518d 100644 ---- test/rubygems/test_gem_request_set.rb -+++ test/rubygems/test_gem_request_set.rb -@@ -52,7 +52,7 @@ def test_install_from_gemdeps - rs = Gem::RequestSet.new - installed = [] - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "a"' - io.flush - -@@ -78,7 +78,7 @@ def test_install_from_gemdeps_explain - - rs = Gem::RequestSet.new - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "a"' - io.flush - -@@ -104,7 +104,7 @@ def test_install_from_gemdeps_install_dir - rs = Gem::RequestSet.new - installed = [] - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "a"' - end - -@@ -128,7 +128,7 @@ def test_install_from_gemdeps_local - - rs = Gem::RequestSet.new - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "a"' - io.flush - -@@ -150,7 +150,7 @@ def test_install_from_gemdeps_lockfile - rs = Gem::RequestSet.new - installed = [] - -- open 'gem.deps.rb.lock', 'w' do |io| -+ File.open 'gem.deps.rb.lock', 'w' do |io| - io.puts <<-LOCKFILE - GEM - remote: #{@gem_repo} -@@ -167,7 +167,7 @@ def test_install_from_gemdeps_lockfile - LOCKFILE - end - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts 'gem "b"' - end - -@@ -190,7 +190,7 @@ def test_install_from_gemdeps_version_mismatch - rs = Gem::RequestSet.new - installed = [] - -- open 'gem.deps.rb', 'w' do |io| -+ File.open 'gem.deps.rb', 'w' do |io| - io.puts <<-GEM_DEPS - gem "a" - ruby "0" -diff --git test/rubygems/test_gem_request_set_lockfile.rb test/rubygems/test_gem_request_set_lockfile.rb -index 908f97303e..7460b7efad 100644 ---- test/rubygems/test_gem_request_set_lockfile.rb -+++ test/rubygems/test_gem_request_set_lockfile.rb -@@ -31,7 +31,7 @@ def lockfile - def write_lockfile lockfile - @lock_file = File.expand_path "#{@gem_deps_file}.lock" - -- open @lock_file, 'w' do |io| -+ File.open @lock_file, 'w' do |io| - io.write lockfile - end - end -@@ -387,7 +387,7 @@ def test_to_s_git - s.add_dependency 'c', '~> 1.0' - end - -- open 'b.gemspec', 'w' do |io| -+ File.open 'b.gemspec', 'w' do |io| - io.write b.to_ruby - end - -@@ -400,7 +400,7 @@ def test_to_s_git - Dir.chdir 'c' do - c = Gem::Specification.new 'c', 1 - -- open 'c.gemspec', 'w' do |io| -+ File.open 'c.gemspec', 'w' do |io| - io.write c.to_ruby - end - -@@ -455,7 +455,7 @@ def test_write_error - - gem_deps_lock_file = "#{@gem_deps_file}.lock" - -- open gem_deps_lock_file, 'w' do |io| -+ File.open gem_deps_lock_file, 'w' do |io| - io.write 'hello' - end - -diff --git test/rubygems/test_gem_request_set_lockfile_parser.rb test/rubygems/test_gem_request_set_lockfile_parser.rb -index 9946c522d9..f3517da43a 100644 ---- test/rubygems/test_gem_request_set_lockfile_parser.rb -+++ test/rubygems/test_gem_request_set_lockfile_parser.rb -@@ -536,7 +536,7 @@ def test_parse_missing - end - - def write_lockfile lockfile -- open @lock_file, 'w' do |io| -+ File.open @lock_file, 'w' do |io| - io.write lockfile - end - end -diff --git test/rubygems/test_gem_request_set_lockfile_tokenizer.rb test/rubygems/test_gem_request_set_lockfile_tokenizer.rb -index ab506a14e6..f4aba6d94a 100644 ---- test/rubygems/test_gem_request_set_lockfile_tokenizer.rb -+++ test/rubygems/test_gem_request_set_lockfile_tokenizer.rb -@@ -295,7 +295,7 @@ def test_unget - end - - def write_lockfile lockfile -- open @lock_file, 'w' do |io| -+ File.open @lock_file, 'w' do |io| - io.write lockfile - end - end -diff --git test/rubygems/test_gem_resolver_git_specification.rb test/rubygems/test_gem_resolver_git_specification.rb -index 9e8e2c5715..211757eb20 100644 ---- test/rubygems/test_gem_resolver_git_specification.rb -+++ test/rubygems/test_gem_resolver_git_specification.rb -@@ -70,7 +70,7 @@ def test_install_extension - Dir.chdir 'git/a' do - FileUtils.mkdir_p 'ext/lib' - -- open 'ext/extconf.rb', 'w' do |io| -+ File.open 'ext/extconf.rb', 'w' do |io| - io.puts 'require "mkmf"' - io.puts 'create_makefile "a"' - end -diff --git test/rubygems/test_gem_server.rb test/rubygems/test_gem_server.rb -index 6fe02e480f..a018e65512 100644 ---- test/rubygems/test_gem_server.rb -+++ test/rubygems/test_gem_server.rb -@@ -100,7 +100,7 @@ def test_latest_specs_gemdirs - specs_dir = File.join dir, 'specifications' - FileUtils.mkdir_p specs_dir - -- open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| - io.write spec.to_ruby - end - -@@ -198,7 +198,7 @@ def test_quick_gemdirs - - FileUtils.mkdir_p specs_dir - -- open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| - io.write spec.to_ruby - end - -@@ -339,7 +339,7 @@ def test_root_gemdirs - specs_dir = File.join dir, 'specifications' - FileUtils.mkdir_p specs_dir - -- open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| - io.write spec.to_ruby - end - -@@ -353,6 +353,171 @@ def test_root_gemdirs - assert_match 'z 9', @res.body - end - -+ -+ def test_xss_homepage_fix_289313 -+ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" -+ dir = "#{@gemhome}2" -+ -+ spec = util_spec 'xsshomepagegem', 1 -+ spec.homepage = "javascript:confirm(document.domain)" -+ -+ specs_dir = File.join dir, 'specifications' -+ FileUtils.mkdir_p specs_dir -+ -+ open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ io.write spec.to_ruby -+ end -+ -+ server = Gem::Server.new dir, process_based_port, false -+ -+ @req.parse data -+ -+ server.root @req, @res -+ -+ assert_equal 200, @res.status -+ assert_match 'xsshomepagegem 1', @res.body -+ -+ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a -+ # valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here, -+ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be -+ # validated in future versions of Gem::Specification. -+ # -+ # There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex: -+ # -+ # Variant #1 - rdoc not installed -+ # -+ # xsshomepagegem 1 -+ # -+ # -+ # [rdoc] -+ # -+ # -+ # -+ # [www] -+ # -+ # Variant #2 - rdoc installed -+ # -+ # xsshomepagegem 1 -+ # -+ # -+ # \[rdoc\]<\/a> -+ # -+ # -+ # -+ # [www] -+ regex_match = /xsshomepagegem 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ -+ assert_match regex_match, @res.body -+ end -+ -+ def test_invalid_homepage -+ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" -+ dir = "#{@gemhome}2" -+ -+ spec = util_spec 'invalidhomepagegem', 1 -+ spec.homepage = "notavalidhomepageurl" -+ -+ specs_dir = File.join dir, 'specifications' -+ FileUtils.mkdir_p specs_dir -+ -+ open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ io.write spec.to_ruby -+ end -+ -+ server = Gem::Server.new dir, process_based_port, false -+ -+ @req.parse data -+ -+ server.root @req, @res -+ -+ assert_equal 200, @res.status -+ assert_match 'invalidhomepagegem 1', @res.body -+ -+ # This verifies that the homepage for this spec is not displayed and is set to ".", because it's not a -+ # valid HTTP/HTTPS URL and could be unsafe in an HTML context. We would prefer to throw an exception here, -+ # but spec.homepage is currently free form and not currently required to be a URL, this behavior may be -+ # validated in future versions of Gem::Specification. -+ # -+ # There are two variant we're checking here, one where rdoc is not present, and one where rdoc is present in the same regex: -+ # -+ # Variant #1 - rdoc not installed -+ # -+ # invalidhomepagegem 1 -+ # -+ # -+ # [rdoc] -+ # -+ # -+ # -+ # [www] -+ # -+ # Variant #2 - rdoc installed -+ # -+ # invalidhomepagegem 1 -+ # -+ # -+ # \[rdoc\]<\/a> -+ # -+ # -+ # -+ # [www] -+ regex_match = /invalidhomepagegem 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ -+ assert_match regex_match, @res.body -+ end -+ -+ def test_valid_homepage_http -+ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" -+ dir = "#{@gemhome}2" -+ -+ spec = util_spec 'validhomepagegemhttp', 1 -+ spec.homepage = "http://rubygems.org" -+ -+ specs_dir = File.join dir, 'specifications' -+ FileUtils.mkdir_p specs_dir -+ -+ open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ io.write spec.to_ruby -+ end -+ -+ server = Gem::Server.new dir, process_based_port, false -+ -+ @req.parse data -+ -+ server.root @req, @res -+ -+ assert_equal 200, @res.status -+ assert_match 'validhomepagegemhttp 1', @res.body -+ -+ regex_match = /validhomepagegemhttp 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ -+ assert_match regex_match, @res.body -+ end -+ -+ def test_valid_homepage_https -+ data = StringIO.new "GET / HTTP/1.0\r\n\r\n" -+ dir = "#{@gemhome}2" -+ -+ spec = util_spec 'validhomepagegemhttps', 1 -+ spec.homepage = "https://rubygems.org" -+ -+ specs_dir = File.join dir, 'specifications' -+ FileUtils.mkdir_p specs_dir -+ -+ open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ io.write spec.to_ruby -+ end -+ -+ server = Gem::Server.new dir, process_based_port, false -+ -+ @req.parse data -+ -+ server.root @req, @res -+ -+ assert_equal 200, @res.status -+ assert_match 'validhomepagegemhttps 1', @res.body -+ -+ regex_match = /validhomepagegemhttps 1<\/b>[\n\s]+(\[rdoc\]<\/span>|\[rdoc\]<\/a>)[\n\s]+\[www\]<\/a>/ -+ assert_match regex_match, @res.body -+ end -+ - def test_specs - data = StringIO.new "GET /specs.#{Gem.marshal_version} HTTP/1.0\r\n\r\n" - @req.parse data -@@ -378,7 +543,7 @@ def test_specs_gemdirs - specs_dir = File.join dir, 'specifications' - FileUtils.mkdir_p specs_dir - -- open File.join(specs_dir, spec.spec_name), 'w' do |io| -+ File.open File.join(specs_dir, spec.spec_name), 'w' do |io| - io.write spec.to_ruby - end - -diff --git test/rubygems/test_gem_source.rb test/rubygems/test_gem_source.rb -index 4a93e222f8..8805a9b404 100644 ---- test/rubygems/test_gem_source.rb -+++ test/rubygems/test_gem_source.rb -@@ -110,7 +110,7 @@ def test_fetch_spec_cached - - cache_file = File.join cache_dir, a1.spec_name - -- open cache_file, 'wb' do |io| -+ File.open cache_file, 'wb' do |io| - Marshal.dump a1, io - end - -@@ -163,7 +163,7 @@ def test_load_specs_cached - - cache_file = File.join cache_dir, "latest_specs.#{Gem.marshal_version}" - -- open cache_file, 'wb' do |io| -+ File.open cache_file, 'wb' do |io| - Marshal.dump latest_specs, io - end - -@@ -187,7 +187,7 @@ def test_load_specs_cached_empty - - cache_file = File.join cache_dir, "latest_specs.#{Gem.marshal_version}" - -- open cache_file, 'wb' do |io| -+ File.open cache_file, 'wb' do |io| - # Setup invalid data in the cache: - io.write Marshal.dump(latest_specs)[0, 10] - end -diff --git test/rubygems/test_gem_source_git.rb test/rubygems/test_gem_source_git.rb -index 0e13a11e7e..8f5d3ee745 100644 ---- test/rubygems/test_gem_source_git.rb -+++ test/rubygems/test_gem_source_git.rb -@@ -229,7 +229,7 @@ def test_specs - Dir.chdir 'b' do - b = Gem::Specification.new 'b', 1 - -- open 'b.gemspec', 'w' do |io| -+ File.open 'b.gemspec', 'w' do |io| - io.write b.to_ruby - end - -diff --git test/rubygems/test_gem_specification.rb test/rubygems/test_gem_specification.rb -index bb6acbc7de..badb297eee 100644 ---- test/rubygems/test_gem_specification.rb -+++ test/rubygems/test_gem_specification.rb -@@ -922,7 +922,7 @@ def test_self_load - end - - def test_self_load_relative -- open 'a-2.gemspec', 'w' do |io| -+ File.open 'a-2.gemspec', 'w' do |io| - io.write @a2.to_ruby_for_cache - end - -@@ -948,6 +948,9 @@ def test_self_load_tainted - @a2.files.clear - - assert_equal @a2, spec -+ -+ ensure -+ $SAFE = 0 - end - - def test_self_load_escape_curly -@@ -1111,7 +1114,7 @@ def test_self_remove_spec - end - - def test_self_remove_spec_removed -- open @a1.spec_file, 'w' do |io| -+ File.open @a1.spec_file, 'w' do |io| - io.write @a1.to_ruby - end - -@@ -1363,13 +1366,13 @@ def test_build_args - - assert_empty @ext.build_args - -- open @ext.build_info_file, 'w' do |io| -+ File.open @ext.build_info_file, 'w' do |io| - io.puts - end - - assert_empty @ext.build_args - -- open @ext.build_info_file, 'w' do |io| -+ File.open @ext.build_info_file, 'w' do |io| - io.puts '--with-foo-dir=wherever' - end - -@@ -1385,9 +1388,9 @@ def test_build_extensions - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -1435,9 +1438,9 @@ def test_build_extensions_default_gem - extconf_rb = File.join spec.gem_dir, spec.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" - end -@@ -1461,6 +1464,7 @@ def test_build_extensions_error - - def test_build_extensions_extensions_dir_unwritable - skip 'chmod not supported' if Gem.win_platform? -+ skip 'skipped in root privilege' if Process.uid.zero? - - ext_spec - -@@ -1469,9 +1473,9 @@ def test_build_extensions_extensions_dir_unwritable - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -1486,7 +1490,7 @@ def test_build_extensions_extensions_dir_unwritable - @ext.build_extensions - refute_path_exists @ext.extension_dir - ensure -- unless ($DEBUG or win_platform?) then -+ unless ($DEBUG or win_platform? or Process.uid.zero?) then - FileUtils.chmod 0755, File.join(@ext.base_dir, 'extensions') - FileUtils.chmod 0755, @ext.base_dir - end -@@ -1502,9 +1506,9 @@ def test_build_extensions_no_extensions_dir_unwritable - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -1551,9 +1555,9 @@ def test_build_extensions_preview - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -2882,7 +2886,22 @@ def test_validate_homepage - @a1.validate - end - -- assert_equal '"over at my cool site" is not a URI', e.message -+ assert_equal '"over at my cool site" is not a valid HTTP URI', e.message -+ -+ @a1.homepage = 'ftp://rubygems.org' -+ -+ e = assert_raises Gem::InvalidSpecificationException do -+ @a1.validate -+ end -+ -+ assert_equal '"ftp://rubygems.org" is not a valid HTTP URI', e.message -+ -+ @a1.homepage = 'http://rubygems.org' -+ assert_equal true, @a1.validate -+ -+ @a1.homepage = 'https://rubygems.org' -+ assert_equal true, @a1.validate -+ - end - end - -@@ -3418,9 +3437,9 @@ def test_missing_extensions_eh - extconf_rb = File.join @ext.gem_dir, @ext.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -diff --git test/rubygems/test_gem_stub_specification.rb test/rubygems/test_gem_stub_specification.rb -index 43680265c7..f9a3a236c0 100644 ---- test/rubygems/test_gem_stub_specification.rb -+++ test/rubygems/test_gem_stub_specification.rb -@@ -127,9 +127,9 @@ def test_missing_extensions_eh - extconf_rb = File.join s.gem_dir, s.extensions.first - FileUtils.mkdir_p File.dirname extconf_rb - -- open extconf_rb, 'w' do |f| -+ File.open extconf_rb, 'w' do |f| - f.write <<-'RUBY' -- open 'Makefile', 'w' do |f| -+ File.open 'Makefile', 'w' do |f| - f.puts "clean:\n\techo clean" - f.puts "default:\n\techo built" - f.puts "install:\n\techo installed" -@@ -149,7 +149,7 @@ def test_missing_extensions_eh_default_gem - spec = new_default_spec 'default', 1 - spec.extensions << 'extconf.rb' - -- open spec.loaded_from, 'w' do |io| -+ File.open spec.loaded_from, 'w' do |io| - io.write spec.to_ruby_for_cache - end - -@@ -198,7 +198,7 @@ def test_to_spec_missing_extensions - - def stub_with_version - spec = File.join @gemhome, 'specifications', 'stub_e-2.gemspec' -- open spec, 'w' do |io| -+ File.open spec, 'w' do |io| - io.write <<-STUB - # -*- encoding: utf-8 -*- - # stub: stub_v 2 ruby lib -@@ -221,7 +221,7 @@ def stub_with_version - - def stub_without_version - spec = File.join @gemhome, 'specifications', 'stub-2.gemspec' -- open spec, 'w' do |io| -+ File.open spec, 'w' do |io| - io.write <<-STUB - # -*- encoding: utf-8 -*- - # stub: stub_v ruby lib -@@ -245,7 +245,7 @@ def stub_without_version - - def stub_with_extension - spec = File.join @gemhome, 'specifications', 'stub_e-2.gemspec' -- open spec, 'w' do |io| -+ File.open spec, 'w' do |io| - io.write <<-STUB - # -*- encoding: utf-8 -*- - # stub: stub_e 2 ruby lib -@@ -271,7 +271,7 @@ def stub_with_extension - - def stub_without_extension - spec = File.join @gemhome, 'specifications', 'stub-2.gemspec' -- open spec, 'w' do |io| -+ File.open spec, 'w' do |io| - io.write <<-STUB - # -*- encoding: utf-8 -*- - # stub: stub 2 ruby lib -diff --git test/rubygems/test_gem_util.rb test/rubygems/test_gem_util.rb -index b85db44d51..3b7887d931 100644 ---- test/rubygems/test_gem_util.rb -+++ test/rubygems/test_gem_util.rb -@@ -5,6 +5,7 @@ - class TestGemUtil < Gem::TestCase - - def test_class_popen -+ skip "MJIT executes process and it's caught by Process.wait(-1)" if defined?(RubyVM::MJIT) && RubyVM::MJIT.enabled? - assert_equal "0\n", Gem::Util.popen(Gem.ruby, '-e', 'p 0') - - assert_raises Errno::ECHILD do -@@ -29,6 +30,30 @@ def test_traverse_parents - loop { break if enum.next.nil? } # exhaust the enumerator - end - -+ def test_traverse_parents_does_not_crash_on_permissions_error -+ skip 'skipped on MS Windows (chmod has no effect)' if win_platform? -+ -+ FileUtils.mkdir_p 'd/e/f' -+ # remove 'execute' permission from "e" directory and make it -+ # impossible to cd into it and its children -+ FileUtils.chmod(0666, 'd/e') -+ -+ paths = Gem::Util.traverse_parents('d/e/f').to_a -+ -+ assert_equal File.join(@tempdir, 'd'), paths[0] -+ assert_equal @tempdir, paths[1] -+ if File.respond_to?(:realpath) -+ assert_equal File.realpath(Dir.tmpdir), paths[2] -+ assert_equal File.realpath("..", Dir.tmpdir), paths[3] -+ elsif RUBY_PLATFORM !~ /darwin/ -+ assert_equal Dir.tmpdir, paths[2] -+ assert_equal '/', paths[3] -+ end -+ ensure -+ # restore default permissions, allow the directory to be removed -+ FileUtils.chmod(0775, 'd/e') unless win_platform? -+ end -+ - def test_linked_list_find - list = [1,2,3,4,5].inject(Gem::List.new(0)) { |m,o| - Gem::List.new o, m -diff --git test/rubygems/test_gem_version.rb test/rubygems/test_gem_version.rb -index 56c818663e..792ad5f084 100644 ---- test/rubygems/test_gem_version.rb -+++ test/rubygems/test_gem_version.rb -@@ -2,6 +2,8 @@ - require 'rubygems/test_case' - require "rubygems/version" - -+require "minitest/benchmark" -+ - class TestGemVersion < Gem::TestCase - - class V < ::Gem::Version -@@ -102,6 +104,15 @@ def test_initialize_invalid - end - end - -+ def bench_anchored_version_pattern -+ assert_performance_linear 0.5 do |count| -+ version_string = count.times.map {|i| "0" * i.succ }.join(".") << "." -+ version_string =~ Gem::Version::ANCHORED_VERSION_PATTERN -+ end -+ rescue RegexpError -+ skip "It fails to allocate the memory for regex pattern of Gem::Version::ANCHORED_VERSION_PATTERN" -+ end -+ - def test_empty_version - ["", " ", " "].each do |empty| - assert_equal "0", Gem::Version.new(empty).version -diff --git test/rubygems/test_require.rb test/rubygems/test_require.rb -index a846f46833..e292ce226d 100644 ---- test/rubygems/test_require.rb -+++ test/rubygems/test_require.rb -@@ -38,18 +38,6 @@ def assert_require(path) - assert require(path), "'#{path}' was already required" - end - -- def append_latch spec -- dir = spec.gem_dir -- Dir.chdir dir do -- spec.files.each do |file| -- File.open file, 'a' do |fp| -- fp.puts "FILE_ENTERED_LATCH.release" -- fp.puts "FILE_EXIT_LATCH.await" -- end -- end -- end -- end -- - # Providing -I on the commandline should always beat gems - def test_dash_i_beats_gems - a1 = new_spec "a", "1", {"b" => "= 1"}, "lib/test_gem_require_a.rb" -@@ -80,6 +68,17 @@ def test_dash_i_beats_gems - Object.send :remove_const, :HELLO if Object.const_defined? :HELLO - end - -+ def create_sync_thread -+ Thread.new do -+ begin -+ yield -+ ensure -+ FILE_ENTERED_LATCH.release -+ FILE_EXIT_LATCH.await -+ end -+ end -+ end -+ - def test_concurrent_require - skip 'deadlock' if /^1\.8\./ =~ RUBY_VERSION - -@@ -91,11 +90,8 @@ def test_concurrent_require - - install_specs a1, b1 - -- append_latch a1 -- append_latch b1 -- -- t1 = Thread.new { assert_require 'a' } -- t2 = Thread.new { assert_require 'b' } -+ t1 = create_sync_thread{ assert_require 'a' } -+ t2 = create_sync_thread{ assert_require 'b' } - - # wait until both files are waiting on the exit latch - FILE_ENTERED_LATCH.await -@@ -106,10 +102,8 @@ def test_concurrent_require - assert t1.join, "thread 1 should exit" - assert t2.join, "thread 2 should exit" - ensure -- return if $! # skipping -- -- Object.send :remove_const, :FILE_ENTERED_LATCH -- Object.send :remove_const, :FILE_EXIT_LATCH -+ Object.send :remove_const, :FILE_ENTERED_LATCH if Object.const_defined? :FILE_ENTERED_LATCH -+ Object.send :remove_const, :FILE_EXIT_LATCH if Object.const_defined? :FILE_EXIT_LATCH - end - - def test_require_is_not_lazy_with_exact_req diff --git a/sources b/sources index a289e4c..7ef486c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (ruby-2.5.0.tar.xz) = 55714a33d7661fe8b432f73c34fd67b49699f8b79df1cbd680a74899124d31111ab0f444677672aac1ba725820182940d485efb2db0bf2bc96737c5d40c54578 +SHA512 (ruby-2.5.1.tar.xz) = 31bacf58469953282cd5d8b51862dcf4b84dedb927c1871bc3fca32fc157fe49187631575a70838705fe246f4555647577a7ecc26894445a7d64de5503dc11b4 From 1085ba2aed03b62ca051d7d23627fede1fd5a7f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 10 Apr 2018 09:07:02 +0200 Subject: [PATCH 524/529] Conflict requirement needs to generate dependency. If there is only conflict requirement, this still menas that there is dependency on that package and appropriate requirement must be generated (rhbz#1561487) --- ruby.spec | 3 +++ rubygems.req | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 757cc97..955810a 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1067,6 +1067,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Tue Apr 10 2018 V鱈t Ondruch - 2.5.1-92 +- Conflict requirement needs to generate dependency. + * Thu Mar 29 2018 Pavel Valena - 2.5.1-92 - Update to Ruby 2.5.1. diff --git a/rubygems.req b/rubygems.req index 6868bdd..d75247d 100644 --- a/rubygems.req +++ b/rubygems.req @@ -11,7 +11,13 @@ module RubyGemsReq when '~>' expand_pessimistic_requirement(r) when '!=' - [] + # If there is only the conflict requirement, we still need to depend + # on the specified gem. + if requirements.size == 1 + Gem::Requirement.default.requirements + else + [] + end else [r] end From 51449f1f93ec716ae6b3b63fc0d74dd3dbbda060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Tue, 10 Apr 2018 09:09:46 +0200 Subject: [PATCH 525/529] Revert "Use --with-setjmp-type=setjmp on aarch64 to work around gcc issue (#1545239)" This reverts commit a3207ebb169bacb722745448c114f015d63cd25c. This should not be needed, since changes in GCC were reverted. --- ruby.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ruby.spec b/ruby.spec index 955810a..57e522c 100644 --- a/ruby.spec +++ b/ruby.spec @@ -554,9 +554,6 @@ autoconf --with-ruby-version='' \ --enable-multiarch \ --with-prelude=./abrt_prelude.rb \ -%ifarch aarch64 - --with-setjmp-type=setjmp \ -%endif # Q= makes the build output more verbose and allows to check Fedora # compiler options. @@ -1069,6 +1066,7 @@ make check TESTS="-v $DISABLE_TESTS" %changelog * Tue Apr 10 2018 V鱈t Ondruch - 2.5.1-92 - Conflict requirement needs to generate dependency. +- Stop using --with-setjmp-type=setjmp on aarch64 (rhbz#1545239). * Thu Mar 29 2018 Pavel Valena - 2.5.1-92 - Update to Ruby 2.5.1. From b0274e84e7e7b785de4298225b20f2b7d8638c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 11 Apr 2018 17:55:12 +0200 Subject: [PATCH 526/529] Remove comment which does not apply anymore. rhbz#1565960 --- ruby.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/ruby.spec b/ruby.spec index fb10f6e..3adeff0 100644 --- a/ruby.spec +++ b/ruby.spec @@ -292,8 +292,6 @@ Requires: ruby(release) Requires: ruby(rubygems) >= %{rubygems_version} Requires: ruby(irb) = %{irb_version} Requires: rubygem(io-console) >= %{io_console_version} -# Hardcode the dependency to keep it compatible with dependencies of the -# official rubygem-rdoc gem. Requires: rubygem(json) >= %{json_version} Provides: rdoc = %{version}-%{release} Provides: ri = %{version}-%{release} From bee5851fb0985cbe31515cd2addafec081809b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 2 May 2018 17:00:36 +0200 Subject: [PATCH 527/529] Make %gemspec_{add,remove}_dep modify .gemspec provided by %setup macro. The macros need to be udpated, since RPM 4.14+ can expand .gem files and also also provide %{gem_name}.gemspec file used to rebuild the gem. However, the .gemspec file is not in current directory, but directly in %{_builddir}. --- macros.rubygems | 4 ++-- ruby.spec | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/macros.rubygems b/macros.rubygems index 0652ec6..2cb96a6 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -60,7 +60,7 @@ gem install \\\ # %gemspec_add_dep(g:s:d) \ read -d '' gemspec_add_dep_script << 'EOR' || : \ - gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + gemspec_file = '%{-s*}%{!?-s:%{_builddir}/%{gem_name}-%{version}.gemspec}' \ \ name = '%{-g*}' \ requirements = %{*}%{!?1:nil} \ @@ -97,7 +97,7 @@ unset -v gemspec_add_dep_script \ # %gemspec_remove_dep(g:s:d) \ read -d '' gemspec_remove_dep_script << 'EOR' || : \ - gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \ + gemspec_file = '%{-s*}%{!?-s:%{_builddir}/%{gem_name}-%{version}.gemspec}' \ \ name = '%{-g*}' \ requirements = %{*}%{!?1:nil} \ diff --git a/ruby.spec b/ruby.spec index 3adeff0..bfde4a1 100644 --- a/ruby.spec +++ b/ruby.spec @@ -21,7 +21,7 @@ %endif -%global release 92 +%global release 93 %{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}} # The RubyGems library has to stay out of Ruby directory three, since the @@ -1068,6 +1068,9 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Wed May 02 2018 V鱈t Ondruch - 2.5.1-93 +- Make %%gemspec_{add,remove}_dep modify .gemspec provided by %%setup macro. + * Tue Apr 10 2018 V鱈t Ondruch - 2.5.1-92 - Conflict requirement needs to generate dependency. - Stop using --with-setjmp-type=setjmp on aarch64 (rhbz#1545239). From 561c76845a4c29e811808e50d259956cbff7ab08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Thu, 3 May 2018 15:16:00 +0200 Subject: [PATCH 528/529] Fix typos in macro description. --- macros.rubygems | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros.rubygems b/macros.rubygems index 2cb96a6..b4dfc92 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -42,8 +42,8 @@ gem install \\\ } -# The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not -# essential, but it is usefull to make the sript appear in build log. +# The 'read' command in gemspec_add_dep and gemspec_remove_dep macros is not +# essential, but it is usefull to make the script appear in build log. # %gemspec_add_dep - Add dependency into .gemspec. From 8ef3cc0ed4d2f8626492b3f16157ab890017f210 Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Thu, 3 May 2018 14:53:28 +0200 Subject: [PATCH 529/529] Add macros to edit files lists in .gemspec %gemspec_add_file and %gemspec_remove_file. --- macros.rubygems | 69 +++++++++++++++++++++++++++++++++++++++++++++++-- ruby.spec | 4 +++ 2 files changed, 71 insertions(+), 2 deletions(-) diff --git a/macros.rubygems b/macros.rubygems index b4dfc92..d2e8514 100644 --- a/macros.rubygems +++ b/macros.rubygems @@ -42,8 +42,8 @@ gem install \\\ } -# The 'read' command in gemspec_add_dep and gemspec_remove_dep macros is not -# essential, but it is usefull to make the script appear in build log. +# The 'read' command in %%gemspec_* macros is not essential, but it is usefull +# to make the sript appear in build log. # %gemspec_add_dep - Add dependency into .gemspec. @@ -128,3 +128,68 @@ EOR\ echo "$gemspec_remove_dep_script" | ruby \ unset -v gemspec_remove_dep_script \ %{nil} + + +# %%gemspec_add_file - Add files to various files lists in .gemspec. +# +# Usage: %%gemspec_add_file [options] +# +# Add files to .gemspec file. is expected to be valid Ruby code. +# Path to file is expected. Does not check real files in any way. +# By default, `files` list is edited. +# +# -s Overrides the default .gemspec location. +# -t Edit test_files only. +# -r Edit extra_rdoc_files only. +# +%gemspec_add_file(s:tr) \ +read -d '' gemspec_add_file_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:%{_builddir}/%{gem_name}-%{version}.gemspec}' \ + \ + abort("gemspec_add_file: Use only one '-t' or '-r' at a time.") if "%{?-t}%{?-r}" == "-t-r" \ + \ + filenames = %{*}%{!?1:nil} \ + filenames = Array(filenames) \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + spec.%{?-t:test_}%{?-r:extra_rdoc_}files += filenames \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_add_file_script" | ruby \ +unset -v gemspec_add_file_script \ +%{nil} + + +# %%gemspec_remove_file - Remove files from various files lists in .gemspec. +# +# Usage: %%gemspec_remove_file [options] +# +# Remove files from .gemspec file. is expected to be valid Ruby code. +# Path to file is expected. Does not check/remove real files in any way. +# By default, `files` list is edited. File has to be removed from `test_files` +# first in order to be removable from `files`. +# +# -s Overrides the default .gemspec location. +# -t Edit test_files only. +# -r Edit extra_rdoc_files only. +# +%gemspec_remove_file(s:tr) \ +read -d '' gemspec_remove_file_script << 'EOR' || : \ + gemspec_file = '%{-s*}%{!?-s:%{_builddir}/%{gem_name}-%{version}.gemspec}' \ + \ + abort("gemspec_remove_file: Use only one '-t' or '-r' at a time.") if "%{?-t}%{?-r}" == "-t-r" \ + \ + filenames = %{*}%{!?1:nil} \ + filenames = Array(filenames) \ + \ + spec = Gem::Specification.load(gemspec_file) \ + abort("#{gemspec_file} is not accessible.") unless spec \ + \ + spec.%{?-t:test_}%{?-r:extra_rdoc_}files -= filenames \ + File.write gemspec_file, spec.to_ruby \ +EOR\ +echo "$gemspec_remove_file_script" | ruby \ +unset -v gemspec_remove_file_script \ +%{nil} diff --git a/ruby.spec b/ruby.spec index bfde4a1..99ef23e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1068,6 +1068,10 @@ make check TESTS="-v $DISABLE_TESTS" %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec %changelog +* Thu May 10 2018 Pavel Valena - 2.5.1-93 +- Add macros to edit files lists in .gemspec + (gemspec_add_file and gemspec_remove_file). + * Wed May 02 2018 V鱈t Ondruch - 2.5.1-93 - Make %%gemspec_{add,remove}_dep modify .gemspec provided by %%setup macro.