From 5391cf02dd995b02daddc51b773b2c1d4775f095 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Fri, 23 Oct 2026 13:45:19 +0200 Subject: [PATCH] - merged 3.4.9 from PLD, TLDized --- archlibdir.patch | 14 +- custom-rubygems-location.patch | 54 +- duplicated-paths.patch | 19 +- extract-gem-versions.sh | 92 +++ fix-bison-invocation.patch | 11 - mkmf-verbose.patch | 4 +- operating_system.rb | 9 +- rdoc.1 | 252 ------ ruby-version.patch | 165 ++-- ruby.spec | 1009 ++++++++++++------------ rubygems-2.0.0-binary-extensions.patch | 344 -------- rubygems.patch | 11 - strip-ccache.patch | 22 +- testrb.1 | 60 -- 14 files changed, 718 insertions(+), 1348 deletions(-) create mode 100644 extract-gem-versions.sh delete mode 100644 fix-bison-invocation.patch delete mode 100644 rdoc.1 delete mode 100644 rubygems-2.0.0-binary-extensions.patch delete mode 100644 rubygems.patch delete mode 100644 testrb.1 diff --git a/archlibdir.patch b/archlibdir.patch index 43fa7f6..116bb66 100644 --- a/archlibdir.patch +++ b/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 -@@ -3632,6 +3632,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 +@@ -3085,6 +3085,11 @@ AS_IF([test ${multiarch+set}], [ + ]) archlibdir='${libdir}/${arch}' +AC_ARG_WITH(archlibdir, diff --git a/custom-rubygems-location.patch b/custom-rubygems-location.patch index e82f172..0cb2012 100644 --- a/custom-rubygems-location.patch +++ b/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.tmpl | 3 +++ - tool/rbinstall.rb | 9 +++++++++ - 4 files changed, 21 insertions(+) + configure.ac | 5 +++++ + loadpath.c | 4 ++++ + template/verconf.h.tmpl | 3 +++ + tool/rbinstall.rb | 10 ++++++++++ + 4 files changed, 22 insertions(+) -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, +diff --git a/configure.ac b/configure.ac +index 93af30321d..bc13397e0e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4232,6 +4232,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='' -@@ -4288,6 +4292,7 @@ AC_SUBST(sitearchdir)dnl +@@ -4256,6 +4260,7 @@ AC_SUBST(sitearchdir)dnl AC_SUBST(vendordir)dnl AC_SUBST(vendorlibdir)dnl AC_SUBST(vendorarchdir)dnl @@ -64,33 +64,31 @@ index 79c003e..34f2382 100644 % R = {} % R["ruby_version"] = '"RUBY_LIB_VERSION"' diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb -index b47b6e1..0b99408 100755 +index e9110a17ca..76a1f0a315 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb -@@ -328,6 +328,7 @@ def CONFIG.[](name, mandatory = false) - sitearchlibdir = CONFIG["sitearchdir"] - vendorlibdir = CONFIG["vendorlibdir"] - vendorarchlibdir = CONFIG["vendorarchdir"] +@@ -359,6 +359,7 @@ def CONFIG.[](name, mandatory = false) + vendorlibdir = CONFIG["vendorlibdir"] + vendorarchlibdir = CONFIG["vendorarchdir"] + end +rubygemsdir = CONFIG["rubygemsdir"] mandir = CONFIG["mandir", true] docdir = CONFIG["docdir", true] - configure_args = Shellwords.shellwords(CONFIG["configure_args"]) -@@ -506,7 +507,15 @@ def CONFIG.[](name, mandatory = false) + enable_shared = CONFIG["ENABLE_SHARED"] == 'yes' +@@ -595,7 +596,16 @@ def stub 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] ++ # Bundler carries "rubygems.rb" file, so it must be specialcased :/ ++ noinst += %w[rubygems.rb rubygems/ bundler.rb bundler/] 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) ++ noinst = %w[*.txt *.rdoc *.gemspec] ++ install_recursive(File.join(srcdir, "lib", "rubygems"), File.join(rubygemsdir, "rubygems"), :no_install => noinst, :mode => $data_mode) + install(File.join(srcdir, "lib", "rubygems.rb"), File.join(rubygemsdir, "rubygems.rb"), :mode => $data_mode) ++ install_recursive(File.join(srcdir, "lib", "bundler"), File.join(rubylibdir, "bundler"), :no_install => noinst, :mode => $data_mode) ++ install(File.join(srcdir, "lib", "bundler.rb"), rubylibdir, :mode => $data_mode) + end end install?(:local, :comm, :hdr, :'comm-hdr') do --- -1.8.3.1 - diff --git a/duplicated-paths.patch b/duplicated-paths.patch index eb34107..bfb197f 100644 --- a/duplicated-paths.patch +++ b/duplicated-paths.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 -@@ -4228,7 +4228,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 +@@ -3710,7 +3710,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 -@@ -122,7 +122,7 @@ def config.write(arg) +@@ -114,7 +114,7 @@ val = val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump case name when /^prefix$/ diff --git a/extract-gem-versions.sh b/extract-gem-versions.sh new file mode 100644 index 0000000..c5d21e5 --- /dev/null +++ b/extract-gem-versions.sh @@ -0,0 +1,92 @@ +#!/bin/sh +# Extract gem versions used in rpm.spec + +DEST=$(mktemp) +trap 'rm -rf -- "$DEST"' EXIT + +puts_version() { + local name="$1" + local version="$2" + [ -z "$version" ] && version="UNDETERMINED" + echo -e "%define ${name}_ver\t${version}" >> $DEST +} + +ruby_version=$(grep -P '%define\s+ruby_version' ruby.spec | grep -oP '\d\.[\d\.]+') +patchlevel=$(grep -P '%define\s+patchlevel\s+\d' ruby.spec | grep -oP '\d+') + +[ -z "$ruby_version" -o -z "$patchlevel" ] && exit 1 + +BUILD_DIR="$(rpm --eval '%{_builddir}')/ruby-${ruby_version}.${patchlevel}" +[ ! -d $BUILD_DIR ] && builder -bp ruby + +SPEC_DIR=$(pwd) +cd $BUILD_DIR || exit 1 + + +ver=$(grep -P "\w+\.version" ext/bigdecimal/bigdecimal.gemspec | head -1 | grep -oP '\d+\.\d+[\d\.]*') +puts_version "bigdecimal" $ver + +ver=$(grep "VERSION = " lib/bundler/version.rb | grep -oP '\d+\.\d+[\d\.]*') +puts_version "bundler" $ver + +ver=$(grep "VERSION = " lib/erb/version.rb | grep -oP '\d+\.\d+[\d\.]*') +puts_version "erb" $ver + +ver=$(grep "_VERSION = " ext/io/console/io-console.gemspec | grep -oP '\d+\.\d+[\d\.]*') +puts_version "io_console" $ver + +ver=$(grep -P "\s+VERSION = " lib/irb/version.rb | grep -oP '\d+\.\d+[\d\.]*') +puts_version "irb" $ver + +ver=$(cat ./ext/json/VERSION | grep -oP '\d+\.\d+[\d\.]*') +puts_version "json" $ver + +for i in etc stringio zlib; do + iup=$(echo $i | tr '[a-z]' '[A-Z]') + ver=$(grep "${iup}_VERSION" ext/$i/$i.c | grep -oP '\d+\.\d+[\d\.]*') + puts_version $i $ver +done + +ver=$(grep -P "\w+\.version\s+" ext/openssl/openssl.gemspec | head -1 | grep -oP '\d+\.\d+[\d\.]*') +puts_version "openssl" $ver + +ver=$(grep "VERSION = " ext/psych/lib/psych/versions.rb | head -1 | grep -oP '\d+\.\d+[\d\.]*') +puts_version "psych" $ver + +ver=$(grep -P "\s+VERSION\s+= " lib/racc/info.rb | grep -oP '\d+\.\d+[\d\.]*') +puts_version "racc" $ver + +ver=$(grep -P "\s+VERSION = " lib/rdoc/version.rb | grep -oP '\d+\.\d+[\d\.]*') +puts_version "rdoc" $ver + +ver=$(grep -P "\w+\.version\s+" ext/readline/readline*.gemspec | head -1 | grep -oP '\d+\.\d+[\d\.]*') +puts_version "readline" $ver + +ver=$(grep "VERSION = " lib/rubygems.rb | head -1 | grep -oP '\d+\.\d+[\d\.]*') +puts_version "rubygems" $ver + +echo "# bundled" >> $DEST +find .bundle/gems/ -maxdepth 1 -type d | grep -P '\w\-\d+' | sort | perl -pe 's|\.bundle/gems/(\w.+)\-(\d+\.\d+\.\d+)|%define ${1}_ver\t$2|g; s|\-|_|g' >> $DEST + +echo "Determined gem versions:" +cat $DEST + +cd $SPEC_DIR || exit 1 + +echo "Checking version macros usage:" +# determine _ver macros usage +ec=0 +for i in $(grep -P '^%define\s+\w+_ver\s+\d[\.\d]+$' ruby.spec | awk '{print $2}' | sort -u); do + grep -q "%{$i}" ruby.spec + if [ $? -eq 0 ]; then + grep -qP "%define\s+${i}\s+\d" $DEST + if [ $? -ne 0 ]; then + echo "$i: MISSING DEFINITION" + ec=1 + fi + fi +done +[ "$ec" -eq 0 ] && echo " all OK" + +rm -f $DEST +exit $ec diff --git a/fix-bison-invocation.patch b/fix-bison-invocation.patch deleted file mode 100644 index 5b960f3..0000000 --- a/fix-bison-invocation.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ruby-1.9.3-p194/ext/ripper/depend~ 2010-12-26 14:25:10.000000000 +0100 -+++ ruby-1.9.3-p194/ext/ripper/depend 2012-09-06 19:56:49.041137189 +0200 -@@ -16,7 +16,7 @@ - - .y.c: - $(ECHO) compiling compiler $< -- $(Q) $(BISON) -t -v -oy.tab.c $< -+ $(Q) $(BISON) -d -t -v -oy.tab.c $< - $(Q) sed -f $(top_srcdir)/tool/ytab.sed -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@ - @$(RM) y.tab.c - diff --git a/mkmf-verbose.patch b/mkmf-verbose.patch index ccbd972..2113bea 100644 --- a/mkmf-verbose.patch +++ b/mkmf-verbose.patch @@ -11,15 +11,15 @@ 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) +@@ -1974,7 +1974,7 @@ def configuration(srcdir) SHELL = /bin/sh # V=0 quiet, V=1 verbose. other values don't work. -V = 0 +V = 1 + V0 = $(V:0=) Q1 = $(V:1=) Q = $(Q1:0=@) - ECHO1 = $(V:1=@#{CONFIG['NULLCMD']}) -- 1.8.3.1 diff --git a/operating_system.rb b/operating_system.rb index 4b2903d..c5940cd 100644 --- a/operating_system.rb +++ b/operating_system.rb @@ -91,6 +91,7 @@ module Gem 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 + remove_method :default_specifications_dir if method_defined? :default_specifications_dir ## # RubyGems default overrides. @@ -105,9 +106,15 @@ module Gem end end + def default_specifications_dir + @default_specifications_dir ||= File.join(Gem.default_dirs[:system][:gem_dir], "specifications", "default") + end + def default_path path = default_dirs.collect {|location, paths| paths[:gem_dir]} path.unshift Gem.user_dir if File.exist? Gem.user_home + path << Gem.vendor_dir if Gem.vendor_dir && File.directory?(Gem.vendor_dir) + path end def default_bindir @@ -133,7 +140,7 @@ module Gem dir && File.join(dir, RbConfig::CONFIG['RUBY_INSTALL_NAME']) end - # This method should be available since RubyGems 2.2 until RubyGems 3.0. + # This method is available since RubyGems 2.2 (still present in 4.0). # https://github.com/rubygems/rubygems/issues/749 if method_defined? :install_extension_in_lib remove_method :install_extension_in_lib diff --git a/rdoc.1 b/rdoc.1 deleted file mode 100644 index 6297e53..0000000 --- a/rdoc.1 +++ /dev/null @@ -1,252 +0,0 @@ -.\" Automatically generated by Pod::Man v1.34, Pod::Parser v1.13 -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to -.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' -.\" expand to `' in nroff, nothing in troff, for use with C<>. -.tr \(*W-|\(bv\*(Tr -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.hy 0 -.if n .na -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "RDOC 1" -.TH RDOC 1 "2003-08-19" "perl v5.8.0" "User Contributed Perl Documentation" -.SH "NAME" -rdoc \- Generate documentation from ruby source files -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -Usage: -.PP -.Vb 1 -\& rdoc [options] [names...] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -Files are parsed, and the information they contain -collected, before any output is produced. This allows cross -references between all files to be resolved. If a name is a -directory, it is traversed. If no names are specified, all -Ruby files in the current directory (and subdirectories) are -processed. -.SH "OPTIONS" -.IX Header "OPTIONS" -Options: -.IP "\fB\-a\fR, \fB\-\-all\fR" 8 -.IX Item "-a, --all" -include all methods (not just public) in the output -.IP "\fB\-c\fR \fIcharset\fR, \fB\-\-charset\fR \fIcharset\fR" 8 -.IX Item "-c charset, --charset charset" -specifies \s-1HTML\s0 character-set -.IP "\fB\-D\fR, \fB\-\-debug\fR" 8 -.IX Item "-D, --debug" -displays lots on internal stuff -.IP "\fB\-d\fR, \fB\-\-diagram\fR" 8 -.IX Item "-d, --diagram" -Generate diagrams showing modules and classes. -You need dot V1.8.6 or later to use the \-\-diagram -option correctly. Dot is available from -http://www.research.att.com/sw/tools/graphviz/ -.IP "\fB\-x\fR \fIpattern\fR, \fB\-\-exclude\fR \fIpattern\fR" 8 -.IX Item "-x pattern, --exclude pattern" -do not process files or directories matching -pattern. Files given explicitly on the command -line will never be excluded. -.IP "\fB\-F\fR, \fB\-\-fileboxes\fR" 8 -.IX Item "-F, --fileboxes" -classes are put in boxes which represents -files, where these classes reside. Classes -shared between more than one file are -shown with list of files that sharing them. -Silently discarded if \-\-diagram is not given -Experimental. -.IP "\fB\-f\fR \fIformat_name\fR, \fB\-\-fmt\fR \fIformat_name\fR" 8 -.IX Item "-f format_name, --fmt format_name" -set the output formatter (see below) -.IP "\fB\-h\fR, \fB\-\-help\fR" 8 -.IX Item "-h, --help" -print out a brief help summary -.IP "\fB\-O\fR, \fB\-\-help\-output\fR" 8 -.IX Item "-O, --help-output" -explain the various output options -.IP "\fB\-I\fR \fIgif|jpg|jpg|jpeg\fR, \fB\-\-image\-format\fR \fIgif|png|jpg|jpeg\fR" 8 -.IX Item "-I gif|jpg|jpg|jpeg, --image-format gif|png|jpg|jpeg" -Sets output image format for diagrams. Can -be png, gif, jpeg, jpg. If this option is -omitted, png is used. Requires \-\-diagram. -.IP "\fB\-i\fR \fIdir[,dir,...]\fR, \fB\-\-include\fR \fIdir[,dir,...]\fR" 8 -.IX Item "-i dir[,dir,...], --include dir[,dir,...]" -set (or add to) the list of directories -to be searched when satisfying :include: -requests. Can be used more than once. -.IP "\fB\-S\fR, \fB\-\-inline\-source\fR" 8 -.IX Item "-S, --inline-source" -Show method source code inline, rather -than via a popup link -.IP "\fB\-N\fR, \fB\-\-line\-numbers\fR" 8 -.IX Item "-N, --line-numbers" -Include line numbers in the source code -.IP "\fB\-m\fR \fIname\fR, \fB\-\-main\fR \fIname\fR" 8 -.IX Item "-m name, --main name" -\&'name' will be the initial page displayed -.IP "\fB\-1\fR, \fB\-\-one\-file\fR" 8 -.IX Item "-1, --one-file" -put all the output into a single file -.IP "\fB\-o\fR \fIdir\fR, \fB\-\-op\fR \fIdir\fR" 8 -.IX Item "-o dir, --op dir" -set the output directory -.IP "\fB\-n\fR \fIname\fR, \fB\-\-opname\fR \fIname\fR" 8 -.IX Item "-n name, --opname name" -Set the 'name' of the output. Has no -effect for \s-1HTML\s0. -.IP "\fB\-q\fR, \fB\-\-quiet\fR" 8 -.IX Item "-q, --quiet" -don't show progress as we parse -.IP "\fB\-H\fR, \fB\-\-show\-hash\fR" 8 -.IX Item "-H, --show-hash" -A name of the form #name in a comment -is a possible hyperlink to an instance -method name. When displayed, the '#' is -removed unless this option is specified -.IP "\fB\-w\fR \fIwidth\fR, \fB\-\-tab\-width\fR \fIwidth\fR" 8 -.IX Item "-w width, --tab-width width" -Set the width of tab characters (default 8) -.IP "\fB\-T\fR \fItemplate_name\fR, \fB\-\-template\fR \fItemplate_name\fR" 8 -.IX Item "-T template_name, --template template_name" -Set the template used when generating output -.IP "\fB\-t\fR \fItext\fR, \fB\-\-title\fR \fItext\fR" 8 -.IX Item "-t text, --title text" -Set 'txt' as the title for the output -.IP "\fB\-v\fR, \fB\-\-version\fR" 8 -.IX Item "-v, --version" -display RDoc's version -.SH "NOTES" -.IX Header "NOTES" -Available output formatters: chm, html, xml -.PP -For information on where the output goes, use -.PP -.Vb 1 -\& rdoc --help-output -.Ve -.SH "AUTHOR" -.IX Header "AUTHOR" -This manpage was contributed by Brian Almeida diff --git a/ruby-version.patch b/ruby-version.patch index e87bf46..866fef4 100644 --- a/ruby-version.patch +++ b/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.ac | 66 ++++++++++++++++++++++++--------------------- template/ruby.pc.in | 1 + - 2 files changed, 37 insertions(+), 32 deletions(-) + 2 files changed, 36 insertions(+), 31 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"], +diff --git a/configure.ac b/configure.ac +index 80b137e380..63cd3b4f8b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4146,9 +4146,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,56 +4199,62 @@ AC_ARG_WITH(ridir, +@@ -4171,57 +4168,63 @@ AC_ARG_WITH(ridir, AC_SUBST(ridir) AC_SUBST(RI_BASE_NAME) @@ -43,9 +43,10 @@ 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 '@%:@include "confdefs.h"' - echo '#define STRINGIZE(x) x' - test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0' - echo '#include "version.h"' @@ -53,14 +54,15 @@ 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='2 /* minor */' +-]) ++RUBY_LIB_VERSION_STYLE='3 /* full */' +{ +echo "#define RUBY_LIB_VERSION_STYLE $RUBY_LIB_VERSION_STYLE" ++echo '@%:@include "confdefs.h"' +echo '#define STRINGIZE(x) x' +test -f revision.h -o -f "${srcdir}/revision.h" || echo '#define RUBY_REVISION 0' +echo '#include "version.h"' @@ -118,9 +120,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) -@@ -4270,6 +4273,7 @@ AC_SUBST(sitearchincludedir)dnl +@@ -4238,6 +4241,7 @@ AC_SUBST(sitearchincludedir)dnl AC_SUBST(arch)dnl AC_SUBST(sitearch)dnl AC_SUBST(ruby_version)dnl @@ -132,16 +134,14 @@ 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@ +@@ -2,6 +2,7 @@ MAJOR=@MAJOR@ MINOR=@MINOR@ 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 + arch=@arch@ From 518850aba6eee76de7715aae8d37330e34b01983 Mon Sep 17 00:00:00 2001 @@ -165,107 +165,87 @@ index 970cb91..5bf8230 100644 - 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 + BASE = 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) +@@ -453,7 +453,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) + install_recursive($rdocdir, ridatadir, :no_install => rdoc_noinst, :mode => $data_mode) end --- -2.1.0 - -From f8d136f9a46d1fe87eba622ab9665935d05e981b Mon Sep 17 00:00:00 2001 +From 9f0ec0233f618cbb862629816b22491c3df79578 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(-) + lib/rubygems/defaults.rb | 7 ++++--- + test/rubygems/test_gem.rb | 5 +++-- + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/rubygems/defaults.rb b/lib/rubygems/defaults.rb -index 55ca080..75eea2b 100644 +index d4ff4a262c..3f9a5bf590 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 +@@ -34,7 +34,7 @@ def self.default_spec_cache_dir + # specified in the environment -@@ -75,7 +75,8 @@ def self.default_rubygems_dirs + def self.default_dir +- @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version"]) ++ @default_dir ||= File.join(RbConfig::CONFIG["rubylibprefix"], "gems", RbConfig::CONFIG["ruby_version_dir_name"] || RbConfig::CONFIG["ruby_version"]) + end - 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'] + ## +@@ -103,7 +103,8 @@ def self.user_dir + gem_dir = File.join(Gem.user_home, ".gem") + gem_dir = File.join(Gem.data_home, "gem") unless File.exist?(gem_dir) + parts = [gem_dir, 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' +@@ -248,7 +249,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'] + 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 +index b25068405d..e9fef4a311 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb -@@ -962,7 +962,8 @@ def test_self_use_paths +@@ -1337,7 +1337,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 = [@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 -@@ -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', -- RbConfig::CONFIG['ruby_version'] -+ RbConfig::CONFIG['ruby_version_dir_name'] || RbConfig::CONFIG['ruby_version'] + FileUtils.mkdir_p File.join(parts) - assert_equal expected, Gem.vendor_dir - end --- -2.1.0 +@@ -1413,7 +1414,7 @@ def test_self_vendor_dir + vendordir(File.join(@tempdir, "vendor")) do + 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 From 88c38a030c22dbf9422ece847bdfbf87d6659313 Mon Sep 17 00:00:00 2001 @@ -275,22 +255,19 @@ 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 -@@ -275,7 +275,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 +@@ -124,7 +124,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 - + dnl checks for alternative programs + AC_CANONICAL_BUILD diff --git a/ruby.spec b/ruby.spec index 9aa0ed7..8c731a3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -1,21 +1,25 @@ # TODO: # - include ext/ in docs -# - replace ri with fastri -# - patch ri to search multiple indexes (one per package), so RPMs can install ri docs # # Conditional build: %bcond_without doc # skip (time-consuming) docs generating; intended for speed up test builds %bcond_without batteries # Don't include rubygems, json, rake, minitest %bcond_without default_ruby # use this Ruby as default system Ruby +%bcond_without dtrace # disable tracing with dtrace %bcond_with bootstrap # build bootstrap version %bcond_with tests # build without tests -%define rel 1 -%define ruby_version 2.4 -%define patchlevel 6 +%ifarch %{x8664} aarch64 +%define with_yjit 1 +%endif + +%define rel 9 +%define ruby_version 3.4 +%define patchlevel 9 %define pkg_version %{ruby_version}.%{patchlevel} -%define ruby_suffix %{!?with_default_ruby:%{ruby_version}} -%define doc_version 2_4_6 +%define ruby_suffix %{!?with_default_ruby:%{ruby_version}} +%define doc_version 3_4_1 +%define unicode_version 15.0.0 %define oname ruby Summary: Ruby - interpreted scripting language Summary(ja.UTF-8): オブジェクト指向言語Rubyインタプリタ @@ -28,55 +32,40 @@ Release: %{rel} Epoch: 1 # 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 +# zlib: ext/digest/md5/md5.*, nkf/nkf-utf8/nkf.c (bundled gem) # UCD: some of enc/trans/**/*.src License: (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD Group: Development/Languages # https://www.ruby-lang.org/en/downloads/ Source0: https://cache.ruby-lang.org/pub/ruby/%{ruby_version}/%{oname}-%{pkg_version}.tar.xz -# Source0-md5: e906495b65f9f31de4ceb0d4bbbea8b1 -Source2: https://ruby-doc.org/downloads/%{oname}_%{doc_version}_stdlib_rdocs.tgz -# Source2-md5: a520f66caa420a12e859da6082242946 -Source3: https://ruby-doc.org/downloads/%{oname}_%{doc_version}_core_rdocs.tgz -# Source3-md5: 2a5b0c852f0e47c26f7d6db37e09a584 -Source50: http://www.unicode.org/Public/9.0.0/ucd/CaseFolding.txt -# Source50-md5: e3fbf2f626f10070000fe66f3a2ff5ef -Source51: http://www.unicode.org/Public/9.0.0/ucd/CompositionExclusions.txt -# Source51-md5: 263381d7b4b5e2d52a91e1bbbd4722d4 -Source52: http://www.unicode.org/Public/9.0.0/ucd/NormalizationTest.txt -# Source52-md5: aacb8a8acfc449d09136fe39f3f97cf1 -Source53: http://www.unicode.org/Public/9.0.0/ucd/SpecialCasing.txt -# Source53-md5: fea30f45a2f81ffa474fd984d297e2ea -Source54: http://www.unicode.org/Public/9.0.0/ucd/UnicodeData.txt -# Source54-md5: dde25b1cf9bbb4ba1140ac12e4128b0b -Source4: rdoc.1 -Source5: testrb.1 +# Source0-md5: b58158f56343125bc9a56841f4c2cb35 +Source2: https://ruby-doc.org/downloads/%{oname}_%{doc_version}_complete_rdocs.tgz +# Source2-md5: a13c63951d5ce47b169935a7208f876d Source6: operating_system.rb -Patch1: rubygems.patch -Patch2: fix-bison-invocation.patch -Patch3: mkmf-verbose.patch Patch4: strip-ccache.patch Patch5: ruby-version.patch Patch6: duplicated-paths.patch -# obsolete? -Patch8: rubygems-2.0.0-binary-extensions.patch Patch9: custom-rubygems-location.patch Patch12: archlibdir.patch URL: http://www.ruby-lang.org/ BuildRequires: autoconf >= 2.67 BuildRequires: automake -BuildRequires: bison >= 1.875 -BuildRequires: db-devel -BuildRequires: gdbm-devel >= 1.8.3 +BuildRequires: gcc-c++ BuildRequires: gmp-devel BuildRequires: libffi-devel +BuildRequires: libstdc++-devel BuildRequires: ncurses-devel BuildRequires: openssl-devel >= 0.9.6 BuildRequires: pkgconfig -BuildRequires: readline-devel >= 4.2 -BuildRequires: rpm-build >= 4.5-83 +BuildRequires: rpm-build >= 5.4.10-49 +BuildRequires: rpmbuild(macros) >= 2.050 +# which version is minimum now? 1.8.7 is not enough, fails with: +# ./tool/generic_erb.rb:31: syntax error, unexpected ':', expecting ')' +# ...O.popen("tput smso", "r", err: IO::NULL, &:read) rescue nil) +BuildRequires: ruby >= 1:3.0 +%{?with_yjit:BuildRequires: rust >= 1.58} BuildRequires: sed >= 4.0 -BuildRequires: systemtap-sdt-devel +%{?with_dtrace:BuildRequires: systemtap-sdt-devel} BuildRequires: tar >= 1:1.22 BuildRequires: xz BuildRequires: yaml-devel @@ -87,6 +76,7 @@ BuildRequires: rpm-rubyprov BuildRequires: ruby-modules %endif Requires(post,postun): /sbin/ldconfig +%{?with_yjit:%{?rust_req}} Obsoletes: ruby-REXML <= 2.4.0-2 Obsoletes: ruby-doc < 1.8.4 Obsoletes: ruby-fastthread <= 0.6.3 @@ -95,21 +85,65 @@ Conflicts: ruby-activesupport < 2.3.11-2 Conflicts: ruby-activesupport2 < 2.3.11-2 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define bigdecimal_ver 1.3.2 -%define did_you_mean_ver 1.1.0 -%define io_console_ver 0.4.6 -%define irb_ver 0.9.6 -%define json_ver 2.0.4 -%define minitest_ver 5.10.1 -%define net_telnet_ver 0.1.1 -%define openssl_ver 2.0.9 -%define power_assert_ver 0.4.1 -%define psych_ver 2.2.2 -%define rake_ver 12.0.0 -%define rdoc_ver 5.0.0 -%define rubygems_ver 2.6.14.4 -%define test_unit_ver 3.2.3 -%define xmlrpc_ver 0.2.1 +# hack: skip rubygem(ipaddr) +%define _noautoreq ipaddr + +%define rubygems_ver 3.6.9 +%define rubygems_molinillo_ver 0.8.0 +%define rubygems_optparse_ver 0.6.0 +%define rubygems_tsort_ver 0.2.0 + +# Default gems. +%define bundler_ver 2.6.9 +%define bundler_connection_pool_ver 2.5.0 +%define bundler_fileutils_ver 1.7.3 +%define bundler_pub_grub_ver 0.5.0 +%define bundler_net_http_persistent_ver 4.0.4 +%define bundler_thor_ver 1.3.2 +%define bundler_tsort_ver 0.2.0 +%define bundler_uri_ver 1.0.4 + +%define did_you_mean_ver 2.0.0 +%define erb_ver 4.0.4 +%define io_console_ver 0.8.1 +%define irb_ver 1.14.3 +%define json_ver 2.9.1 +%define openssl_ver 3.3.1 +%define psych_ver 5.2.2 +%define rdoc_ver 6.14.0 +%define stringio_ver 3.1.2 + +# Bundled gems. +%define bigdecimal_ver 3.1.8 +%define minitest_ver 5.25.4 +%define power_assert_ver 2.0.5 +%define rake_ver 13.2.1 +%define test_unit_ver 3.6.7 +%define rexml_ver 3.4.4 +%define rss_ver 0.3.1 +%define net_ftp_ver 0.3.8 +%define net_imap_ver 0.5.8 +%define net_pop_ver 0.1.2 +%define net_smtp_ver 0.5.1 +%define matrix_ver 0.4.2 +%define prime_ver 0.1.3 +%define rbs_ver 3.8.0 +%define typeprof_ver 0.30.1 +%define debug_ver 1.11.0 +%define racc_ver 1.8.1 +%define nkf_ver 0.2.0 +%define syslog_ver 0.2.0 +%define csv_ver 3.3.2 +%define abbrev_ver 0.1.2 +%define base64_ver 0.2.0 +%define drb_ver 2.2.1 +%define mutex_m_ver 0.3.0 +%define getoptlong_ver 0.2.1 +%define observer_ver 0.1.2 +%define resolv_replace_ver 0.1.1 +%define rinda_ver 0.2.0 +%define repl_type_completor_ver 0.1.9 + %define ruby_ridir %{_datadir}/ri/system %define gem_dir %{_datadir}/gems @@ -140,6 +174,10 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) # ruby needs frame pointers for correct exception handling %define specflags_ia32 -fno-omit-frame-pointer +# Ruby code violates C strict aliasing rules in many places (Alpine, openSUSE both add this; +# Alpine notes it's needed to avoid miscompilation, openSUSE applies it for iseq.c correctness) +%define specflags -fno-strict-aliasing + %description Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text @@ -176,7 +214,7 @@ Summary(pl.UTF-8): Standardowe moduły i narzędzia dla języka Ruby Group: Development/Languages Requires: %{name} = %{epoch}:%{version}-%{release} Suggests: ruby-rubygems -# ruby-modules deprecated, rpm generates ruby(abi) itself +# ruby-modules deprecated, rpm5 generates ruby(abi) itself Provides: ruby-modules(ver) = %{ruby_version} # FIXME later Provides: ruby(abi) = %{ruby_version} @@ -213,9 +251,7 @@ Biblioteki programistyczne interpretera języka Ruby. Summary: Ruby HTML documentation Summary(pl.UTF-8): Dokumentacja HTML do Ruby Group: Documentation -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description doc Ruby HTML documentation: FAQ, guide, core and standard library. @@ -229,9 +265,7 @@ Summary: Ruby ri documentation Summary(pl.UTF-8): Dokumentacja Ruby w formacie ri Group: Documentation Requires: %{name}-modules = %{epoch}:%{version}-%{release} -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description doc-ri Ruby ri documentation. @@ -243,9 +277,7 @@ Dokumentacja Ruby w formacie ri. Summary: Ruby examples Summary(pl.UTF-8): Przykłady dla języka Ruby Group: Development/Languages -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description examples Ruby examples. @@ -254,7 +286,7 @@ Ruby examples. Przykłady programów w języku Ruby. # IMPORTANT: keep irb, rdoc, rubygems, rake, json as last packages as we reset epoch/version/release -# and %{version},%{release} macros may not be used directly as they take last +# and version, release macros may not be used directly as they take last # subpackage value not main package one what you intend to use %package irb @@ -267,9 +299,7 @@ Group: Development/Languages Requires: %{name}-modules = 1:%{pkg_version}-%{rel} Provides: irb = %{version}-%{release} Provides: ruby(irb) = %{version}-%{release} -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description irb The irb is acronym for Interactive Ruby. It evaluates ruby expression @@ -292,9 +322,7 @@ Requires: %{name}-irb >= %{irb_ver} Requires: %{name}-json >= %{json_ver} Requires: %{name}-modules = 1:%{pkg_version}-%{rel} Obsoletes: rdoc <= 0.9.0 -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description rdoc RDoc produces HTML and command-line documentation for Ruby projects. @@ -321,9 +349,7 @@ Requires: %{name}-psych = %{psych_ver}-%{pkg_version}.%{rel} Requires: %{name}-rdoc >= %{rdoc_ver} Suggests: %{name}-devel Provides: rubygems = %{rubygems_ver} -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description rubygems RubyGems is the Ruby standard for publishing and managing third party @@ -333,6 +359,25 @@ libraries. RubyGems to standardowe narzędzie języka Ruby do publikowania i zarządzania zewnętrznymi bibliotekami. +%package bundler +Summary: Library and utilities to manage a Ruby application's gem dependencies +Summary(pl.UTF-8): Biblioteka i narzędzia do zarządzania zależnościami gem aplikacji w języku Ruby +Version: %{bundler_ver} +Release: %{pkg_version}.%{rel} +Epoch: 0 +License: MIT +Group: Development/Languages +Provides: bundler = %{bundler_ver} +BuildArch: noarch + +%description bundler +Bundler manages an application's dependencies through its entire life, +across many machines, systematically and repeatably. + +%description bundler -l pl.UTF-8 +Bundler zarządza zależnościami aplikacji przez cały czas jej życia, +między wiloma maszynami - systematycznie i powtarzalnie. + %package rake Summary: Rake is a Make-like program implemented in Ruby Summary(pl.UTF-8): Program typu Make dla języka Ruby @@ -343,9 +388,7 @@ License: MIT Group: Development/Languages Provides: rake = %{rake_ver} Conflicts: ruby-modules < 1:1.9.3.429-2 -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description rake Rake is a simple Ruby build program with capabilities similar to make. @@ -384,7 +427,7 @@ Epoch: 0 # UCD: ext/json/generator/generator.c License: (Ruby or GPL v2) and UCD Group: Development/Languages -Obsoletes: ruby-json-rubyforge +Obsoletes: ruby-json-rubyforge < 1 Conflicts: ruby-modules < 1:1.9.3.429-3 %description json @@ -401,9 +444,7 @@ Release: %{pkg_version}.%{rel} Epoch: 0 License: MIT Group: Development/Libraries -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description minitest minitest/unit is a small and incredibly fast unit testing framework. @@ -441,9 +482,7 @@ Release: %{pkg_version}.%{rel} Epoch: 0 License: Ruby or BSD Group: Development/Libraries -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description power_assert Power Assert shows each value of variables and method calls in the @@ -466,9 +505,7 @@ Epoch: 0 License: (Ruby or BSD) and (Ruby or BSD or Python) and (Ruby or BSD or LGPL v2+) Group: Development/Libraries Requires: ruby-power_assert = %{power_assert_ver}-%{pkg_version}.%{rel} -%if "%{_rpmversion}" >= "5" BuildArch: noarch -%endif %description test-unit test-unit (Test::Unit) is unit testing framework for Ruby, based on @@ -485,54 +522,31 @@ programowaniem ekstremalnym, dla szkieletu SUnit dla Smalltalka. Szkielet pozwala na pisanie testów, sprawdzanie wyników i automatyczne testowanie w Rubym. -%package did_you_mean -Summary: "Did you mean?" experience in Ruby -Summary(pl.UTF-8): Zachowanie "czy miałeś na myśli?" w języku Ruby -Version: %{did_you_mean_ver} +%package rbs +Summary: Type signature for Ruby +Version: %{rbs_ver} Release: %{pkg_version}.%{rel} -Epoch: 0 License: MIT Group: Development/Libraries -%if "%{_rpmversion}" >= "5" -BuildArch: noarch -%endif - -%description did_you_mean -"Did you mean?" experience in Ruby: the error message will tell you -the right one when you misspelled something. -%description did_you_mean -l pl.UTF-8 -Zachowanie "czy miałeś na myśli" w języku ruby: komunikat błędu -podpowie właściwą pisownię w przypadku literówki. +%description rbs +RBS is the language for type signatures for Ruby and standard library +definitions. -%package net-telnet -Summary: Provides telnet client functionality -Summary(pl.UTF-8): Funkcjonalność klienta usługi telnet -Version: %{net_telnet_ver} +%package typeprof +Summary: TypeProf is a type analysis tool for Ruby code based on abstract interpretation +Version: %{typeprof_ver} Release: %{pkg_version}.%{rel} -Epoch: 0 -Group: Development/Libraries -%if "%{_rpmversion}" >= "5" +License: MIT +URL: https://github.com/ruby/typeprof BuildArch: noarch -%endif - -%description 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. -%description net-telnet -l pl.UTF-8 -Ten pakiet dostarcza funkcjonalność klienta usługi telnet. - -Ta klasa ma, poprzez delegację, wszystkie metody obiektu gniazda -(domyślnie TCPSocket, ale może być ustawiona przez opcję Proxy dla -new()). Udostępnia metody takie jak: close() do zakończenia sesji czy -sysread() do odczytu danych bezpośrednio z hosta zamiast poprzez -mechanizm waitfor(). +%description typeprof +TypeProf performs a type analysis of non-annotated Ruby code. It +abstractly executes input Ruby code in a level of types instead of +values, gathers what types are passed to and returned by methods, and +prints the analysis result in RBS format, a standard type description +format for Ruby 3.x %package bigdecimal Summary: BigDecimal - arbitrary-precision floating point decimal arithmetic @@ -605,60 +619,84 @@ emitowania YAML-a. Poza obudowaniem libyaml, wie także jak serializować i deserializować większość obiektów języka Ruby do/z formatu YAML. -%package xmlrpc -Summary: A xmlrpc wrapper for Ruby -Summary(pl.UTF-8): Obudowanie xmlrpc dla języka Ruby -Version: %{xmlrpc_ver} +%package rexml +Summary: An XML toolkit for Ruby +Version: %{rexml_ver} Release: %{pkg_version}.%{rel} -Epoch: 0 -License: MIT -Group: Development/Libraries - -%description xmlrpc -XMLRPC is a lightweight protocol that enables remote procedure calls -over HTTP. It is defined at . - -XMLRPC allows you to create simple distributed computing solutions -that span computer languages. Its distinctive feature is its -simplicity compared to other approaches like SOAP and CORBA. - -The Ruby standard library package 'xmlrpc' enables you to create a -server that implements remote procedures and a client that calls them. -Very little code is required to achieve either of these. - -%description xmlrpc -l pl.UTF-8 -XMLRPC to lekki protokół pozwalający na wywołania zdalnych procedur -poprzez HTTP. Jest zdefiniowany na . +License: BSD +URL: https://github.com/ruby/rexml +BuildArch: noarch -XMLRPC pozwala na tworzenie prostych, rozproszonych systemów -komputerowych dla wielu języków. Wyróżniającą cechą jest prostota w -porównaniu do innych rozwiązań, takich jak SOAP czy CORBA. +%description rexml +REXML was inspired by the Electric XML library for Java, which +features an easy-to-use API, small size, and speed. Hopefully, REXML, +designed with the same philosophy, has these same features. I've tried +to keep the API as intuitive as possible, and have followed the Ruby +methodology for method naming and code flow, rather than mirroring the +Java API. + +REXML supports both tree and stream document parsing. Stream parsing +is faster (about 1.5 times as fast). However, with stream parsing, you +don't get access to features such as XPath. + +%package rss +Summary: Family of libraries that support various formats of XML "feeds" +Version: %{rss_ver} +License: BSD +URL: https://github.com/ruby/rss +BuildArch: noarch -Pakiet biblioteki standardowej języka Ruby 'xmlrpc' pozwala na -stworzenie serwera implementującego procedury zdalne oraz klienta -wywołującego je. Aby to osiągnąć wystarczy bardzo mało kodu. +%description rss +Really Simple Syndication (RSS) is a family of formats that describe +'feeds', specially constructed XML documents that allow an interested +person to subscribe and receive updates from a particular web service. +This library provides tooling to read and create these feeds. + +%package bundled-gems +Summary: Bundled gems which are part of Ruby StdLib +Requires: ruby-rubygems >= %{rubygems_ver} +# Runtime dependency of rubygem(debug). +Recommends: rubygem(irb) >= %{irb_ver} +Provides: rubygem(abbrev) = %{abbrev_ver} +Provides: rubygem(base64) = %{base64_ver} +Provides: rubygem(csv) = %{csv_ver} +Provides: rubygem(debug) = %{debug_ver} +Provides: rubygem(drb) = %{drb_ver} +Provides: rubygem(getoptlong) = %{getoptlong_ver} +Provides: rubygem(matrix) = %{matrix_ver} +Provides: rubygem(mutex_m) = %{mutex_m_ver} +Provides: rubygem(net-ftp) = %{net_ftp_ver} +Provides: rubygem(net-imap) = %{net_imap_ver} +Provides: rubygem(net-pop) = %{net_pop_ver} +Provides: rubygem(net-smtp) = %{net_smtp_ver} +Provides: rubygem(nkf) = %{nkf_ver} +Provides: rubygem(observer) = %{observer_ver} +Provides: rubygem(prime) = %{prime_ver} +Provides: rubygem(racc) = %{racc_ver} +Provides: rubygem(resolv-replace) = %{resolv_replace_ver} +Provides: rubygem(repl_type_completor) = %{repl_type_completor_ver} +Provides: rubygem(rinda) = %{rinda_ver} +Provides: rubygem(syslog) = %{syslog_ver} + +%description bundled-gems +Bundled gems which are part of Ruby StdLib. While being part of Ruby, +these needs to be listed in Gemfile to be used by Bundler. %prep -%setup -q -n %{oname}-%{pkg_version} -a2 -a3 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -#%patch8 -p1 -%patch9 -p1 -%patch12 -p1 - -install -d enc/unicode/data/9.0.0 -cp -p %{SOURCE50} %{SOURCE51} %{SOURCE52} %{SOURCE53} %{SOURCE54} enc/unicode/data/9.0.0/ +%setup -q -n %{oname}-%{pkg_version} -a2 +#%patch3 -p1 +%patch 4 -p1 +%patch 5 -p1 +%patch 6 -p1 +%patch 9 -p1 +%patch 12 -p1 # must be regenerated with new bison %{__rm} parse.{c,h} # Remove bundled libraries to be sure they are not used. -%{__rm} -r ext/psych/yaml -%{__rm} -r ext/fiddle/libffi* +#%{__rm} -r ext/psych/yaml +#%{__rm} -r ext/fiddle/libffi* # Install custom operating_system.rb. install -d lib/rubygems/defaults @@ -672,17 +710,17 @@ find -type f '(' -name '*.rb' -o -name '*.cgi' -o -name '*.test' \ %if %{with bootstrap} # avoid regeneration, needs iostring module -touch enc/unicode/9.0.0/*.h +touch enc/unicode/%{unicode_version}/*.h %endif %build -rubygems_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rubygems.rb | xargs) +rubygems_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rubygems.rb | sed 's/\.freeze//g' | xargs) if [ $rubygems_ver != %{rubygems_ver} ]; then echo "Set %%define rubygems_ver to $rubygems_ver and re-run." exit 1 fi -rdoc_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rdoc.rb | xargs) -if [ $rdoc_ver != %{rdoc_ver} ]; then +rdoc_ver=$(awk '/VERSION =/ && $1 == "VERSION" {print $3}' lib/rdoc/version.rb | xargs) +if [ "$rdoc_ver" != %{rdoc_ver} ]; then echo "Set %%define rdoc_ver to $rdoc_ver and re-run." exit 1 fi @@ -705,11 +743,18 @@ cp -f /usr/share/automake/config.sub . --with-rubyarchhdrdir=%{_includedir}/%{oname}-%{ruby_version} \ --with-sitearchhdrdir='$(sitehdrdir)/$(arch)' \ --with-vendorarchhdrdir='$(vendorhdrdir)/$(arch)' \ + --without-compress-debug-sections \ + --enable-mkmf-verbose \ + %{__enable_disable yjit} \ +%ifarch x32 + --with-coroutine=ucontext \ +%endif --enable-multiarch \ --enable-shared \ --disable-install-doc \ --disable-rpath \ --disable-rubygems \ + %{__enable_disable dtrace} \ --with-ruby-version='' \ %{__make} -j1 main \ @@ -768,7 +813,8 @@ rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{ruby_rdocdir},%{ruby_ridir}} \ $RPM_BUILD_ROOT%{ruby_vendorarchdir} \ $RPM_BUILD_ROOT%{ruby_vendorlibdir}/net \ - $RPM_BUILD_ROOT%{ruby_vendorlibdir}/data \ + $RPM_BUILD_ROOT%{ruby_vendorlibdir}/data + %{__make} install %{?with_doc:install-doc -j1} \ DESTDIR=$RPM_BUILD_ROOT @@ -779,18 +825,14 @@ sed -i -e 's/Version: \${ruby_version}/Version: %{ruby_version}/' $RPM_BUILD_ROO # Kill bundled certificates, as they should be part of ca-certificates. for cert in \ - AddTrustExternalCARoot.pem \ - DigiCertHighAssuranceEVRootCA.pem \ GlobalSignRootCA.pem \ + GlobalSignRootCA_R3.pem \ ; do %{__rm} $RPM_BUILD_ROOT%{rubygems_dir}/rubygems/ssl_certs/*/$cert done install -d $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version} cp -Rf sample/* $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version} -cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man1/rdoc%{ruby_suffix}.1 -cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man1/testrb%{ruby_suffix}.1 - %{__rm} -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/html # detect this runtime, "make install" is affected by operating_system.rb what is installed in system! @@ -821,16 +863,9 @@ ln -s %{gem_dir}/gems/rdoc-%{rdoc_ver}/lib/rdoc $RPM_BUILD_ROOT%{ruby_libdir} ln -s %{gem_dir}/gems/rdoc-%{rdoc_ver}/lib/rdoc.rb $RPM_BUILD_ROOT%{ruby_libdir} %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/rdoc-%{rdoc_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications -install -d $RPM_BUILD_ROOT%{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/lib -install -d $RPM_BUILD_ROOT%{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib -%{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/bigdecimal $RPM_BUILD_ROOT%{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/lib -%{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/bigdecimal.so $RPM_BUILD_ROOT%{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib -%{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/bigdecimal-%{bigdecimal_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications -ln -s %{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/lib/bigdecimal $RPM_BUILD_ROOT%{ruby_libdir}/bigdecimal -ln -s %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib/bigdecimal.so $RPM_BUILD_ROOT%{ruby_libarchdir}/bigdecimal.so - install -d $RPM_BUILD_ROOT%{gem_dir}/gems/io-console-%{io_console_ver}/lib install -d $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/lib/io +touch $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/gem.build_complete %{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/io $RPM_BUILD_ROOT%{gem_dir}/gems/io-console-%{io_console_ver}/lib %{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/io/console.so $RPM_BUILD_ROOT%{gem_libdir}/io-console-%{io_console_ver}/lib/io %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/io-console-%{io_console_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications @@ -839,6 +874,7 @@ ln -s %{gem_libdir}/io-console-%{io_console_ver}/lib/io/console.so $RPM_BUILD_RO install -d $RPM_BUILD_ROOT%{gem_dir}/gems/json-%{json_ver}/lib install -d $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/lib +touch $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/gem.build_complete %{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/json* $RPM_BUILD_ROOT%{gem_dir}/gems/json-%{json_ver}/lib %{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/json $RPM_BUILD_ROOT%{gem_libdir}/json-%{json_ver}/lib %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/json-%{json_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications @@ -855,6 +891,7 @@ ln -s %{gem_dir}/gems/test-unit-%{test_unit_ver}/lib/test/unit $RPM_BUILD_ROOT%{ install -d $RPM_BUILD_ROOT%{gem_dir}/gems/psych-%{psych_ver}/lib install -d $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/lib +touch $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/gem.build_complete %{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/psych* $RPM_BUILD_ROOT%{gem_dir}/gems/psych-%{psych_ver}/lib %{__mv} $RPM_BUILD_ROOT%{ruby_libarchdir}/psych.so $RPM_BUILD_ROOT%{gem_libdir}/psych-%{psych_ver}/lib/ %{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/psych-%{psych_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications @@ -862,6 +899,46 @@ ln -s %{gem_dir}/gems/psych-%{psych_ver}/lib/psych $RPM_BUILD_ROOT%{ruby_libdir} ln -s %{gem_dir}/gems/psych-%{psych_ver}/lib/psych.rb $RPM_BUILD_ROOT%{ruby_libdir}/psych.rb ln -s %{gem_libdir}/psych-%{psych_ver}/lib/psych.so $RPM_BUILD_ROOT%{ruby_archdir}/psych.so +install -d $RPM_BUILD_ROOT%{gem_dir}/gems/bundler-%{bundler_ver}/lib +install -d $RPM_BUILD_ROOT%{gem_libdir}/bundler-%{bundler_ver}/lib +%{__mv} $RPM_BUILD_ROOT%{ruby_libdir}/bundler* $RPM_BUILD_ROOT%{gem_dir}/gems/bundler-%{bundler_ver}/lib +%{__mv} $RPM_BUILD_ROOT%{gem_dir}/specifications/default/bundler-%{bundler_ver}.gemspec $RPM_BUILD_ROOT%{gem_dir}/specifications +ln -s %{gem_dir}/gems/bundler-%{bundler_ver}/lib/bundler $RPM_BUILD_ROOT%{ruby_libdir}/bundler +ln -s %{gem_dir}/gems/bundler-%{bundler_ver}/lib/bundler.rb $RPM_BUILD_ROOT%{ruby_libdir}/bundler.rb + +# Move the binary extensions into proper place (if no gem has binary extension, +# the extensions directory might be empty). + +# if abi contains number ruby strips it in convoluted logic (said +# logic is already cleaned up in 4.0 so x32 will need to be included +# too) +# https://github.com/ruby/ruby/blob/5483bfc/lib/rubygems/platform.rb#L75 +%ifnarch x32 +# https://github.com/ruby/ruby/blob/5483bfc/configure.ac#L280 +if [ -n "%{?_gnu}" ] && [ "%{?_gnu}" != "-gnu" ] && [[ "%{_target_platform}" = *%{?_gnu} ]]; then + abi=$(echo "%{?_gnu}" | sed 's/^-gnu/-/') +fi +%endif +find $RPM_BUILD_ROOT${gem_dir}/extensions/*-%{_target_os}$abi/%{ruby_version}.*/* -maxdepth 0 \ + -exec mv '{}' $RPM_BUILD_ROOT%{_libdir}/gems/%{name}/ \; \ + || echo "No gem binary extensions to move." + +# Clean up gem cache and leftover directories from gem_dir (outside system paths) +%{__rm} -rf $RPM_BUILD_ROOT${gem_dir} + +# ruby binary is installed in arch-specific dir with symlink from %{_bindir}; +# move it to %{_bindir} directly (https://bugs.ruby-lang.org/issues/20800) +if [ -L $RPM_BUILD_ROOT%{_bindir}/ruby%{ruby_suffix} ]; then + %{__rm} $RPM_BUILD_ROOT%{_bindir}/ruby%{ruby_suffix} + %{__mv} $RPM_BUILD_ROOT%{_prefix}/*-tld-linux-gnu*/bin/ruby%{ruby_suffix} $RPM_BUILD_ROOT%{_bindir}/ruby%{ruby_suffix} +fi +%{__rm} -rf $RPM_BUILD_ROOT%{_prefix}/*-tld-linux-gnu* + +# replace default irb with its not gemified version +%{__mv} $RPM_BUILD_ROOT%{gem_dir}/gems/irb-%{irb_ver}/exe/irb $RPM_BUILD_ROOT%{_bindir}/irb%{ruby_suffix} +# add ruby_suffix to syntax_suggest +[ -n "%{ruby_suffix}" ] && mv $RPM_BUILD_ROOT%{_bindir}/syntax_suggest $RPM_BUILD_ROOT%{_bindir}/syntax_suggest%{ruby_suffix} + # Adjust the gemspec files so that the gems will load properly sed -i '/^end$/ i\ s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/rake-%{rake_ver}.gemspec @@ -869,10 +946,6 @@ sed -i '/^end$/ i\ sed -i '/^end$/ i\ s.require_paths = ["lib"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec -sed -i '/^end$/ i\ - s.require_paths = ["lib"]\ - s.extensions = ["bigdecimal.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec - sed -i '/^end$/ i\ s.require_paths = ["lib"]\ s.extensions = ["io/console.so"]' $RPM_BUILD_ROOT%{gem_dir}/specifications/io-console-%{io_console_ver}.gemspec @@ -889,27 +962,56 @@ sed -i '/^end$/ i\ # https://github.com/rubygems/rubygems/pull/694 for s in rake-%{rake_ver}.gemspec rdoc-%{rdoc_ver}.gemspec json-%{json_ver}.gemspec; do s="$RPM_BUILD_ROOT%{gem_dir}/specifications/$s" - %{__make} runruby TESTRUN_SCRIPT="-rubygems \ + %{__make} runruby TESTRUN_SCRIPT="-rrubygems \ -e \"spec = Gem::Specification.load('$s')\" \ -e \"File.write '$s', spec.to_ruby\"" done %{__sed} -i -e '1s,/usr/bin/env ruby,/usr/bin/ruby,' \ - $RPM_BUILD_ROOT%{ruby_libdir}/abbrev.rb \ - $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/bin/console \ + $RPM_BUILD_ROOT%{_bindir}/irb \ $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/exe/rake \ $RPM_BUILD_ROOT%{gem_dir}/gems/rdoc-%{rdoc_ver}/exe/{rdoc,ri} \ + $RPM_BUILD_ROOT%{gem_dir}/gems/bundler-%{bundler_ver}/exe/{bundle,bundler} \ + $RPM_BUILD_ROOT%{gem_dir}/gems/debug-%{debug_ver}/exe/rdbg \ + $RPM_BUILD_ROOT%{gem_dir}/gems/rbs-%{rbs_ver}/exe/rbs \ + $RPM_BUILD_ROOT%{gem_dir}/gems/erb-%{erb_ver}/libexec/erb \ + $RPM_BUILD_ROOT%{gem_dir}/gems/typeprof-%{typeprof_ver}/bin/typeprof \ + $RPM_BUILD_ROOT%{gem_dir}/gems/syntax_suggest-*/exe/syntax_suggest \ $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}/{cal,test,time,uumerge}.rb \ - $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}/{drb,logger,openssl,ripper,rss}/*.rb \ - $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}/webrick/*.cgi - -# gem non library files -%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/minitest-%{minitest_ver}/test -%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/test-unit-%{test_unit_ver}/{[A-Z]*,doc,sample,test} -%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/power_assert-%{power_assert_ver}/{[A-Z]*,test} -%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/did_you_mean-%{did_you_mean_ver}/{[A-Z]*,doc,test} + $RPM_BUILD_ROOT%{_examplesdir}/%{oname}-%{pkg_version}/{drb,logger,openssl,ripper}/*.rb + +# gem non library files: remove docs, build artifacts, dev scripts, samples +# For each bundled gem, keep only lib/ (and exe/ where needed) +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/matrix-%{matrix_ver}/[A-Z]* +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/minitest-%{minitest_ver}/{[A-Z]*,test} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-ftp-%{net_ftp_ver}/[A-Z]* +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-pop-%{net_pop_ver}/[A-Z]* +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-imap-%{net_imap_ver}/{[A-Z]*,docs,sample} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-smtp-%{net_smtp_ver}/[A-Z]* +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/prime-%{prime_ver}/{[A-Z]*,sig} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/debug-%{debug_ver}/{[A-Z]*,misc,ext,exts.mk} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/power_assert-%{power_assert_ver}/[A-Z]* %{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rake-%{rake_ver}/{[A-Z]*,doc} -%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/net-telnet-%{net_telnet_ver}/{[A-Z]*,bin} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/test-unit-%{test_unit_ver}/{[A-Z]*,doc,sample} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/racc-%{racc_ver}/{[A-Z]*,bin,doc,ext} $RPM_BUILD_ROOT%{_bindir}/racc +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rexml-%{rexml_ver}/{[A-Z]*,doc} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rss-%{rss_ver}/[A-Z]* +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/bigdecimal-%{bigdecimal_ver}/{[A-Z]*,ext,sample} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/nkf-%{nkf_ver}/{[A-Z]*,ext,bin,exts.mk} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/syslog-%{syslog_ver}/{[A-Z]*,ext,bin,exts.mk} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rbs-%{rbs_ver}/{[A-Z]*,docs,ext,sig,src,core,stdlib,config.yml,goodcheck.yml,exts.mk} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/csv-%{csv_ver}/{[A-Z]*,doc} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/abbrev-%{abbrev_ver}/{[A-Z]*,bin} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/base64-%{base64_ver}/[A-Z]* +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/drb-%{drb_ver}/[A-Z]* +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/mutex_m-%{mutex_m_ver}/{[A-Z]*,sig} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/getoptlong-%{getoptlong_ver}/{[A-Z]*,bin,sample} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/observer-%{observer_ver}/{[A-Z]*,bin} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/resolv-replace-%{resolv_replace_ver}/{[A-Z]*,bin} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/rinda-%{rinda_ver}/{[A-Z]*,bin} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/repl_type_completor-%{repl_type_completor_ver}/{[A-Z]*,sig} +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/typeprof-%{typeprof_ver}/doc +%{__rm} -r $RPM_BUILD_ROOT%{gem_dir}/gems/syntax_suggest-*/exe %if %{without batteries} # packaged separately @@ -926,7 +1028,6 @@ done %if %{with doc} # too much .ri %{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/cache.ri -%{__rm} $RPM_BUILD_ROOT%{ruby_ridir}/created.rid %endif %clean @@ -937,7 +1038,7 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) -%doc NEWS LEGAL BSDL README.md README.EXT ChangeLog +%doc NEWS.md LEGAL BSDL README.md README.EXT ChangeLog %attr(755,root,root) %{_bindir}/ruby%{ruby_suffix} %attr(755,root,root) %{_libdir}/libruby.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libruby.so.%{ruby_version} @@ -972,20 +1073,20 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/irb%{ruby_suffix} %{ruby_libdir}/irb.rb %{ruby_libdir}/irb +%{gem_dir}/specifications/default/irb-%{irb_ver}.gemspec %{_mandir}/man1/irb%{ruby_suffix}.1* %files rdoc %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/rdoc%{ruby_suffix} %attr(755,root,root) %{_bindir}/ri%{ruby_suffix} -%{_mandir}/man1/rdoc%{ruby_suffix}.1* %{ruby_libdir}/rdoc %dir %{gem_dir}/gems/rdoc-%{rdoc_ver} %{gem_dir}/gems/rdoc-%{rdoc_ver}/lib %{gem_dir}/specifications/rdoc-%{rdoc_ver}.gemspec -%dir %{gem_dir}/gems/rdoc-5.0.0/exe -%{gem_dir}/gems/rdoc-5.0.0/exe/rdoc -%{gem_dir}/gems/rdoc-5.0.0/exe/ri +%dir %{gem_dir}/gems/rdoc-%{rdoc_ver}/exe +%{gem_dir}/gems/rdoc-%{rdoc_ver}/exe/rdoc +%{gem_dir}/gems/rdoc-%{rdoc_ver}/exe/ri %if %{with batteries} %files rubygems @@ -993,19 +1094,20 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{_bindir}/gem%{ruby_suffix} %{rubygems_dir}/rubygems %{rubygems_dir}/rubygems.rb -%{rubygems_dir}/ubygems.rb -%{rubygems_dir}/rbconfig + +%files bundler +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/bundler%{ruby_suffix} +%attr(755,root,root) %{_bindir}/bundle%{ruby_suffix} +%{gem_dir}/gems/bundler-%{bundler_ver} +%{gem_dir}/specifications/bundler-%{bundler_ver}.gemspec %files rake %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/rake%{ruby_suffix} %dir %{gem_dir}/gems/rake-%{rake_ver} %{gem_dir}/gems/rake-%{rake_ver}/lib -%dir %{gem_dir}/gems/rake-%{rake_ver}/bin -%attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/console -%attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/bin/setup %{gem_dir}/specifications/rake-%{rake_ver}.gemspec -%{gem_dir}/gems/rake-%{rake_ver}/appveyor.yml %dir %{gem_dir}/gems/rake-%{rake_ver}/exe %attr(755,root,root) %{gem_dir}/gems/rake-%{rake_ver}/exe/rake @@ -1017,6 +1119,7 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{ruby_archdir}/json/ext/*.so %dir %{gem_libdir}/json-%{json_ver} +%{gem_libdir}/json-%{json_ver}/gem.build_complete %dir %{gem_libdir}/json-%{json_ver}/lib %dir %{gem_libdir}/json-%{json_ver}/lib/json %dir %{gem_libdir}/json-%{json_ver}/lib/json/ext @@ -1032,9 +1135,6 @@ rm -rf $RPM_BUILD_ROOT %dir %{gem_dir}/gems/power_assert-%{power_assert_ver} %{gem_dir}/gems/power_assert-%{power_assert_ver}/lib %{gem_dir}/specifications/power_assert-%{power_assert_ver}.gemspec -%dir %{gem_dir}/gems/power_assert-0.4.1/benchmarks -%{gem_dir}/gems/power_assert-0.4.1/benchmarks/bm_yhpg.rb -%{gem_dir}/gems/power_assert-0.4.1/benchmarks/helper.rb %files minitest %defattr(644,root,root,755) @@ -1047,35 +1147,37 @@ rm -rf $RPM_BUILD_ROOT %dir %{gem_dir}/gems/test-unit-%{test_unit_ver} %{gem_dir}/gems/test-unit-%{test_unit_ver}/lib %{gem_dir}/specifications/test-unit-%{test_unit_ver}.gemspec -%{_mandir}/man1/testrb%{ruby_suffix}.1* -%files did_you_mean +%files rbs %defattr(644,root,root,755) -%dir %{gem_dir}/gems/did_you_mean-%{did_you_mean_ver} -%{gem_dir}/gems/did_you_mean-%{did_you_mean_ver}/benchmark -%{gem_dir}/gems/did_you_mean-%{did_you_mean_ver}/evaluation -%{gem_dir}/gems/did_you_mean-%{did_you_mean_ver}/lib -%{gem_dir}/specifications/did_you_mean-%{did_you_mean_ver}.gemspec - -%files net-telnet +%attr(755,root,root) %{_bindir}/rbs +%dir %{gem_libdir}/rbs-%{rbs_ver} +%{gem_libdir}/rbs-%{rbs_ver}/gem.build_complete +%attr(755,root,root) %{gem_libdir}/rbs-%{rbs_ver}/rbs_extension.so +%{gem_dir}/gems/rbs-%{rbs_ver} +%exclude %{gem_dir}/gems/rbs-%{rbs_ver}/.* +%{gem_dir}/specifications/rbs-%{rbs_ver}.gemspec + +%files typeprof %defattr(644,root,root,755) -%dir %{gem_dir}/gems/net-telnet-%{net_telnet_ver} -%{gem_dir}/gems/net-telnet-%{net_telnet_ver}/lib -%{gem_dir}/specifications/net-telnet-%{net_telnet_ver}.gemspec +%attr(755,root,root) %{_bindir}/typeprof +%{gem_dir}/gems/typeprof-%{typeprof_ver} +%exclude %{gem_dir}/gems/typeprof-%{typeprof_ver}/.* +%{gem_dir}/specifications/typeprof-%{typeprof_ver}.gemspec %files bigdecimal %defattr(644,root,root,755) %{gem_dir}/gems/bigdecimal-%{bigdecimal_ver} %dir %{gem_libdir}/bigdecimal-%{bigdecimal_ver} -%dir %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib -%attr(755,root,root) %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/lib/bigdecimal.so -%{ruby_libdir}/bigdecimal +%{gem_libdir}/bigdecimal-%{bigdecimal_ver}/gem.build_complete +%attr(755,root,root) %{gem_libdir}/bigdecimal-%{bigdecimal_ver}/bigdecimal.so %{gem_dir}/specifications/bigdecimal-%{bigdecimal_ver}.gemspec %files io-console %defattr(644,root,root,755) %{gem_dir}/gems/io-console-%{io_console_ver} %dir %{gem_libdir}/io-console-%{io_console_ver} +%{gem_libdir}/io-console-%{io_console_ver}/gem.build_complete %dir %{gem_libdir}/io-console-%{io_console_ver}/lib %dir %{gem_libdir}/io-console-%{io_console_ver}/lib/io %attr(755,root,root) %{gem_libdir}/io-console-%{io_console_ver}/lib/io/console.so @@ -1088,54 +1190,159 @@ rm -rf $RPM_BUILD_ROOT %{gem_dir}/gems/psych-%{psych_ver} %{ruby_libdir}/psych %dir %{gem_libdir}/psych-%{psych_ver} +%{gem_libdir}/psych-%{psych_ver}/gem.build_complete %dir %{gem_libdir}/psych-%{psych_ver}/lib %attr(755,root,root) %{gem_libdir}/psych-%{psych_ver}/lib/psych.so %{gem_dir}/specifications/psych-%{psych_ver}.gemspec -%files xmlrpc +%files rexml +%defattr(644,root,root,755) +%dir %{gem_dir}/gems/rexml-%{rexml_ver} +%{gem_dir}/gems/rexml-%{rexml_ver}/lib +%{gem_dir}/specifications/rexml-%{rexml_ver}.gemspec + +%files rss +%defattr(644,root,root,755) +%dir %{gem_dir}/gems/rss-%{rss_ver} +%{gem_dir}/gems/rss-%{rss_ver}/lib +%{gem_dir}/specifications/rss-%{rss_ver}.gemspec + +%files bundled-gems %defattr(644,root,root,755) -%{gem_dir}/gems/xmlrpc-%{xmlrpc_ver} -%{gem_dir}/specifications/xmlrpc-%{xmlrpc_ver}.gemspec +%attr(755,root,root) %{_bindir}/rdbg +%dir %{gem_libdir}/debug-%{debug_ver} +%{gem_libdir}/debug-%{debug_ver}/gem.build_complete +%dir %{gem_libdir}/debug-%{debug_ver}/debug +%attr(755,root,root) %{gem_libdir}/debug-%{debug_ver}/debug/debug.so +%dir %{gem_dir}/gems/debug-%{debug_ver} +%{gem_dir}/gems/debug-%{debug_ver}/exe +%{gem_dir}/gems/debug-%{debug_ver}/lib +%{gem_dir}/specifications/debug-%{debug_ver}.gemspec + +%dir %{gem_dir}/gems/net-ftp-%{net_ftp_ver} +%{gem_dir}/gems/net-ftp-%{net_ftp_ver}/lib +%{gem_dir}/specifications/net-ftp-%{net_ftp_ver}.gemspec + +%dir %{gem_dir}/gems/net-imap-%{net_imap_ver} +%{gem_dir}/gems/net-imap-%{net_imap_ver}/lib +%dir %{gem_dir}/gems/net-imap-%{net_imap_ver}/rakelib +%{gem_dir}/gems/net-imap-%{net_imap_ver}/rakelib/*.* +%{gem_dir}/specifications/net-imap-%{net_imap_ver}.gemspec + +%dir %{gem_dir}/gems/net-pop-%{net_pop_ver} +%{gem_dir}/gems/net-pop-%{net_pop_ver}/lib +%{gem_dir}/specifications/net-pop-%{net_pop_ver}.gemspec + +%dir %{gem_dir}/gems/net-smtp-%{net_smtp_ver} +%{gem_dir}/gems/net-smtp-%{net_smtp_ver}/lib +%{gem_dir}/specifications/net-smtp-%{net_smtp_ver}.gemspec + +%dir %{gem_dir}/gems/matrix-%{matrix_ver} +%{gem_dir}/gems/matrix-%{matrix_ver}/lib +%{gem_dir}/specifications/matrix-%{matrix_ver}.gemspec + +%dir %{gem_dir}/gems/prime-%{prime_ver} +%{gem_dir}/gems/prime-%{prime_ver}/lib +%{gem_dir}/specifications/prime-%{prime_ver}.gemspec + +# Gems moved from default to bundled in 3.4 +%dir %{gem_dir}/gems/abbrev-%{abbrev_ver} +%{gem_dir}/gems/abbrev-%{abbrev_ver}/lib +%{gem_dir}/specifications/abbrev-%{abbrev_ver}.gemspec + +%dir %{gem_dir}/gems/base64-%{base64_ver} +%{gem_dir}/gems/base64-%{base64_ver}/lib +%{gem_dir}/specifications/base64-%{base64_ver}.gemspec + +%dir %{gem_dir}/gems/csv-%{csv_ver} +%{gem_dir}/gems/csv-%{csv_ver}/lib +%{gem_dir}/specifications/csv-%{csv_ver}.gemspec + +%dir %{gem_dir}/gems/drb-%{drb_ver} +%{gem_dir}/gems/drb-%{drb_ver}/lib +%{gem_dir}/specifications/drb-%{drb_ver}.gemspec + +%dir %{gem_dir}/gems/getoptlong-%{getoptlong_ver} +%{gem_dir}/gems/getoptlong-%{getoptlong_ver}/lib +%{gem_dir}/specifications/getoptlong-%{getoptlong_ver}.gemspec + +%dir %{gem_dir}/gems/mutex_m-%{mutex_m_ver} +%{gem_dir}/gems/mutex_m-%{mutex_m_ver}/lib +%{gem_dir}/specifications/mutex_m-%{mutex_m_ver}.gemspec + +%dir %{gem_dir}/gems/nkf-%{nkf_ver} +%{gem_dir}/gems/nkf-%{nkf_ver}/lib +%dir %{gem_libdir}/nkf-%{nkf_ver} +%{gem_libdir}/nkf-%{nkf_ver}/gem.build_complete +%attr(755,root,root) %{gem_libdir}/nkf-%{nkf_ver}/nkf.so +%{gem_dir}/specifications/nkf-%{nkf_ver}.gemspec + +%dir %{gem_dir}/gems/observer-%{observer_ver} +%{gem_dir}/gems/observer-%{observer_ver}/lib +%{gem_dir}/specifications/observer-%{observer_ver}.gemspec + +%dir %{gem_dir}/gems/racc-%{racc_ver} +%{gem_dir}/gems/racc-%{racc_ver}/lib +%dir %{gem_libdir}/racc-%{racc_ver} +%{gem_libdir}/racc-%{racc_ver}/gem.build_complete +%dir %{gem_libdir}/racc-%{racc_ver}/racc +%attr(755,root,root) %{gem_libdir}/racc-%{racc_ver}/racc/cparse.so +%{gem_dir}/specifications/racc-%{racc_ver}.gemspec + +%dir %{gem_dir}/gems/resolv-replace-%{resolv_replace_ver} +%{gem_dir}/gems/resolv-replace-%{resolv_replace_ver}/lib +%{gem_dir}/specifications/resolv-replace-%{resolv_replace_ver}.gemspec + +%dir %{gem_dir}/gems/rinda-%{rinda_ver} +%{gem_dir}/gems/rinda-%{rinda_ver}/lib +%{gem_dir}/specifications/rinda-%{rinda_ver}.gemspec + +%dir %{gem_dir}/gems/syslog-%{syslog_ver} +%{gem_dir}/gems/syslog-%{syslog_ver}/lib +%dir %{gem_libdir}/syslog-%{syslog_ver} +%{gem_libdir}/syslog-%{syslog_ver}/gem.build_complete +%attr(755,root,root) %{gem_libdir}/syslog-%{syslog_ver}/syslog_ext.so +%{gem_dir}/specifications/syslog-%{syslog_ver}.gemspec + +%dir %{gem_dir}/gems/repl_type_completor-%{repl_type_completor_ver} +%{gem_dir}/gems/repl_type_completor-%{repl_type_completor_ver}/lib +%{gem_dir}/specifications/repl_type_completor-%{repl_type_completor_ver}.gemspec + %files modules %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/erb%{ruby_suffix} +%attr(755,root,root) %{_bindir}/syntax_suggest%{ruby_suffix} %{ruby_libdir}/cgi %{ruby_libdir}/digest -%{ruby_libdir}/drb %{ruby_libdir}/fiddle %{ruby_libdir}/io -%{ruby_libdir}/matrix %{ruby_libdir}/net %{ruby_libdir}/openssl %{ruby_libdir}/optparse -%{ruby_libdir}/racc -%{ruby_libdir}/rbconfig -%{ruby_libdir}/rexml -%{ruby_libdir}/rinda +%{ruby_libdir}/prism %{ruby_libdir}/ripper -%{ruby_libdir}/rss -%{ruby_libdir}/shell -%{ruby_libdir}/syslog %{ruby_libdir}/test %{ruby_libdir}/uri -%{ruby_libdir}/webrick %{ruby_libdir}/yaml - %{ruby_libdir}/English.rb -%{ruby_libdir}/abbrev.rb -%{ruby_libdir}/base64.rb %{ruby_libdir}/benchmark.rb +%{ruby_libdir}/bundled_gems.rb +%{ruby_libdir}/bundler +%{ruby_libdir}/bundler.rb %{ruby_libdir}/cgi.rb -%{ruby_libdir}/cmath.rb -%{ruby_libdir}/csv.rb +%{ruby_libdir}/coverage.rb %{ruby_libdir}/date.rb -%{ruby_libdir}/debug.rb %{ruby_libdir}/delegate.rb +%{ruby_libdir}/did_you_mean.rb +%{ruby_libdir}/did_you_mean %{ruby_libdir}/digest.rb -%{ruby_libdir}/drb.rb -%{ruby_libdir}/e2mmap.rb +%{ruby_libdir}/error_highlight.rb +%dir %{ruby_libdir}/error_highlight +%{ruby_libdir}/error_highlight/*.rb %{ruby_libdir}/erb.rb +%dir %{ruby_libdir}/erb +%{ruby_libdir}/erb/*.rb %{ruby_libdir}/expect.rb %{ruby_libdir}/fiddle.rb %{ruby_libdir}/fileutils.rb @@ -1143,18 +1350,19 @@ rm -rf $RPM_BUILD_ROOT %{ruby_libdir}/forwardable.rb %dir %{ruby_libdir}/forwardable %{ruby_libdir}/forwardable/impl.rb -%{ruby_libdir}/getoptlong.rb %{ruby_libdir}/ipaddr.rb %{ruby_libdir}/json.rb -%{ruby_libdir}/kconv.rb %{ruby_libdir}/logger.rb -%{ruby_libdir}/mathn.rb -%{ruby_libdir}/matrix.rb +%dir %{ruby_libdir}/logger +%{ruby_libdir}/logger/*.rb %{ruby_libdir}/monitor.rb -%{ruby_libdir}/mutex_m.rb -%{ruby_libdir}/observer.rb +%{ruby_libdir}/objspace.rb +%dir %{ruby_libdir}/objspace +%{ruby_libdir}/objspace/*.rb %{ruby_libdir}/open-uri.rb %{ruby_libdir}/open3.rb +%dir %{ruby_libdir}/open3 +%{ruby_libdir}/open3/version.rb %{ruby_libdir}/openssl.rb %{ruby_libdir}/optionparser.rb %{ruby_libdir}/optparse.rb @@ -1162,70 +1370,74 @@ rm -rf $RPM_BUILD_ROOT %{ruby_libdir}/pathname.rb %{ruby_libdir}/pp.rb %{ruby_libdir}/prettyprint.rb -%{ruby_libdir}/prime.rb -%{ruby_libdir}/profile.rb -%{ruby_libdir}/profiler.rb +%{ruby_libdir}/prism.rb %{ruby_libdir}/pstore.rb +%dir %{ruby_libdir}/random +%{ruby_libdir}/random/*.rb %{ruby_libdir}/rdoc.rb -%{ruby_libdir}/resolv-replace.rb +%{ruby_libdir}/readline.rb +%{ruby_libdir}/reline.rb +%dir %{ruby_libdir}/reline +%{ruby_libdir}/reline/*.rb +%dir %{ruby_libdir}/reline/key_actor +%{ruby_libdir}/reline/key_actor/*.rb +%dir %{ruby_libdir}/reline/io +%{ruby_libdir}/reline/io/*.rb +%dir %{ruby_libdir}/reline/unicode +%{ruby_libdir}/reline/unicode/*.rb %{ruby_libdir}/resolv.rb %{ruby_libdir}/ripper.rb -%{ruby_libdir}/rss.rb -%{ruby_libdir}/scanf.rb +%dir %{ruby_libdir}/ruby_vm +%{ruby_libdir}/ruby_vm/rjit %{ruby_libdir}/securerandom.rb %{ruby_libdir}/set.rb -%{ruby_libdir}/shell.rb +%dir %{ruby_libdir}/set +%{ruby_libdir}/set/*.rb %{ruby_libdir}/shellwords.rb %{ruby_libdir}/singleton.rb %{ruby_libdir}/socket.rb -%{ruby_libdir}/sync.rb +%{ruby_libdir}/strscan +%{ruby_libdir}/syntax_suggest.rb +%dir %{ruby_libdir}/syntax_suggest +%{ruby_libdir}/syntax_suggest/*.rb +%dir %{ruby_libdir}/syntax_suggest/capture +%{ruby_libdir}/syntax_suggest/capture/*.rb %{ruby_libdir}/tempfile.rb -%{ruby_libdir}/thwait.rb %{ruby_libdir}/time.rb %{ruby_libdir}/timeout.rb %{ruby_libdir}/tmpdir.rb -%{ruby_libdir}/tracer.rb %{ruby_libdir}/tsort.rb %{ruby_libdir}/un.rb %{ruby_libdir}/unicode_normalize -%{ruby_libdir}/unicode_normalize.rb %{ruby_libdir}/uri.rb %{ruby_libdir}/weakref.rb -%{ruby_libdir}/webrick.rb %{ruby_libdir}/yaml.rb %if %{with batteries} %exclude %{ruby_libdir}/rubygems.rb -%exclude %{ruby_libdir}/ubygems.rb -%exclude %{ruby_libdir}/rbconfig/datadir.rb %endif %exclude %{ruby_libdir}/irb.rb %exclude %{ruby_libdir}/mkmf.rb %{ruby_archdir}/rbconfig.rb -%attr(755,root,root) %{ruby_archdir}/bigdecimal.so %attr(755,root,root) %{ruby_archdir}/continuation.so %attr(755,root,root) %{ruby_archdir}/coverage.so %attr(755,root,root) %{ruby_archdir}/date_core.so -%attr(755,root,root) %{ruby_archdir}/dbm.so %attr(755,root,root) %{ruby_archdir}/digest.so %attr(755,root,root) %{ruby_archdir}/etc.so +%dir %{ruby_archdir}/erb +%attr(755,root,root) %{ruby_archdir}/erb/escape.so %attr(755,root,root) %{ruby_archdir}/fcntl.so -%attr(755,root,root) %{ruby_archdir}/fiber.so %attr(755,root,root) %{ruby_archdir}/fiddle.so -%attr(755,root,root) %{ruby_archdir}/gdbm.so -%attr(755,root,root) %{ruby_archdir}/nkf.so +%attr(755,root,root) %{ruby_archdir}/monitor.so %attr(755,root,root) %{ruby_archdir}/objspace.so %attr(755,root,root) %{ruby_archdir}/openssl.so %attr(755,root,root) %{ruby_archdir}/pathname.so %attr(755,root,root) %{ruby_archdir}/pty.so -%attr(755,root,root) %{ruby_archdir}/readline.so %attr(755,root,root) %{ruby_archdir}/ripper.so -%attr(755,root,root) %{ruby_archdir}/sdbm.so %attr(755,root,root) %{ruby_archdir}/socket.so %attr(755,root,root) %{ruby_archdir}/stringio.so %attr(755,root,root) %{ruby_archdir}/strscan.so -%attr(755,root,root) %{ruby_archdir}/syslog.so %attr(755,root,root) %{ruby_archdir}/zlib.so %dir %{ruby_archdir}/cgi @@ -1238,10 +1450,6 @@ rm -rf $RPM_BUILD_ROOT %attr(755,root,root) %{ruby_archdir}/enc/trans/*.so %dir %{ruby_archdir}/io %attr(755,root,root) %{ruby_archdir}/io/*.so -%dir %{ruby_archdir}/mathn -%attr(755,root,root) %{ruby_archdir}/mathn/*.so -%dir %{ruby_archdir}/racc -%attr(755,root,root) %{ruby_archdir}/racc/*.so %dir %{ruby_archdir}/rbconfig %attr(755,root,root) %{ruby_archdir}/rbconfig/sizeof.so @@ -1250,9 +1458,12 @@ rm -rf $RPM_BUILD_ROOT %dir %{gem_dir} %dir %{gem_dir}/gems +# for libexec/erb +%{gem_dir}/gems/erb-%{erb_ver} + %dir %{gem_dir}/specifications %dir %{gem_dir}/specifications/default -%{gem_dir}/specifications/default/openssl-%{openssl_ver}.gemspec +%{gem_dir}/specifications/default/*.gemspec %{_mandir}/man1/erb%{ruby_suffix}.1* %{_mandir}/man1/ri%{ruby_suffix}.1* @@ -1260,243 +1471,27 @@ rm -rf $RPM_BUILD_ROOT %if %{with doc} %files doc %defattr(644,root,root,755) -%doc ruby_%{doc_version}_stdlib -%doc ruby_%{doc_version}_core +%doc ruby_%{doc_version}_complete %files doc-ri %defattr(644,root,root,755) -%{ruby_ridir}/ACL -%{ruby_ridir}/ARGF -%{ruby_ridir}/Abbrev -%{ruby_ridir}/Addrinfo -%{ruby_ridir}/ArgumentError -%{ruby_ridir}/Array -%{ruby_ridir}/Base64 -%{ruby_ridir}/BasicObject -%{ruby_ridir}/BasicSocket -%{ruby_ridir}/Benchmark -%{ruby_ridir}/BigDecimal -%{ruby_ridir}/BigMath -%{ruby_ridir}/Binding -%{ruby_ridir}/CGI -%{ruby_ridir}/CMath -%{ruby_ridir}/CSV -%{ruby_ridir}/Class -%{ruby_ridir}/ClosedQueueError -%{ruby_ridir}/Comparable -%{ruby_ridir}/Complex -%{ruby_ridir}/ConditionVariable -%{ruby_ridir}/Continuation -%{ruby_ridir}/Coverage -%{ruby_ridir}/DBM -%{ruby_ridir}/DBMError -%{ruby_ridir}/DEBUGGER__ -%{ruby_ridir}/DRb -%{ruby_ridir}/Data -%{ruby_ridir}/Date -%{ruby_ridir}/DateTime -%{ruby_ridir}/Delegator -%{ruby_ridir}/Digest -%{ruby_ridir}/Dir -%{ruby_ridir}/ENV -%{ruby_ridir}/EOFError -%{ruby_ridir}/ERB -%{ruby_ridir}/EXCEPTION_TYPE -%{ruby_ridir}/Encoding -%{ruby_ridir}/EncodingError -%{ruby_ridir}/English -%{ruby_ridir}/Enumerable -%{ruby_ridir}/Enumerator -%{ruby_ridir}/Errno -%{ruby_ridir}/Etc -%{ruby_ridir}/Exception -%{ruby_ridir}/Exception2MessageMapper -%{ruby_ridir}/FalseClass -%{ruby_ridir}/Fcntl -%{ruby_ridir}/Fiber -%{ruby_ridir}/FiberError -%{ruby_ridir}/Fiddle -%{ruby_ridir}/File -%{ruby_ridir}/FileTest -%{ruby_ridir}/FileUtils -%{ruby_ridir}/Find -%{ruby_ridir}/Float -%{ruby_ridir}/FloatDomainError -%{ruby_ridir}/Forwardable -%{ruby_ridir}/GC -%{ruby_ridir}/GDBM -%{ruby_ridir}/GDBMError -%{ruby_ridir}/GDBMFatalError -%{ruby_ridir}/Gem -%{ruby_ridir}/GetoptLong -%{ruby_ridir}/HTTPMovedTemporarily -%{ruby_ridir}/HTTPMultipleChoice -%{ruby_ridir}/HTTPRequestURITooLarge -%{ruby_ridir}/Hash -%{ruby_ridir}/IO -%{ruby_ridir}/IOError -%{ruby_ridir}/IPAddr -%{ruby_ridir}/IPSocket -%{ruby_ridir}/IRB -%{ruby_ridir}/IndexError -%{ruby_ridir}/Integer -%{ruby_ridir}/Interrupt -%{ruby_ridir}/JSON -%{ruby_ridir}/Jacobian -%{ruby_ridir}/Kconv -%{ruby_ridir}/Kernel -%{ruby_ridir}/KeyError -%{ruby_ridir}/LUSolve -%{ruby_ridir}/LoadError -%{ruby_ridir}/LocalJumpError -%{ruby_ridir}/Logger -%{ruby_ridir}/MakeMakefile -%{ruby_ridir}/Marshal -%{ruby_ridir}/MatchData -%{ruby_ridir}/Math -%{ruby_ridir}/Matrix -%{ruby_ridir}/Method -%{ruby_ridir}/Module -%{ruby_ridir}/Monitor -%{ruby_ridir}/MonitorMixin -%{ruby_ridir}/Mutex_m -%{ruby_ridir}/NKF -%{ruby_ridir}/NameError -%{ruby_ridir}/Net -%{ruby_ridir}/Newton -%{ruby_ridir}/NilClass -%{ruby_ridir}/NoMemoryError -%{ruby_ridir}/NoMethodError -%{ruby_ridir}/NotImplementedError -%{ruby_ridir}/Numeric -%{ruby_ridir}/OLEProperty -%{ruby_ridir}/Object -%{ruby_ridir}/ObjectSpace -%{ruby_ridir}/Observable -%{ruby_ridir}/Open3 -%{ruby_ridir}/OpenSSL -%{ruby_ridir}/OpenStruct -%{ruby_ridir}/OpenURI -%{ruby_ridir}/OptionParser -%{ruby_ridir}/PP -%{ruby_ridir}/PStore -%{ruby_ridir}/PTY -%{ruby_ridir}/Pathname -%{ruby_ridir}/PrettyPrint -%{ruby_ridir}/Prime -%{ruby_ridir}/Proc -%{ruby_ridir}/Process -%{ruby_ridir}/Profiler__ -%{ruby_ridir}/Psych -%{ruby_ridir}/Queue -%{ruby_ridir}/RDoc -%{ruby_ridir}/RDocTask -%{ruby_ridir}/REXML -%{ruby_ridir}/RSS -%{ruby_ridir}/Racc -%{ruby_ridir}/Rake -%{ruby_ridir}/Random -%{ruby_ridir}/Range -%{ruby_ridir}/RangeError -%{ruby_ridir}/Rational -%{ruby_ridir}/RbConfig -%{ruby_ridir}/Readline -%{ruby_ridir}/Regexp -%{ruby_ridir}/RegexpError -%{ruby_ridir}/Resolv -%{ruby_ridir}/Rinda -%{ruby_ridir}/Ripper -%{ruby_ridir}/RubyLex -%{ruby_ridir}/RubyToken -%{ruby_ridir}/RubyVM -%{ruby_ridir}/RuntimeError -%{ruby_ridir}/SDBM -%{ruby_ridir}/SDBMError -%{ruby_ridir}/SOCKSSocket -%{ruby_ridir}/Scanf -%{ruby_ridir}/ScriptError -%{ruby_ridir}/SecureRandom -%{ruby_ridir}/SecurityError -%{ruby_ridir}/Set -%{ruby_ridir}/Shell -%{ruby_ridir}/Shellwords -%{ruby_ridir}/Signal -%{ruby_ridir}/SignalException -%{ruby_ridir}/SimpleDelegator -%{ruby_ridir}/SingleForwardable -%{ruby_ridir}/Singleton -%{ruby_ridir}/SizedQueue -%{ruby_ridir}/Socket -%{ruby_ridir}/SocketError -%{ruby_ridir}/SortedSet -%{ruby_ridir}/StandardError -%{ruby_ridir}/StopIteration -%{ruby_ridir}/String -%{ruby_ridir}/StringIO -%{ruby_ridir}/StringScanner -%{ruby_ridir}/Struct -%{ruby_ridir}/Symbol -%{ruby_ridir}/Sync -%{ruby_ridir}/Sync_m -%{ruby_ridir}/Synchronizer -%{ruby_ridir}/Synchronizer_m -%{ruby_ridir}/SyntaxError -%{ruby_ridir}/Syslog -%{ruby_ridir}/SystemCallError -%{ruby_ridir}/SystemExit -%{ruby_ridir}/SystemStackError -%{ruby_ridir}/TCPServer -%{ruby_ridir}/TCPSocket -%{ruby_ridir}/TSort -%{ruby_ridir}/TempIO -%{ruby_ridir}/Tempfile -%{ruby_ridir}/Test -%{ruby_ridir}/ThWait -%{ruby_ridir}/Thread -%{ruby_ridir}/ThreadError -%{ruby_ridir}/ThreadGroup -%{ruby_ridir}/ThreadsWait -%{ruby_ridir}/Time -%{ruby_ridir}/Timeout -%{ruby_ridir}/TracePoint -%{ruby_ridir}/Tracer -%{ruby_ridir}/TrueClass -%{ruby_ridir}/TypeError -%{ruby_ridir}/UDPSocket -%{ruby_ridir}/UNIXServer -%{ruby_ridir}/UNIXSocket -%{ruby_ridir}/URI -%{ruby_ridir}/UnboundMethod -%{ruby_ridir}/UncaughtThrowError -%{ruby_ridir}/UnicodeNormalize -%{ruby_ridir}/Vector -%{ruby_ridir}/WEBrick -%{ruby_ridir}/WIN32OLE -%{ruby_ridir}/WIN32OLERuntimeError -%{ruby_ridir}/WIN32OLE_EVENT -%{ruby_ridir}/WIN32OLE_METHOD -%{ruby_ridir}/WIN32OLE_PARAM -%{ruby_ridir}/WIN32OLE_RECORD -%{ruby_ridir}/WIN32OLE_TYPE -%{ruby_ridir}/WIN32OLE_TYPELIB -%{ruby_ridir}/WIN32OLE_VARIABLE -%{ruby_ridir}/WIN32OLE_VARIANT -%{ruby_ridir}/Warning -%{ruby_ridir}/WeakRef -%{ruby_ridir}/XML -%{ruby_ridir}/XMLEncoding_ja -%{ruby_ridir}/XMP -%{ruby_ridir}/YAML -%{ruby_ridir}/ZeroDivisionError -%{ruby_ridir}/Zlib +%{ruby_ridir}/[A-Z]* +%{ruby_ridir}/contributing %{ruby_ridir}/fatal -%{ruby_ridir}/lib +%{ruby_ridir}/date +%{ruby_ridir}/regexp +%{ruby_ridir}/rjit +%{ruby_ridir}/ruby %{ruby_ridir}/syntax -%{ruby_ridir}/unknown -%{ruby_ridir}/page-ChangeLog*.ri -%{ruby_ridir}/page-NEWS*.ri +%{ruby_ridir}/optparse +%lang(ja) %{ruby_ridir}/page-COPYING_ja.ri +%lang(ja) %{ruby_ridir}/page-README_ja_md.ri +%{ruby_ridir}/page-COPYING.ri +%{ruby_ridir}/page-LEGAL.ri +%{ruby_ridir}/page-NEWS_md.ri %{ruby_ridir}/page-README_md.ri -%{ruby_ridir}/page-*_rdoc.ri +%{ruby_ridir}/page-[a-z]*.ri +%{ruby_ridir}/yjit %endif %files examples diff --git a/rubygems-2.0.0-binary-extensions.patch b/rubygems-2.0.0-binary-extensions.patch deleted file mode 100644 index 4876d35..0000000 --- a/rubygems-2.0.0-binary-extensions.patch +++ /dev/null @@ -1,344 +0,0 @@ -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/8] 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 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 - 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") -+ end -+ -+ ## - # Deprecated and ignored, defaults to true. - # - # 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 -- 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 - 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 - -- 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 - 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 ---- a/lib/rubygems/defaults.rb -+++ b/lib/rubygems/defaults.rb -@@ -101,6 +101,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/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 - - 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.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 - diff --git a/rubygems.patch b/rubygems.patch deleted file mode 100644 index 7d6ab9b..0000000 --- a/rubygems.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ruby-2.4.4/lib/rubygems/exceptions.rb~ 2018-11-03 22:58:19.872127348 +0200 -+++ ruby-2.4.4/lib/rubygems/exceptions.rb 2018-11-03 21:39:23.000000000 +0200 -@@ -4,6 +4,8 @@ - # Each exception needs a brief description and the scenarios where it is - # likely to be raised - -+require 'rubygems' -+ - ## - # Base exception class for RubyGems. All exception raised by RubyGems are a - # subclass of this one. diff --git a/strip-ccache.patch b/strip-ccache.patch index c9e33cb..394824f 100644 --- a/strip-ccache.patch +++ b/strip-ccache.patch @@ -7,24 +7,4 @@ + when /^(CC|CXX)$/; val.sub!(/ccache /, '') when /^arch$/; if val.empty? then val = arch else arch = val end when /^sitearch$/; val = '$(arch)' if val.empty? - end ---- ruby-2.2.7/common.mk~ 2017-04-19 20:22:53.000000000 +0300 -+++ ruby-2.2.7/common.mk 2017-04-19 20:23:24.847180464 +0300 -@@ -66,7 +66,7 @@ - MINIOBJS = $(ARCHMINIOBJS) miniinit.$(OBJEXT) dmyext.$(OBJEXT) miniprelude.$(OBJEXT) - ENC_MK = enc.mk - MAKE_ENC = -f $(ENC_MK) V="$(V)" UNICODE_HDR_DIR="$(UNICODE_HDR_DIR)" \ -- RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(MFLAGS) -+ RUBY="$(MINIRUBY)" MINIRUBY="$(MINIRUBY)" $(MFLAGS) CC="$(CC)" - - COMMONOBJS = array.$(OBJEXT) \ - bignum.$(OBJEXT) \ -@@ -186,7 +186,7 @@ - configure-ext: $(EXTS_MK) - - build-ext: $(EXTS_MK) -- $(Q)$(MAKE) -f $(EXTS_MK) $(MFLAGS) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) \ -+ $(Q)$(MAKE) -f $(EXTS_MK) $(MFLAGS) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) CC="$(CC)" \ - EXTENCS="$(ENCOBJS)" UPDATE_LIBRARIES=no $(EXTSTATIC) - - prog: program wprogram + when /^DESTDIR$/; next diff --git a/testrb.1 b/testrb.1 deleted file mode 100644 index eaef767..0000000 --- a/testrb.1 +++ /dev/null @@ -1,60 +0,0 @@ -.\" DO NOT MODIFY THIS FILE! it was generated by rd2 -.TH testrb 1 "December 2003" -.SH NAME -.PP -testrb \- Automatic runner for Test::Unit of Ruby -.SH SYNOPSIS -.PP -testrb [options] [\-\- untouched arguments] test ... -.SH DESCRIPTION -.PP -testrb loads and runs unit\-tests. If test is directory name, testrb1.8 -testrb traverses the directory. -.SH OPTIONS -.TP -.fi -.B -\-r, \-\-runner=RUNNER -Use the given RUNNER. (t[k], c[onsole], g[tk], f[ox]) -.TP -.fi -.B -\-a, \-\-add=TORUN -Add TORUN to the list of things to run; can be a file or a directory. -.TP -.fi -.B -\-p, \-\-pattern=PATTERN -Match files to collect against PATTERN. (default pattern is -/\\Atest_.*\\.rb\\Z/.) -.TP -.fi -.B -\-n, \-\-name=NAME -Runs tests matching NAME. (patterns may be used.) -.TP -.fi -.B -\-t, \-\-testcase=TESTCASE -Runs tests in TestCases matching TESTCASE. (patterns may be used.) -.TP -.fi -.B -\-v, \-\-verbose=[LEVEL] -Set the output level (default is verbose). (p[rogress], n[ormal], -v[erbose], s[ilent]) -.TP -.fi -.B -\-\- -Stop processing options so that the remaining options will be passed to -the test. -.TP -.fi -.B -\-h, \-\-help -Display help. -.SH AUTHOR -.PP -This manpage was contributed by akira yamada - -- 2.52.0