diff --git a/.gitignore b/.gitignore index 89ca5b2..a4c19e9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,9 @@ 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 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-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 144339d..f8c992b 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 352 %global dotpatchlevel %{?_patchlevel:.%{_patchlevel}} %global patchlevel %{?_patchlevel:-p%{_patchlevel}} @@ -11,12 +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 ruby_tk_git_revision 415a3ef9ab82c65a7abc +%global _normalized_cpu %(echo %{_target_cpu} | sed 's/^ppc/powerpc/;s/i.86/i386/;s/sparcv./sparc/;s/armv.*/arm/') +# 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/ @@ -51,12 +52,15 @@ 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 # 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 @@ -177,6 +181,7 @@ pushd %{name}-%{arcver} %patch23 -p1 %patch29 -p1 %patch33 -p1 +%patch34 -p1 %patch100 -p1 ( @@ -184,10 +189,18 @@ 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 +# 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 @@ -229,6 +242,30 @@ 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.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 diff --git a/sources b/sources index bc9abd7..e7e916e 100644 --- a/sources +++ b/sources @@ -1,2 +1,4 @@ -244439a87d75ab24170a9c2b451ce351 ruby-1.8.7-p299.tar.bz2 -b49ba42587b06e5f23501456e29a6d18 ruby-rev415a3ef9ab82c65a7abc-ext_tk.tar.gz +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