Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ruby-common for openSUSE:Factory 
checked in at 2026-05-20 15:23:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ruby-common (Old)
 and      /work/SRC/openSUSE:Factory/.ruby-common.new.1966 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ruby-common"

Wed May 20 15:23:47 2026 rev:34 rq:1353876 version:4.0.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ruby-common/ruby-common.changes  2026-01-09 
17:03:22.151642859 +0100
+++ /work/SRC/openSUSE:Factory/.ruby-common.new.1966/ruby-common.changes        
2026-05-20 15:24:19.157639995 +0200
@@ -1,0 +2,6 @@
+Mon May 18 17:10:12 UTC 2026 - Marcus Rueckert <[email protected]>
+
+- Fix shebang line patching (yeah quoting through 3 layers!)
+- Have diff output so we can easily see patching worked.
+
+-------------------------------------------------------------------
@@ -67,0 +74,12 @@
+
+-------------------------------------------------------------------
+Tue Jun  4 13:49:49 UTC 2024 - Marcus Rueckert <[email protected]>
+
+- Added two macros similar to the work the python team did for
+  boo#1212476
+
+  A generic %ruby_fix_shebang_path which accepts a list of paths
+  and fixes the shebang line in all files
+
+  A specialized %ruby_fix_shebang which does the same for all files
+  in %{_bindir} and %{_sbindir}

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ruby-common.spec ++++++
--- /var/tmp/diff_new_pack.0Gc6J2/_old  2026-05-20 15:24:19.945672469 +0200
+++ /var/tmp/diff_new_pack.0Gc6J2/_new  2026-05-20 15:24:19.945672469 +0200
@@ -112,6 +112,12 @@
 %prep
 
 %build
+ruby_real_path="/usr/bin/ruby.%{rb_default_ruby_suffix}"
+for f in $(grep -r -l '^#./usr/bin/ruby' ${RPM_SOURCE_DIR}) ; do
+  perl -p -i.back -e 
"s|^#\\!.*ruby(?<suffix>\S+)?(?<optional_args>\s+\S+.*)?|#\\!${ruby_real_path}$+{optional_args}\n|g"
 $f
+  diff -urN ${f}{.back,} || :
+  rm ${f}.back           || :
+done
 
 %install
 # we need to make sure it overwrites older macro versions and rpm sorts 
alphabetically

++++++ ruby.rpm-macros ++++++
--- /var/tmp/diff_new_pack.0Gc6J2/_old  2026-05-20 15:24:20.137680381 +0200
+++ /var/tmp/diff_new_pack.0Gc6J2/_new  2026-05-20 15:24:20.141680546 +0200
@@ -106,5 +106,15 @@
 
 %requires_on_provides_eq() %{expand:%(t=$(echo '%1' | LC_ALL=C xargs -r rpm -q 
--whatprovides --qf 'Requires: %1 = %%{epoch}:%%{version}\\n' | sed -e 's/ 
(none):/ /' -e 's/ 0:/ /' | grep -v "is not"); test -n "$t" || echo "%%{error: 
%%%%{requires_on_provides_eq %1} does not resolve}"; echo "$t")}
 %requires_on_provides_ge() %{expand:%(t=$(echo '%1' | LC_ALL=C xargs -r rpm -q 
--whatprovides --qf 'Requires: %1 >= %%{epoch}:%%{version}\\n' | sed -e 's/ 
(none):/ /' -e 's/ 0:/ /' | grep -v "is not"); test -n "$t" || echo "%%{error: 
%%%%{requires_on_provides_ge %1} does not resolve}"; echo "$t")}
-(No newline at EOF)
+
+# We are stealing this from python
+%ruby_fix_shebang \
+%ruby_fix_shebang_path %{buildroot}%{_bindir}/*  %{buildroot}%{_sbindir}/*
+
+%ruby_fix_shebang_path(+abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-=)
 \
+myargs="%{**}" \
+ruby_real_path=$(/usr/bin/ruby -r rbconfig -e 'puts 
"/usr/bin/#{RbConfig::CONFIG[\"ruby_install_name"]}"') \
+for f in ${myargs}; do \
+  [ -f $f ] && perl -p -i.back -e 
"s|^#\\!.*ruby(?<suffix>\\S+)?(?<optional_args>\\s+\\S+.*)?|#\\!${ruby_real_path}$+{optional_args}\\n|g"
 ${f} ; diff -urN ${f}{.back,} ||: ; rm ${f}.back \
+done
 

Reply via email to