Compare commits

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

16 commits

Author SHA1 Message Date
Vít Ondruch
9813501744 Exclude json.rb from ruby-libs (rhbz#1397370). 2016-11-22 14:02:28 +01:00
Vít Ondruch
c14e846c99 Ensure there is not forgotten any certificate. 2016-11-18 21:58:30 +01:00
Vít Ondruch
371685199a Improve macro documentation. 2016-11-18 21:58:30 +01:00
Vít Ondruch
f2f4043b17 Add gemspec_add_dep and gemspec_remove_dep macros. 2016-11-18 21:58:30 +01:00
Vít Ondruch
be52f67dcb Update to Ruby 2.2.6. 2016-11-18 21:58:25 +01:00
Vít Ondruch
868c72c961 Make symlinks for json gem. 2016-07-12 13:54:34 +02:00
Vít Ondruch
21d58b05be Fix random TestRubyOptimization#test_tailcall_inhibited_by_rescue failures. 2016-05-02 17:24:27 +02:00
Vít Ondruch
ed84560c57 Update to Ruby 2.2.5. 2016-05-02 16:43:43 +02:00
Vít Ondruch
5bbe8360a5 Update to Ruby 2.2.4. 2015-12-21 14:13:36 +01:00
Vít Ondruch
da295712c5 Move the ABRT hook test into separate file. 2015-12-13 20:41:37 +01:00
Vít Ondruch
6f72a0e6f3 Ensure that abrt hook is used. 2015-12-11 10:58:27 +01:00
Vít Ondruch
91f189190b Fix ABRT hook autoloading. 2015-12-11 10:58:02 +01:00
Michal Toman
3ce8f985fc Add support for MIPS architecture to config.h 2015-09-04 14:57:25 +02:00
Vít Ondruch
a5509d0e6d Fix RubyGems version. 2015-09-02 15:47:34 +02:00
Vít Ondruch
15b51a227c Update to Ruby 2.2.3. 2015-09-01 14:26:01 +02:00
Vít Ondruch
a84d5163f0 Fix test broken by disabled SSLv3 in OpenSSL. 2015-09-01 14:25:57 +02:00
15 changed files with 207 additions and 210 deletions

4
.gitignore vendored
View file

@ -2,3 +2,7 @@
/ruby-2.2.0.tar.xz
/ruby-2.2.1.tar.xz
/ruby-2.2.2.tar.xz
/ruby-2.2.3.tar.xz
/ruby-2.2.4.tar.xz
/ruby-2.2.5.tar.xz
/ruby-2.2.6.tar.xz

View file

@ -44,6 +44,14 @@
#include "ruby/config-sparc.h"
#elif defined(__aarch64__)
#include "ruby/config-aarch64.h"
#elif defined(__mips64) && defined(__MIPSEL__)
#include "ruby/config-mips64el.h"
#elif defined(__mips64)
#include "ruby/config-mips64.h"
#elif defined(__mips) && defined(__MIPSEL__)
#include "ruby/config-mipsel.h"
#elif defined(__mips)
#include "ruby/config-mips.h"
#else
#error "The ruby-devel package is not usable with the architecture."
#endif

View file

@ -10,9 +10,14 @@
%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
# Install gem into appropriate directory.
# -n<gem_file> Overrides gem file name for installation.
# -d<install_dir> Set installation directory.
# %gem_install - Install gem into appropriate directory.
#
# Usage: %gem_install [options]
#
# -n <gem_file> Overrides gem file name for installation.
# -d <install_dir> Set installation directory.
#
%gem_install(d:n:) \
mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \
\
@ -27,6 +32,7 @@ gem install \\\
%{-n*}%{!?-n:%{gem_name}-%{version}.gem} \
%{nil}
# For rubygems packages we want to filter out any provides caused by private
# libs in %%{gem_archdir}.
#
@ -35,3 +41,91 @@ gem install \\\
%rubygems_default_filter %{expand: \
%global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \
}
# The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not
# essential, but it is usefull to make the sript appear in build log.
# %gemspec_add_dep - Add dependency into .gemspec.
#
# Usage: %gemspec_add_dep -g <gem> [options] [requirements]
#
# Add dependency named <gem> to .gemspec file. The macro adds runtime
# dependency by default. The [requirements] argument can be used to specify
# the dependency constraints more precisely. It is expected to be valid Ruby
# code.
#
# -s <gemspec_file> Overrides the default .gemspec location.
# -d Add development dependecy.
#
%gemspec_add_dep(g:s:d) \
read -d '' gemspec_add_dep_script << 'EOR' || : \
gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \
\
name = '%{-g*}' \
requirements = %{*}%{!?1:nil} \
\
type = :%{!?-d:runtime}%{?-d:development} \
\
spec = Gem::Specification.load(gemspec_file) \
abort("#{gemspec_file} is not accessible.") unless spec \
\
dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \
if dep \
dep.requirement.concat requirements \
else \
spec.public_send "add_#{type}_dependency", name, requirements \
end \
File.write gemspec_file, spec.to_ruby \
EOR\
echo "$gemspec_add_dep_script" | ruby \
unset -v gemspec_add_dep_script \
%{nil}
# %gemspec_remove_dep - Remove dependency from .gemspec.
#
# Usage: %gemspec_remove_dep -g <gem> [options] [requirements]
#
# Remove dependency named <gem> from .gemspec file. The macro removes runtime
# dependency by default. The [requirements] argument can be used to specify
# the dependency constraints more precisely. It is expected to be valid Ruby
# code. The macro fails if these specific requirements can't be removed.
#
# -s <gemspec_file> Overrides the default .gemspec location.
# -d Remove development dependecy.
#
%gemspec_remove_dep(g:s:d) \
read -d '' gemspec_remove_dep_script << 'EOR' || : \
gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \
\
name = '%{-g*}' \
requirements = %{*}%{!?1:nil} \
\
type = :%{!?-d:runtime}%{?-d:development} \
\
spec = Gem::Specification.load(gemspec_file) \
abort("#{gemspec_file} is not accessible.") unless spec \
\
dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \
if dep \
if requirements \
requirements = Gem::Requirement.create(requirements).requirements \
requirements.each do |r| \
unless dep.requirement.requirements.reject! { |dependency_requirements| dependency_requirements == r } \
abort("Requirement '#{r.first} #{r.last}' was not possible to remove for dependency '#{dep}'!") \
end \
end \
spec.dependencies.delete dep if dep.requirement.requirements.empty? \
else \
spec.dependencies.delete dep \
end \
else \
abort("Dependency '#{name}' was not found!") \
end \
File.write gemspec_file, spec.to_ruby \
EOR\
echo "$gemspec_remove_dep_script" | ruby \
unset -v gemspec_remove_dep_script \
%{nil}

View file

@ -11,7 +11,7 @@ diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 682eb46..e6b1445 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1858,7 +1858,7 @@ SRC
@@ -1859,7 +1859,7 @@ SRC
SHELL = /bin/sh
# V=0 quiet, V=1 verbose. other values don't work.

View file

@ -26,7 +26,7 @@ diff --git a/common.mk b/common.mk
index 5cfbc3d..3f0a82e 100644
--- a/common.mk
+++ b/common.mk
@@ -115,7 +115,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
@@ -117,7 +117,7 @@ ALLOBJS = $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS)
GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
DEFAULT_PRELUDES = $(GEM_PRELUDE)
@ -39,7 +39,7 @@ diff --git a/configure.in b/configure.in
index 0e371e2..d4f1dcb 100644
--- a/configure.in
+++ b/configure.in
@@ -4160,6 +4160,13 @@ AC_SUBST(rubyarchhdrdir)dnl
@@ -4209,6 +4209,13 @@ AC_SUBST(rubyarchhdrdir)dnl
AC_SUBST(sitearchhdrdir)dnl
AC_SUBST(vendorarchhdrdir)dnl

View file

@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
index 37d9a62..553d4d0 100644
--- a/configure.in
+++ b/configure.in
@@ -3379,6 +3379,11 @@ if test ${multiarch+set}; then
@@ -3425,6 +3425,11 @@ if test ${multiarch+set}; then
fi
archlibdir='${libdir}/${arch}'

View file

@ -14,7 +14,7 @@ diff --git a/configure.in b/configure.in
index 17ed3ed..5843651 100644
--- a/configure.in
+++ b/configure.in
@@ -3966,8 +3966,6 @@ AS_CASE(["$target_os"],
@@ -4015,8 +4015,6 @@ AS_CASE(["$target_os"],
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
@ -23,7 +23,7 @@ index 17ed3ed..5843651 100644
rubyarchprefix=${multiarch+'${archlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${arch}'}
AC_ARG_WITH(rubyarchprefix,
@@ -3997,6 +3995,7 @@ AC_ARG_WITH(ruby-version,
@@ -4046,6 +4044,7 @@ AC_ARG_WITH(ruby-version,
[ruby_version=full])
unset RUBY_LIB_VERSION
unset RUBY_LIB_VERSION_STYLE
@ -31,7 +31,7 @@ index 17ed3ed..5843651 100644
AS_CASE(["$ruby_version"],
[full], [RUBY_LIB_VERSION_STYLE='3 /* full */'],
[minor], [RUBY_LIB_VERSION_STYLE='2 /* minor */'])
@@ -4013,30 +4012,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then
@@ -4062,30 +4061,34 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; then
ruby_version="`$CPP -I. -I"${srcdir}" -I"${srcdir}/include" conftest.c | sed '/^ruby_version=/!d;s/ //g'`"
eval $ruby_version
elif test -z "${ruby_version}"; then

View file

@ -11,7 +11,7 @@ diff --git a/configure.in b/configure.in
index 553d4d0..03a4152 100644
--- a/configure.in
+++ b/configure.in
@@ -4078,6 +4078,8 @@ AC_SUBST(vendorarchdir)dnl
@@ -4127,6 +4127,8 @@ AC_SUBST(vendorarchdir)dnl
AC_SUBST(configure_args, "`echo "${ac_configure_args}" | sed 's/\\$/$$/g'`")dnl

View file

@ -15,7 +15,7 @@ diff --git a/configure.in b/configure.in
index 03a4152..0e371e2 100644
--- a/configure.in
+++ b/configure.in
@@ -4052,6 +4052,10 @@ AC_ARG_WITH(vendorarchdir,
@@ -4101,6 +4101,10 @@ AC_ARG_WITH(vendorarchdir,
[vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
@ -26,7 +26,7 @@ index 03a4152..0e371e2 100644
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
RUBY_EXEC_PREFIX=''
@@ -4075,6 +4079,7 @@ AC_SUBST(sitearchdir)dnl
@@ -4124,6 +4128,7 @@ AC_SUBST(sitearchdir)dnl
AC_SUBST(vendordir)dnl
AC_SUBST(vendorlibdir)dnl
AC_SUBST(vendorarchdir)dnl

View file

@ -1,141 +0,0 @@
diff --git a/ChangeLog b/ChangeLog
index 909c092..9f09144 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -70,1 +70,6 @@
+Tue Mar 24 17:30:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * ext/-test-/file/fs.c (get_fsname): return filesystem name by
+ statfs/statvfs. [ruby-core:68624] [Bug #10998]
+
Thu Feb 26 15:48:41 2015 NAKAMURA Usaku <usa@ruby-lang.org>
diff --git a/ext/-test-/file/extconf.rb b/ext/-test-/file/extconf.rb
index 4e134dd..be4a2fb 100644
--- a/ext/-test-/file/extconf.rb
+++ b/ext/-test-/file/extconf.rb
@@ -1,4 +1,18 @@
$INCFLAGS << " -I$(topdir) -I$(top_srcdir)"
+
+headers = %w[sys/param.h sys/mount.h sys/vfs.h].select {|h| have_header(h)}
+if have_type("struct statfs", headers)
+ have_struct_member("struct statfs", "f_fstypename", headers)
+ have_struct_member("struct statfs", "f_type", headers)
+end
+
+headers = %w[sys/statvfs.h]
+if have_type("struct statvfs", headers)
+ have_struct_member("struct statvfs", "f_fstypename", headers)
+ have_struct_member("struct statvfs", "f_basetype", headers)
+ have_struct_member("struct statvfs", "f_type", headers)
+end
+
$srcs = Dir[File.join($srcdir, "*.{#{SRC_EXT.join(%q{,})}}")]
inits = $srcs.map {|s| File.basename(s, ".*")}
inits.delete("init")
diff --git a/ext/-test-/file/fs.c b/ext/-test-/file/fs.c
index 4a41bf3..94d96d3 100644
--- a/ext/-test-/file/fs.c
+++ b/ext/-test-/file/fs.c
@@ -1,55 +1,64 @@
#include "ruby/ruby.h"
#include "ruby/io.h"
-#ifdef __linux__
-# define HAVE_GETMNTENT
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
#endif
-#ifdef HAVE_GETMNTENT
-# include <stdio.h>
-# include <mntent.h>
+#if defined HAVE_STRUCT_STATFS_F_FSTYPENAME
+typedef struct statfs statfs_t;
+# define STATFS(f, s) statfs((f), (s))
+# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1
+#elif defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME) /* NetBSD */
+typedef struct statvfs statfs_t;
+# define STATFS(f, s) statvfs((f), (s))
+# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1
+#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE) /* AIX, HP-UX, Solaris */
+typedef struct statvfs statfs_t;
+# define STATFS(f, s) statvfs((f), (s))
+# define HAVE_STRUCT_STATFS_T_F_FSTYPENAME 1
+# define f_fstypename f_basetype
+#elif defined HAVE_STRUCT_STATFS_F_TYPE
+typedef struct statfs statfs_t;
+# define STATFS(f, s) statfs((f), (s))
+#elif defined HAVE_STRUCT_STATVFS_F_TYPE
+typedef struct statvfs statfs_t;
+# define STATFS(f, s) statvfs((f), (s))
#endif
VALUE
get_fsname(VALUE self, VALUE str)
{
-#ifdef HAVE_GETMNTENT
- const char *path;
- struct mntent mntbuf;
- static const int buflen = 4096;
- char *buf = alloca(buflen);
- int len = 0;
- FILE *fp;
-#define FSNAME_LEN 100
- char name[FSNAME_LEN] = "";
+#ifdef STATFS
+ statfs_t st;
+# define CSTR(s) rb_str_new_cstr(s)
FilePathValue(str);
- path = RSTRING_PTR(str);
- fp = setmntent("/etc/mtab", "r");
- if (!fp) rb_sys_fail("setmntent(/etb/mtab)");;
-
- while (getmntent_r(fp, &mntbuf, buf, buflen)) {
- int i;
- char *mnt_dir = mntbuf.mnt_dir;
- for (i=0; mnt_dir[i]; i++) {
- if (mnt_dir[i] != path[i]) {
- goto next_entry;
- }
- }
- if (i >= len) {
- len = i;
- strlcpy(name, mntbuf.mnt_type, FSNAME_LEN);
- }
-next_entry:
- ;
+ str = rb_str_encode_ospath(str);
+ if (STATFS(StringValueCStr(str), &st) == -1) {
+ rb_sys_fail_str(str);
+ }
+# ifdef HAVE_STRUCT_STATFS_T_F_FSTYPENAME
+ if (st.f_fstypename[0])
+ return CSTR(st.f_fstypename);
+# endif
+ switch (st.f_type) {
+ case 0x9123683E: /* BTRFS_SUPER_MAGIC */
+ return CSTR("btrfs");
+ case 0x7461636f: /* OCFS2_SUPER_MAGIC */
+ return CSTR("ocfs");
+ case 0xEF53: /* EXT2_SUPER_MAGIC EXT3_SUPER_MAGIC EXT4_SUPER_MAGIC */
+ return CSTR("ext4");
+ case 0x58465342: /* XFS_SUPER_MAGIC */
+ return CSTR("xfs");
+ case 0x01021994: /* TMPFS_MAGIC */
+ return CSTR("tmpfs");
}
- endmntent(fp);
-
- if (!len) rb_sys_fail("no matching entry");;
- return rb_str_new_cstr(name);
-#else
- return Qnil;
#endif
+ return Qnil;
}
void

View file

@ -0,0 +1,28 @@
From 9fedac991e717f0103d092275ac301e58c5cf010 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 2 Dec 2014 10:56:58 +0100
Subject: [PATCH] Generate preludes using miniruby.
---
common.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common.mk b/common.mk
index 76f1621..b0f6e28 100644
--- a/common.mk
+++ b/common.mk
@@ -782,9 +782,9 @@ $(PRELUDE_C): $(COMPILE_PRELUDE) \
$(PRELUDE_C): $(COMPILE_PRELUDE) \
{$(srcdir)}lib/rubygems/defaults.rb \
{$(srcdir)}lib/rubygems/core_ext/kernel_gem.rb \
- $(PRELUDE_SCRIPTS) $(LIB_SRCS)
+ $(PRELUDE_SCRIPTS) $(PREP) $(LIB_SRCS)
$(ECHO) generating $@
- $(Q) $(BASERUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
+ $(Q) $(MINIRUBY) $(srcdir)/tool/generic_erb.rb -I$(srcdir) -c -o $@ \
$(srcdir)/template/prelude.c.tmpl $(PRELUDE_SCRIPTS)
{$(VPATH)}golf_prelude.c: $(COMPILE_PRELUDE) {$(srcdir)}golf_prelude.rb
--
2.1.0

View file

@ -1,30 +0,0 @@
From 6398515adfc86813686605019a3e22d49cd95517 Mon Sep 17 00:00:00 2001
From: nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Fri, 19 Jun 2015 06:04:00 +0000
Subject: [PATCH] test_gem_remote_fetcher.rb: get rid of errors
* test/rubygems/test_gem_remote_fetcher.rb (start_ssl_server):
temporary measure for "dh key too small" error of OpenSSL
1.0.2c+.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
test/rubygems/test_gem_remote_fetcher.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
index 6b29e18..63dd8fe 100644
--- a/test/rubygems/test_gem_remote_fetcher.rb
+++ b/test/rubygems/test_gem_remote_fetcher.rb
@@ -898,7 +898,7 @@ gems:
server.mount_proc("/insecure_redirect") { |req, res|
res.set_redirect(WEBrick::HTTPStatus::MovedPermanently, req.query['to'])
}
- server.ssl_context.tmp_dh_callback = proc { OpenSSL::PKey::DH.new 128 }
+ server.ssl_context.tmp_dh_callback = proc {|_, _, k| OpenSSL::PKey::DH.new(k) }
t = Thread.new do
begin
server.start
--
2.4.3

View file

@ -1,6 +1,6 @@
%global major_version 2
%global minor_version 2
%global teeny_version 2
%global teeny_version 6
%global major_minor_version %{major_version}.%{minor_version}
%global ruby_version %{major_minor_version}.%{teeny_version}
@ -21,10 +21,10 @@
%endif
%global release 43
%global release 51
%{!?release_string:%global release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}
%global rubygems_version 2.4.5
%global rubygems_version 2.4.5.1
# The RubyGems library has to stay out of Ruby directory three, since the
# RubyGems should be share by all Ruby implementations.
@ -86,6 +86,8 @@ Source9: rubygems.req
Source10: rubygems.prov
# SystemTap sanity test case.
Source11: test_systemtap.rb
# ABRT hoook test case.
Source12: test_abrt.rb
# The load directive is supported since RPM 4.12, i.e. F21+. The build process
# fails on older Fedoras.
@ -110,13 +112,9 @@ Patch5: ruby-1.9.3-mkmf-verbose.patch
# in support for ABRT.
# http://bugs.ruby-lang.org/issues/8566
Patch6: ruby-2.1.0-Allow-to-specify-additional-preludes-by-configuratio.patch
# can_seek_data does not work correctly in chroot for Kernel 3.19+.
# https://bugs.ruby-lang.org/issues/10998
Patch7: ruby-2.2.1-use-statfs.patch
# Fix "dh key too small" error of OpenSSL 1.0.2c+.
# https://github.com/rubygems/rubygems/issues/1289
# https://github.com/ruby/ruby/commit/6398515adfc86813686605019a3e22d49cd95517
Patch8: ruby-2.3.0-test_gem_remote_fetcher.rb-get-rid-of-errors.patch
# Use miniruby to regenerate prelude.c.
# https://bugs.ruby-lang.org/issues/10554
Patch7: ruby-2.2.3-Generate-preludes-using-miniruby.patch
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Requires: ruby(rubygems) >= %{rubygems_version}
@ -418,7 +416,6 @@ rm -rf ext/fiddle/libffi*
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
# Provide an example of usage of the tapset:
cp -a %{SOURCE3} .
@ -451,10 +448,6 @@ autoconf
--enable-multiarch \
--with-prelude=./abrt_prelude.rb \
# Avoid regeneration of prelude.c due to patch6 applied to common.mk.
# https://bugs.ruby-lang.org/issues/10554
touch prelude.c
# Q= makes the build output more verbose and allows to check Fedora
# compiler options.
make %{?_smp_mflags} COPY="cp -p" Q=
@ -482,10 +475,13 @@ for cert in \
EntrustnetSecureServerCertificationAuthority.pem \
GeoTrustGlobalCA.pem \
AddTrustExternalCARoot.pem \
AddTrustExternalCARoot-2048.pem
AddTrustExternalCARoot-2048.pem \
GlobalSignRootCA.pem
do
rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert
done
# Ensure there is not forgotten any certificate.
test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)"
# Move macros file into proper place and replace the %%{name} macro, since it
# would be wrongly evaluated during build of other packages.
@ -545,6 +541,9 @@ mkdir -p %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}
mv %{buildroot}%{ruby_libdir}/json* %{buildroot}%{gem_dir}/gems/json-%{json_version}/lib
mv %{buildroot}%{ruby_libarchdir}/json/ %{buildroot}%{_libdir}/gems/%{name}/json-%{json_version}/
mv %{buildroot}%{gem_dir}/specifications/default/json-%{json_version}.gemspec %{buildroot}%{gem_dir}/specifications
ln -s %{gem_dir}/gems/json-%{json_version}/lib/json.rb %{buildroot}%{ruby_libdir}/json.rb
ln -s %{gem_dir}/gems/json-%{json_version}/lib/json %{buildroot}%{ruby_libdir}/json
ln -s %{_libdir}/gems/%{name}/json-%{json_version}/json/ %{buildroot}%{ruby_libarchdir}/json
mkdir -p %{buildroot}%{gem_dir}/gems/psych-%{psych_version}/lib
mkdir -p %{buildroot}%{_libdir}/gems/%{name}/psych-%{psych_version}
@ -592,20 +591,18 @@ sed -e "s|@LIBRARY_PATH@|%{tapset_libdir}/libruby.so.%{major_minor_version}|" \
sed -i -r "s|( \*.*\*)\/(.*)|\1\\\/\2|" %{buildroot}%{tapset_dir}/libruby.so.%{major_minor_version}.stp
%check
# Sanity check that SystemTap (dtrace) was detected.
make runruby TESTRUN_SCRIPT=%{SOURCE11}
DISABLE_TESTS=""
# test_debug(TestRubyOptions) fails due to LoadError reported in debug mode,
# when abrt.rb cannot be required (seems to be easier way then customizing
# the test suite).
touch abrt.rb
# Test is broken due to SSLv3 disabled in Fedora.
# https://bugs.ruby-lang.org/issues/10046
sed -i '/def test_ctx_client_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb
sed -i '/def test_ctx_server_session_cb$/,/^ end$/ s/^/#/' test/openssl/test_ssl_session.rb
# Sanity check that SystemTap (dtrace) was detected.
make runruby TESTRUN_SCRIPT=%{SOURCE11}
# Check if abrt hook is required.
make runruby TESTRUN_SCRIPT=%{SOURCE12}
DISABLE_TESTS=""
make check TESTS="-v $DISABLE_TESTS"
@ -664,6 +661,7 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/*.rb
%exclude %{ruby_libdir}/*-tk.rb
%exclude %{ruby_libdir}/irb.rb
%exclude %{ruby_libdir}/json.rb
%exclude %{ruby_libdir}/tcltk.rb
%exclude %{ruby_libdir}/tk*.rb
%exclude %{ruby_libdir}/psych.rb
@ -759,7 +757,9 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libarchdir}/enc/utf_16le.so
%{ruby_libarchdir}/enc/utf_32be.so
%{ruby_libarchdir}/enc/utf_32le.so
%{ruby_libarchdir}/enc/windows_1250.so
%{ruby_libarchdir}/enc/windows_1251.so
%{ruby_libarchdir}/enc/windows_1252.so
%{ruby_libarchdir}/enc/windows_31j.so
%{ruby_libarchdir}/etc.so
%{ruby_libarchdir}/fcntl.so
@ -863,6 +863,8 @@ make check TESTS="-v $DISABLE_TESTS"
%{gem_dir}/specifications/io-console-%{io_console_version}.gemspec
%files -n rubygem-json
%{ruby_libdir}/json*
%{ruby_libarchdir}/json*
%{_libdir}/gems/%{name}/json-%{json_version}
%{gem_dir}/gems/json-%{json_version}
%{gem_dir}/specifications/json-%{json_version}.gemspec
@ -899,6 +901,31 @@ make check TESTS="-v $DISABLE_TESTS"
%{ruby_libdir}/tkextlib
%changelog
* Tue Nov 22 2016 Vít Ondruch <vondruch@redhat.com> - 2.2.6-51
- Exclude json.rb from ruby-libs (rhbz#1397370).
* Fri Nov 18 2016 Vít Ondruch <vondruch@redhat.com> - 2.2.6-50
- Update to Ruby 2.2.6.
- Add gemspec_add_dep and gemspec_remove_dep macros.
* Tue Jul 12 2016 Vít Ondruch <vondruch@redhat.com> - 2.2.5-49
- Make symlinks for json gem.
* Mon May 02 2016 Vít Ondruch <vondruch@redhat.com> - 2.2.5-48
- Update to Ruby 2.2.5.
* Mon Dec 21 2015 Vít Ondruch <vondruch@redhat.com> - 2.2.4-47
- Update to Ruby 2.2.4.
* Thu Dec 10 2015 Vít Ondruch <vondruch@redhat.com> - 2.2.3-46
- Fix ABRT hook autoloading.
* Fri Sep 04 2015 Michal Toman <mtoman@fedoraproject.org> - 2.2.3-45
- Add support for MIPS architecture to config.h
* Tue Sep 01 2015 Vít Ondruch <vondruch@redhat.com> - 2.2.3-44
- Update to Ruby 2.2.3.
* Tue Jun 23 2015 Vít Ondruch <vondruch@redhat.com> - 2.2.2-43
- Fix for "dh key too small" error of OpenSSL 1.0.2+.

View file

@ -1 +1 @@
dbce9b9d79d90f213ba8d448b0b6ed86 ruby-2.2.2.tar.xz
7aa1c8021ba811fa75b733f698bd937e ruby-2.2.6.tar.xz

7
test_abrt.rb Normal file
View file

@ -0,0 +1,7 @@
if !!$LOADED_FEATURES.detect { |f| f =~ /abrt\.rb/ }
exit true
else
puts 'ERROR: ABRT hook was not loaded.'
exit false
end