diff --git a/ruby-1.8.7-p72_topdir.patch b/ruby-1.8.7-p72_topdir.patch new file mode 100644 index 0000000..3cd00f9 --- /dev/null +++ b/ruby-1.8.7-p72_topdir.patch @@ -0,0 +1,29 @@ +Index: mkconfig.rb +=================================================================== +--- mkconfig.rb.orig 2008-11-21 19:55:28.000000000 +0100 ++++ mkconfig.rb 2008-11-21 20:34:41.653180779 +0100 +@@ -22,6 +22,7 @@ def (config = "").write(arg) + end + $stdout = config + ++configured_prefix = "" + fast = {'prefix'=>TRUE, 'ruby_install_name'=>TRUE, 'INSTALL'=>TRUE, 'EXEEXT'=>TRUE} + print %[ + # This file was created by #{mkconfig} when ruby was built. Any +@@ -86,6 +87,7 @@ File.foreach "config.status" do |line| + val.gsub!(/ +(?!-)/, "=") if name == "configure_args" && /mswin32/ =~ RUBY_PLATFORM + val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump + if /^prefix$/ =~ name ++ configured_prefix = val + val = "(TOPDIR || DESTDIR + #{val})" + end + v = " CONFIG[\"#{name}\"] #{vars[name] ? '<< "\n"' : '='} #{val}\n" +@@ -103,7 +105,7 @@ end + drive = File::PATH_SEPARATOR == ';' + + prefix = '/lib/ruby/' + RUBY_VERSION.sub(/\.\d+$/, '') + '/' + RUBY_PLATFORM +-print " TOPDIR = File.dirname(__FILE__).chomp!(#{prefix.dump})\n" ++print " TOPDIR = #{configured_prefix}\n" + print " DESTDIR = ", (drive ? "TOPDIR && TOPDIR[/\\A[a-z]:/i] || " : ""), "'' unless defined? DESTDIR\n" + print " CONFIG = {}\n" + print " CONFIG[\"DESTDIR\"] = DESTDIR\n" diff --git a/ruby.changes b/ruby.changes index 905ecf2..85e2b26 100644 --- a/ruby.changes +++ b/ruby.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Fri Nov 21 20:37:17 CET 2008 - mrueckert@suse.de + +- add ruby-1.8.7-p72_topdir.patch: + Config::TOPDIR was broken on lib64 systems as the code was + assuming $prefix/lib. + +------------------------------------------------------------------- +Fri Nov 21 17:03:25 CET 2008 - mrueckert@suse.de + +- added more ruby macros in /etc/rpm/macros.ruby + ------------------------------------------------------------------- Sat Sep 6 06:56:56 CEST 2008 - mrueckert@suse.de diff --git a/ruby.macros b/ruby.macros new file mode 100644 index 0000000..49861ac --- /dev/null +++ b/ruby.macros @@ -0,0 +1,14 @@ +%rb_arch %(echo %{_host_cpu}-linux | sed -e "s/i686/i586/" -e "s/armv5tel/armv4l/" -e "s/hppa2.0/hppa/") +%rb_ver %(/usr/bin/ruby -e 'puts VERSION.sub(/\\\.\\\d$/, "")') +# +%rb_dir %{_libdir}/ruby/ +%rb_libdir %{_libdir}/ruby/%{rb_ver}/ +%rb_archdir %{_libdir}/ruby/%{rb_ver}/%{rb_arch} +# +%rb_sitedir %{_libdir}/ruby/site_ruby +%rb_sitelib %{rb_sitedir}/%{rb_ver} +%rb_sitearch %{rb_sitedir}/%{rb_ver}/%{rb_arch} +# +%rb_vendordir %{_libdir}/ruby/vendor_ruby +%rb_vendorlib %{rb_vendordir}/%{rb_ver} +%rb_vendorarch %{rb_vendordir}/%{rb_ver}/%{rb_arch} diff --git a/ruby.spec b/ruby.spec index aeeb7fb..9002299 100644 --- a/ruby.spec +++ b/ruby.spec @@ -20,7 +20,7 @@ Name: ruby Version: 1.8.7.p72 -Release: 1 +Release: 5 # %define pkg_version 1.8.7 %define patch_level p72 @@ -61,12 +61,14 @@ Patch3: ruby-1.8.6.p36_socket_ipv6.patch Patch5: ruby_1.8.6.p36_date_remove_privat.patch Patch6: ruby-pedantic-headers.diff Patch7: ruby-1.8.7-p72_vendor_specific.patch +Patch8: ruby-1.8.7-p72_topdir.patch # vendor ruby files taken from: # http://svn.macports.org/repository/macports/trunk/dports/lang/ruby/ Source3: site-specific.rb Source4: vendor-specific.rb # Source5: ruby-rpmlintrc +Source6: ruby.macros %if 0%{?with_bleak_house} #Source6: bleak_house-%{bleak_house_version}.tar.bz2 %endif @@ -235,6 +237,7 @@ Authors: %patch5 %patch6 %patch7 +%patch8 %if 0%{?with_bleak_house} for patch in valgrind configure gc ; do patch -p0 < bleak_house-%{bleak_house_version}/ruby/${patch}.patch @@ -342,6 +345,7 @@ sed -i "s@#!\s*\./miniruby@#!/usr/bin/ruby@" runruby.rb %fdupes %{buildroot} %endif chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h +%{__install} -D -m 0644 %{S:6} %{buildroot}/etc/rpm/macros.ruby %post -p /sbin/ldconfig @@ -349,6 +353,7 @@ chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h %files %defattr(-,root,root) +%config(noreplace) /etc/rpm/macros.ruby %{_bindir}/* %dir %{_libdir}/%{name} %dir %{_libdir}/%{name}/%{rb_ver} @@ -518,6 +523,12 @@ chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h %doc %{_docdir}/%{name}/examples %changelog +* Fri Nov 21 2008 mrueckert@suse.de +- add ruby-1.8.7-p72_topdir.patch: + Config::TOPDIR was broken on lib64 systems as the code was + assuming $prefix/lib. +* Fri Nov 21 2008 mrueckert@suse.de +- added more ruby macros in /etc/rpm/macros.ruby * Sat Sep 06 2008 mrueckert@suse.de - update to 1.8.7p72 vendor_ruby support now officially included @@ -539,7 +550,7 @@ chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h - Fixes File access vulnerability of WEBrick (CVE-2008-1145) (bnc#368618) - ensure that the rss module adds the xml namespace -* Fri Dec 07 2007 mrueckert@suse.de +* Thu Dec 06 2007 mrueckert@suse.de - update to 1.8.6.p111 bugfix release. important changes: - ssl fixes (see notes on the ssl patch below) @@ -574,7 +585,7 @@ chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h * avoid executing shell in the testsuite * moved definition of rb_thread_status() to avoid errors in C++ extensions. -* Mon Aug 06 2007 mrueckert@suse.de +* Sun Aug 05 2007 mrueckert@suse.de - update to 1.8.6.p36: many bugfixes and library updates. hilights: === Library updates (outstanding ones only) @@ -788,7 +799,7 @@ chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h this leads to trouble with our build system. * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires -* Mon Jan 16 2006 kukuk@suse.de +* Sun Jan 15 2006 kukuk@suse.de - Use eaccess() from glibc [#143291] * Sun Jan 15 2006 mrueckert@suse.de - disabled the big test suite as we trigger @@ -797,7 +808,7 @@ chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h - Update to 1.8.4 - dont run with --default-kcode=utf8 triggers a bug in the test suite -* Fri Sep 23 2005 mrueckert@suse.de +* Thu Sep 22 2005 mrueckert@suse.de - update to 1.8.3 - updated patches for 1.8.3 - ruby-doc tarball now included as tar.bz2 @@ -857,7 +868,7 @@ chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h * Mon Feb 02 2004 mge@suse.de - update to 1.8.1 also fixes Bug #34226: Readline support missing from ruby -* Sun Jan 11 2004 adrian@suse.de +* Sat Jan 10 2004 adrian@suse.de - add %%defattr * Mon Aug 04 2003 mge@suse.de - update tp 1.8.0 @@ -896,7 +907,7 @@ chmod -v a-x %{buildroot}%{_libdir}/ruby/%{rb_ver}/%{rb_arch}/*.h * Wed Dec 13 2000 schwab@suse.de - Add %%suse_update_config. - Fix computation of stack limit. -* Tue Dec 05 2000 mge@suse.de +* Mon Dec 04 2000 mge@suse.de - update to 1.6.1, manual 1.4.6 * Thu Jul 06 2000 mge@suse.de - initial SuSE RPM