From 5da6a15c57362268ce203151c7b589ac89046441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Fri, 12 Apr 2024 17:18:48 +0200 Subject: [PATCH] Ruby bundled NKF, add appropriate `bundled` provide and test --- ruby.spec | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ruby.spec b/ruby.spec index 5c8fd23..12e1908 100644 --- a/ruby.spec +++ b/ruby.spec @@ -137,6 +137,9 @@ %global test_unit_version 3.6.1 %global typeprof_version 0.21.9 +# Bundled nkf version +%global bundled_nkf_version 2.1.5 + %global tapset_libdir %(echo %{_libdir} | sed 's/64//')* %if 0%{?fedora} >= 19 @@ -167,7 +170,7 @@ Summary: An interpreter of object-oriented scripting language Name: ruby Version: %{ruby_version}%{?development_release} -Release: 5%{?dist} +Release: 6%{?dist} # BSD-3-Clause: missing/{crypt,mt19937,setproctitle}.c # ISC: missing/strl{cat,cpy}.c # Public Domain for example for: include/ruby/st.h, strftime.c, missing/*, ... @@ -336,6 +339,11 @@ Provides: bundled(ccan-check_type) Provides: bundled(ccan-container_of) Provides: bundled(ccan-list) +# https://github.com/nurse/nkf +# Please note that nkf going to be promoted to bundled gem in Ruby 3.4: +# https://github.com/ruby/ruby/commit/2e3a7f70ae71650be6ea38a483f66ce17ca5eb1d +Provides: bundled(nkf) = %{bundled_nkf_version} + # StdLib default gems. Provides: bundled(rubygem-did_you_mean) = %{did_you_mean_version} Provides: bundled(rubygem-openssl) = %{openssl_version} @@ -1073,6 +1081,16 @@ make -C %{_vpath_builddir} -s runruby TESTRUN_SCRIPT="-e \" \ exit 1 if Bundler::URI::VERSION != '%{bundler_uri_version}'; \ \"" +# Check bundled libraries versions. + +# Nkf. +make -C %{_vpath_builddir} -s runruby TESTRUN_SCRIPT="-e \" \ + require 'nkf'; \ + puts '%%{bundled_nkf_version}: %{bundled_nkf_version}'; \ + puts %Q[NKF::NKF_VERSION: #{NKF::NKF_VERSION}]; \ + exit 1 if NKF::NKF_VERSION != '%{bundled_nkf_version}'; \ +\"" + # test_debug(TestRubyOptions) fails due to LoadError reported in debug mode, # when abrt.rb cannot be required (seems to be easier way then customizing @@ -1668,6 +1686,9 @@ make -C %{_vpath_builddir} runruby TESTRUN_SCRIPT=" \ %changelog +* Fri Apr 12 2024 Vít Ondruch - 3.3.0-6 +- Add `bundled` provide for NKF. + * Wed Mar 06 2024 Vít Ondruch - 3.3.0-5 - Fix FTBFS caused by OpenSSL 3.2.1 update.