Compare commits

...
Sign in to create a new pull request.

7 commits

Author SHA1 Message Date
Mamoru Tasaka
93f97e065c 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)
2011-07-16 10:32:19 +09:00
Dennis Gilmore
5c73b3c931 normalise arm cpu names to arm 2011-07-11 17:44:01 -05:00
Mamoru Tasaka
70c10be3b2 Update to 1.8.7 p334 2011-02-19 19:34:14 +09:00
Mamoru Tasaka
06b3a6fcb7 - Update to 1.8.7 p330
- ext/tk updated to the newest header
2010-12-26 03:12:47 +09:00
Mamoru Tasaka
c94d90b46b - Avoid multilib conflict on -libs subpackage (bug 649174) 2010-11-04 04:26:13 +09:00
Mamoru Tasaka
a99c84603d - Update to 1.8.7.302
- CVE-2010-0541 (bug 587731) is fixed in this version
- Update ext/tk to the latest head
2010-08-23 02:27:15 +09:00
Mamoru Tasaka
fc0fbc1a95 * Mon Aug 2 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.8.7.299-5
- More cleanup of spec file, expecially for rpmlint issue
- build ri files in %build
2010-08-02 02:38:02 +09:00
5 changed files with 194 additions and 20 deletions

7
.gitignore vendored
View file

@ -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

View file

@ -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"

View file

@ -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 {

114
ruby.spec
View file

@ -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 <<EOF
require 'rbconfig'
dlconfig_path=File.join(File.dirname(__FILE__), Config::CONFIG['arch'], 'dlconfig')
require dlconfig_path
EOF
popd
# 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 +298,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 +312,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 +363,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 {} \;
@ -402,7 +437,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
@ -499,6 +537,46 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/ri
%changelog
* Sat Jul 16 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 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 <mtasaka@fedoraproject.org> - 1.8.7.334-4
- Once fix FTBFS (bug 716021)
* Mon Jul 11 2011 Dennis Gilmore <dennis@ausil.us> - 1.8.7.334-3
- normalise arm cpus to arm
* Mon May 30 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1.8.7.334-2
- Own %%{_normalized_cpu}-%%{_target_os} directory (bug 708816)
* Sat Feb 19 2011 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.8.7.334-1
- Update to 1.8.7 p334
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.8.7.330-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sun Jan 02 2011 Dennis Gilmore <dennis@ausil.us> - 1.8.7.330-2
- nomalise the 32 bit sparc archs to sparc
* Sun Dec 26 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.8.7.330-1
- Update to 1.8.7 p330
- ext/tk updated to the newest header
* Thu Nov 4 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.8.7.302-2
- Avoid multilib conflict on -libs subpackage (bug 649174)
* Mon Aug 23 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 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 <mtasaka@ioa.s.u-tokyo.ac.jp> - 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 <mtasaka@ioa.s.u-tokyo.ac.jp> - 1.8.7.299-4
- Cleanup spec file
- Make -irb, -rdoc subpackage noarch

View file

@ -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