From c8edd27a07ba888b15bd883d3a1f6f3a6632e5f4ffc33ea780c8c6d7029a0f12 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 25 Jun 2013 09:11:49 +0000 Subject: [PATCH 1/3] Accepting request 180818 from OBS:Server:Unstable - remove --force usage in favor of portable rm (SLE11) OBS-URL: https://build.opensuse.org/request/show/180818 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby?expand=0&rev=61 --- ruby.changes | 5 +++++ ruby.spec | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ruby.changes b/ruby.changes index e8713ff..a437220 100644 --- a/ruby.changes +++ b/ruby.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 25 09:02:48 UTC 2013 - coolo@suse.com + +- remove --force usage in favor of portable rm (SLE11) + ------------------------------------------------------------------- Tue Jun 4 17:04:50 UTC 2013 - coolo@suse.com diff --git a/ruby.spec b/ruby.spec index 06e8ab5..162768e 100644 --- a/ruby.spec +++ b/ruby.spec @@ -94,7 +94,9 @@ install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/gemrc %post for bin in erb gem irb rake rdoc ri ruby testrb; do - /usr/sbin/update-alternatives --force --install \ + # remove non-links or old binaries will stay around forever + test -L %{_bindir}/$bin || rm -v %{_bindir}/$bin + /usr/sbin/update-alternatives --install \ %{_bindir}/$bin $bin %{_bindir}/$bin"2.0" 20 done From 9cb1d18f90a81f8def62bf0bfdc70370a35528a67165be4f239a6c2263453191 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 26 Jun 2013 16:57:11 +0000 Subject: [PATCH 2/3] Accepting request 181067 from OBS:Server:Unstable - use update-alternatives the right way - which is portable too OBS-URL: https://build.opensuse.org/request/show/181067 OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby?expand=0&rev=62 --- ruby.changes | 5 +++++ ruby.spec | 40 ++++++++++++++++++++++++---------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ruby.changes b/ruby.changes index a437220..ef39a44 100644 --- a/ruby.changes +++ b/ruby.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 26 15:01:32 UTC 2013 - coolo@suse.com + +- use update-alternatives the right way - which is portable too + ------------------------------------------------------------------- Tue Jun 25 09:02:48 UTC 2013 - coolo@suse.com diff --git a/ruby.spec b/ruby.spec index 162768e..5a740e2 100644 --- a/ruby.spec +++ b/ruby.spec @@ -83,19 +83,19 @@ Development files to link against Ruby. %build %install -mkdir -p $RPM_BUILD_ROOT%_bindir +mkdir -p %{buildroot}%_bindir %{buildroot}%{_sysconfdir}/alternatives for bin in erb gem irb rake rdoc ri ruby testrb; do - ln -s %_bindir/"$bin"2.0 $RPM_BUILD_ROOT%_bindir/$bin + # dummy + touch %{buildroot}%{_sysconfdir}/alternatives/$bin + ln -s %{_sysconfdir}/alternatives/$bin %{buildroot}%_bindir/$bin done -mkdir -p $RPM_BUILD_ROOT%_libdir -ln -s %_libdir/libruby2.0.so $RPM_BUILD_ROOT%_libdir/libruby.so -install -D -m 0644 %{S:0} $RPM_BUILD_ROOT/etc/rpm/macros.ruby -install -D -m 0644 %{S:2} $RPM_BUILD_ROOT/etc/gemrc +mkdir -p %{buildroot}%_libdir +ln -s %_libdir/libruby2.0.so %{buildroot}%_libdir/libruby.so +install -D -m 0644 %{S:0} %{buildroot}/etc/rpm/macros.ruby +install -D -m 0644 %{S:2} %{buildroot}/etc/gemrc %post for bin in erb gem irb rake rdoc ri ruby testrb; do - # remove non-links or old binaries will stay around forever - test -L %{_bindir}/$bin || rm -v %{_bindir}/$bin /usr/sbin/update-alternatives --install \ %{_bindir}/$bin $bin %{_bindir}/$bin"2.0" 20 done @@ -111,14 +111,22 @@ fi %defattr(-,root,root) %config /etc/gemrc %config /etc/rpm/macros.ruby -%ghost %{_bindir}/erb -%ghost %{_bindir}/gem -%ghost %{_bindir}/irb -%ghost %{_bindir}/rake -%ghost %{_bindir}/rdoc -%ghost %{_bindir}/ri -%ghost %{_bindir}/ruby -%ghost %{_bindir}/testrb +%ghost %_sysconfdir/alternatives/erb +%{_bindir}/erb +%ghost %_sysconfdir/alternatives/gem +%{_bindir}/gem +%ghost %_sysconfdir/alternatives/irb +%{_bindir}/irb +%ghost %_sysconfdir/alternatives/rake +%{_bindir}/rake +%ghost %_sysconfdir/alternatives/rdoc +%{_bindir}/rdoc +%ghost %_sysconfdir/alternatives/ri +%{_bindir}/ri +%ghost %_sysconfdir/alternatives/ruby +%{_bindir}/ruby +%ghost %_sysconfdir/alternatives/testrb +%{_bindir}/testrb %files devel %defattr(-,root,root) From efcc20143123904971287c7c466fb6e94f53f8e938ad907fee7235ea91817298 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sat, 29 Jun 2013 12:48:09 +0000 Subject: [PATCH 3/3] - change too strict ruby20 requires with _ge OBS-URL: https://build.opensuse.org/package/show/devel:languages:ruby/ruby?expand=0&rev=63 --- ruby.changes | 5 +++++ ruby.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ruby.changes b/ruby.changes index ef39a44..426d146 100644 --- a/ruby.changes +++ b/ruby.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jun 29 12:38:12 UTC 2013 - coolo@suse.com + +- change too strict ruby20 requires with _ge + ------------------------------------------------------------------- Wed Jun 26 15:01:32 UTC 2013 - coolo@suse.com diff --git a/ruby.spec b/ruby.spec index 5a740e2..cb0cdc3 100644 --- a/ruby.spec +++ b/ruby.spec @@ -32,7 +32,7 @@ BuildRequires: ruby20-devel BuildRequires: update-alternatives #!BuildIgnore: ruby ruby-devel #!BuildIgnore: rubygems -%requires_eq ruby20 +%requires_ge ruby20 Provides: rubygems = 1.8.15 Obsoletes: rubygems < 1.8.15 Requires: update-alternatives