Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package mruby for openSUSE:Factory checked in at 2022-02-21 20:51:31 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mruby (Old) and /work/SRC/openSUSE:Factory/.mruby.new.1958 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mruby" Mon Feb 21 20:51:31 2022 rev:5 rq:956537 version:3.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/mruby/mruby.changes 2022-02-09 22:04:16.309621477 +0100 +++ /work/SRC/openSUSE:Factory/.mruby.new.1958/mruby.changes 2022-02-21 20:51:32.282295873 +0100 @@ -1,0 +2,6 @@ +Mon Feb 21 11:32:34 UTC 2022 - Ferdinand Thiessen <[email protected]> + +- Install libmruby_core library, required by mruby binary +- Fix missing SONAME in library by adding link-with-soname.patch + +------------------------------------------------------------------- New: ---- link-with-soname.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mruby.spec ++++++ --- /var/tmp/diff_new_pack.cgJnmW/_old 2022-02-21 20:51:32.974296173 +0100 +++ /var/tmp/diff_new_pack.cgJnmW/_new 2022-02-21 20:51:32.978296176 +0100 @@ -19,7 +19,7 @@ %global _lto_cflags %{_lto_cflags} -ffat-lto-objects - +%define sover 3_0_0 Name: mruby Version: 3.0.0 Release: 0 @@ -28,14 +28,16 @@ Group: Development/Languages/Ruby URL: https://github.com/mruby/mruby/ Source: %{url}/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz +# PATCH-FIX-OPENSUSE PATCH-FEATURE-UPSTREAM link-with-soname.patch -- Add SONAME to library +Patch0: link-with-soname.patch # PATCH-FIX-UPSTREAM CVE-2021-4110.patch -- https://github.com/mruby/mruby/commit/f5e10c5a79a17939af763b1dcf5232ce47e24a34 -Patch0: CVE-2021-4110.patch +Patch1: CVE-2021-4110.patch # PATCH-FIX-UPSTREAM CVE-2022-0240.patch -- https://github.com/mruby/mruby/commit/31fa3304049fc406a201a72293cce140f0557dca -Patch1: CVE-2022-0240.patch +Patch2: CVE-2022-0240.patch # PATCH-FIX-UPSTREAM CVE-2022-0080.patch -- https://github.com/mruby/mruby/commit/28ccc664e5dcd3f9d55173e9afde77c4705a9ab6 -Patch2: CVE-2022-0080.patch +Patch3: CVE-2022-0080.patch # PATCH-FIX-UPSTREAM CVE-2022-0481.patch -- https://github.com/mruby/mruby/commit/ae3c99767a27f5c6c584162e2adc6a5d0eb2c54e -Patch3: CVE-2022-0481.patch +Patch4: CVE-2022-0481.patch BuildRequires: bison BuildRequires: cmake BuildRequires: pkgconfig @@ -62,7 +64,8 @@ %package devel Summary: Lightweight Ruby Embedded Environment Group: Development/Languages/Ruby -Requires: libmruby3 = %{version} +Requires: libmruby%{sover} = %{version} +Requires: libmruby_core%{sover} = %{version} %description devel mruby is the lightweight implementation of the Ruby language complying to (part @@ -71,11 +74,21 @@ This package contains the headers and static library files in order to embed mruby into your application. -%package -n libmruby3 +%package -n libmruby%{sover} +Summary: Lightweight Ruby Embedded Environment +Group: Development/Languages/Ruby +# Was wrongly used (only) on Factory until 02-2022 +Obsoletes: libmruby3 < %{version} + +%description -n libmruby%{sover} +mruby is the lightweight implementation of the Ruby language complying to (part +of) the ISO standard. + +%package -n libmruby_core%{sover} Summary: Lightweight Ruby Embedded Environment Group: Development/Languages/Ruby -%description -n libmruby3 +%description -n libmruby_core%{sover} mruby is the lightweight implementation of the Ruby language complying to (part of) the ISO standard. @@ -85,31 +98,40 @@ sed -i 's|conf.enable_debug|# conf.enable_debug|' build_config/host-shared.rb %build -CFLAGS="%{optflags}" \ -CXXFLAGS="%{optflags}" \ -MRUBY_CONFIG="host-shared" \ +export CFLAGS="%{optflags}" +export LDFLAGS="%{optflags}" +export MRUBY_CONFIG="host-shared" +# Needed for mruby to find its libraries before they are installed +export LD_LIBRARY_PATH="$PWD/build/host/mrbc/lib/" rake all %install +# Install binaries for b in mirb mrbc mruby; do install -D -m 0755 "bin/${b}" "%{buildroot}%{_bindir}/${b}" done # Install libraries -for l in libmruby.so; do - install -D -m 0755 "build/host/lib/${l}" "%{buildroot}%{_libdir}/${l}.%{version}" - ln -s ${l}.%{version} "%{buildroot}%{_libdir}/${l}" +for l in mruby mruby_core; do + l=l"ib$l.so" + install -D -m 0755 "build/host/lib/${l}.%{version}" "%{buildroot}%{_libdir}/$l.%{version}" + ln -s "${l}.%{version}" "%{buildroot}%{_libdir}/${l}" done install -d "%{buildroot}%{_includedir}" cp -a include/* "%{buildroot}%{_includedir}/" -%post -p /sbin/ldconfig -n libmruby3 -%postun -p /sbin/ldconfig -n libmruby3 +%post -p /sbin/ldconfig -n libmruby%{sover} +%post -p /sbin/ldconfig -n libmruby_core%{sover} +%postun -p /sbin/ldconfig -n libmruby%{sover} +%postun -p /sbin/ldconfig -n libmruby_core%{sover} -%files -n libmruby3 +%files -n libmruby%{sover} %{_libdir}/libmruby.so.%{version} +%files -n libmruby_core%{sover} +%{_libdir}/libmruby_core.so.%{version} + %files %doc AUTHORS CONTRIBUTING.md LEGAL NEWS README.md %license LICENSE ++++++ link-with-soname.patch ++++++ diff -Nur mruby-3.0.0/build_config/host-shared.rb new/build_config/host-shared.rb --- mruby-3.0.0/build_config/host-shared.rb 2021-03-05 09:07:35.000000000 +0100 +++ new/build_config/host-shared.rb 2022-02-21 12:59:46.926385435 +0100 @@ -18,12 +18,12 @@ conf.archiver do |archiver| archiver.command = 'gcc' - archiver.archive_options = '-shared -o %{outfile} %{objs}' + archiver.archive_options = '-shared -Wl,-soname,%{filename} -o %{outfile} %{objs}' end # file extensions conf.exts do |exts| - exts.library = '.so' + exts.library = '.so.%{version}' end # file separator diff -Nur mruby-3.0.0/lib/mruby/build/command.rb new/lib/mruby/build/command.rb --- mruby-3.0.0/lib/mruby/build/command.rb 2021-03-05 09:07:35.000000000 +0100 +++ new/lib/mruby/build/command.rb 2022-02-21 13:10:29.627639126 +0100 @@ -4,7 +4,7 @@ class Command include Rake::DSL extend Forwardable - def_delegators :@build, :filename, :objfile, :libfile, :exefile + def_delegators :@build, :filename, :realname, :objfile, :libfile, :exefile attr_accessor :build, :command def initialize(build) @@ -234,7 +234,7 @@ def run(outfile, objfiles) mkdir_p File.dirname(outfile) _pp "AR", outfile.relative_path - _run archive_options, { :outfile => filename(outfile), :objs => filename(objfiles).map{|f| %Q["#{f}"]}.join(' ') } + _run archive_options, { :outfile => filename(outfile), :filename => realname(outfile), :objs => filename(objfiles).map{|f| %Q["#{f}"]}.join(' ') } end end diff -Nur mruby-3.0.0/lib/mruby/build.rb new/lib/mruby/build.rb --- mruby-3.0.0/lib/mruby/build.rb 2021-03-05 09:07:35.000000000 +0100 +++ new/lib/mruby/build.rb 2022-02-21 12:59:29.906251522 +0100 @@ -6,6 +6,7 @@ autoload :Gem, "mruby/gem" autoload :Lockfile, "mruby/lockfile" autoload :Presym, "mruby/presym" + autoload :Source, 'mruby/source' class << self def targets @@ -380,6 +381,10 @@ end end + def realname(name) + filename(name).rpartition(file_separator)[-1] + end + def exefile(name) if name.is_a?(Array) name.flatten.map { |n| exefile(n) } @@ -403,7 +408,7 @@ if name.is_a?(Array) name.flatten.map { |n| libfile(n) } else - "#{name}#{exts.library}" + "#{name}#{exts.library}" % {:version => MRuby::Source::MRUBY_VERSION} end end
