From 4fcfa78b302517f6323df4c63f15493d1e4a7989 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 26 2017 09:22:41 +0000 Subject: import rh-ror50-rubygem-byebug-9.0.6-3.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e03752 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/byebug-9.0.6.gem +SOURCES/rubygem-byebug-9.0.6-full.tar.gz diff --git a/.rh-ror50-rubygem-byebug.metadata b/.rh-ror50-rubygem-byebug.metadata new file mode 100644 index 0000000..addd71e --- /dev/null +++ b/.rh-ror50-rubygem-byebug.metadata @@ -0,0 +1,2 @@ +cfdfd310b03f667d652e773e31f9133e564d752a SOURCES/byebug-9.0.6.gem +8f3be78ce2a9655fba7fee9c3604bb33c0b6026f SOURCES/rubygem-byebug-9.0.6-full.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/byebug-create-full-tarball.sh b/SOURCES/byebug-create-full-tarball.sh new file mode 100644 index 0000000..fefe8c1 --- /dev/null +++ b/SOURCES/byebug-create-full-tarball.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +if [ $# -lt 2 ] +then + echo "$0 " + exit 1 +fi + +set -x +set -e + +CURRDIR=$(pwd) + +TMPDIRPATH=$(mktemp -d /var/tmp/rspec-tar-XXXXXX) +pushd $TMPDIRPATH + +git clone https://github.com/deivid-rodriguez/$1.git +pushd $1 +git reset --hard v$2 +popd + +ln -sf $1 $1-$2 +tar czf ${CURRDIR}/rubygem-$1-$2-full.tar.gz $1-$2/./ + +popd + +rm -rf $TMPDIRPATH diff --git a/SOURCES/gcd.rb b/SOURCES/gcd.rb new file mode 100644 index 0000000..384b4ab --- /dev/null +++ b/SOURCES/gcd.rb @@ -0,0 +1,16 @@ +#!/usr/bin/ruby + +def gcd(a, b) + if a > b + a, b = [b, a] + end + + if a == b or a == 1 + return a + end + + return gcd(a, b-a) +end + +a, b = ARGV[0..1].map{|arg| arg.to_i} +puts "The gcd of %i and %i is %i\n" % [a, b, gcd(a,b)] diff --git a/SOURCES/rubygem-byebug-9.0.6-test-fix-ruby24-thread.patch b/SOURCES/rubygem-byebug-9.0.6-test-fix-ruby24-thread.patch new file mode 100644 index 0000000..c29afc2 --- /dev/null +++ b/SOURCES/rubygem-byebug-9.0.6-test-fix-ruby24-thread.patch @@ -0,0 +1,28 @@ +From cecae97def2026cba3291d03937d520856c5346c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?David=20Rodr=C3=ADguez?= +Date: Tue, 6 Dec 2016 10:46:30 -0200 +Subject: [PATCH] Fix tests against ruby 2.4-dev + +--- + test/commands/thread_test.rb | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/test/commands/thread_test.rb b/test/commands/thread_test.rb +index 4db9f34..650d4be 100644 +--- a/test/commands/thread_test.rb ++++ b/test/commands/thread_test.rb +@@ -79,9 +79,11 @@ def test_thread_list_shows_all_available_threads + enter 'cont 24', 'thread list', 'lock << 0' + debug_code(program) + +- check_output_includes(/(\+)?\d+ #/, +- /(\+)?\d+ #/, +- /(\+)?\d+ #/) ++ check_output_includes( ++ /(\+)?\d+ #/, ++ /(\+)?\d+ #/, ++ /(\+)?\d+ #/ ++ ) + end + + def test_thread_stop_marks_thread_as_suspended diff --git a/SPECS/rubygem-byebug.spec b/SPECS/rubygem-byebug.spec new file mode 100644 index 0000000..ee5d444 --- /dev/null +++ b/SPECS/rubygem-byebug.spec @@ -0,0 +1,205 @@ +%{?scl:%scl_package rubygem-%{gem_name}} +%{!?scl:%global pkg_name %{name}} + +%global gem_name byebug + +Name: %{?scl_prefix}rubygem-%{gem_name} +Version: 9.0.6 +Release: 3%{?dist} + +Summary: Ruby 2.0 fast debugger - base + CLI +License: BSD + +URL: http://github.com/deivid-rodriguez/byebug +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +# %%{SOURCE2} %%{pkg_name} %%{version} +Source1: rubygem-%{gem_name}-%{version}-full.tar.gz +Source2: byebug-create-full-tarball.sh +Source10: gcd.rb +# https://github.com/deivid-rodriguez/byebug/commit/cecae97def2026cba3291d03937d520856c5346c.patch +Patch0: rubygem-byebug-9.0.6-test-fix-ruby24-thread.patch + +Requires: %{?scl_prefix_ruby}ruby(release) +Requires: %{?scl_prefix_ruby}ruby(rubygems) +BuildRequires: %{?scl_prefix_ruby}ruby(release) +BuildRequires: %{?scl_prefix_ruby}ruby(rubygems) +BuildRequires: %{?scl_prefix_ruby}rubygems-devel +BuildRequires: %{?scl_prefix_ruby}ruby-devel +BuildRequires: %{?scl_prefix_ruby}rubygem(minitest) >= 5 +Provides: %{?scl_prefix}rubygem(%{gem_name}) = %{version} + +# Explicitly require runtime subpackage, as long as older scl-utils do not generate it +%{?scl:Requires: %{?scl_prefix}runtime} + +%description +Byebug is a Ruby 2 debugger. It's implemented using the +Ruby 2 TracePoint C API for execution control and the Debug Inspector C API +for call stack navigation. The core component provides support that +front-ends can build on. It provides breakpoint handling and bindings for +stack frames among other things and it comes with an easy to use command +line interface. + +%package doc +Summary: Documentation for %{pkg_name} +Requires: %{?scl_prefix}%{pkg_name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{pkg_name}. + +%prep +%{?scl:scl enable %{scl} - << \EOF} +set -e +%setup -q -T -n %{gem_name}-%{version} -b 1 +gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec + +%patch0 -p1 +%{?scl:EOF} + +%build +%{?scl:scl enable %{scl} - << \EOF} +set -e +gem build %{gem_name}.gemspec +%gem_install +%{?scl:EOF} + +%install +mkdir -p %{buildroot}%{gem_dir} +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + +mkdir -p %{buildroot}%{gem_extdir_mri} +cp -a .%{gem_extdir_mri}/{gem.build_complete,%{gem_name}/} %{buildroot}%{gem_extdir_mri}/ +rm -rf %{buildroot}%{gem_instdir}/ext/ + +mkdir -p %{buildroot}%{_bindir} +cp -pa .%{_bindir}/* \ + %{buildroot}%{_bindir}/ + +find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x + +%check +%{?scl:scl enable %{scl} - << \EOF} +set -e +export GEM_PATH=%{buildroot}/%{gem_dir}:%{gem_dir}:$GEM_PATH +export PATH=%{buildroot}%{_bindir}:$PATH + +remove_fail_test() { + filename=$1 + shift + num=$# + while [ $num -gt 0 ] + do + if [ ! -f ${filename}.orig ] ; then + cp -p $filename ${filename}.orig + fi + sed -i $filename -e "\@def.*$1@s|^\(.*\)$|\1; skip \"Skip this\"|" + shift + num=$((num - 1)) + done +} + +yes "puts a, b ; s" | ruby -I.:lib:%{buildroot}%{gem_extdir_mri} -S byebug ruby %{SOURCE10} 120 84 + +remove_fail_test test/commands/frame_test.rb \ + test_frame_minus_one_sets_frame_to_the_last_one +remove_fail_test test/commands/next_test.rb \ + test_next_does_not_stop_at_byebug_internal_frames +remove_fail_test test/commands/finish_test.rb \ + test_finish_does_not_stop_in_byebug_internal_frames + +# Do not ship simplecov on SCL. +export NOCOV=true + +# Do not ship pry, because the upstream likes usersto install it +# if they want to use pry command. +# https://github.com/deivid-rodriguez/byebug/pull/301 +mv test/commands/pry_test.rb{,disabled} + +ruby -I.:lib:%{buildroot}%{gem_extdir_mri} script/minitest_runner.rb +%{?scl:EOF} + +%files +# There is no %%license macro on RHEL6. +# https://bugzilla.redhat.com/show_bug.cgi?id=1386246 +%{!?_licensedir:%global license %%doc} + +%dir %{gem_instdir} +%license %{gem_instdir}/LICENSE +%doc %{gem_instdir}/CHANGELOG.md +%doc %{gem_instdir}/CONTRIBUTING.md +%doc %{gem_instdir}/GUIDE.md +%doc %{gem_instdir}/README.md + +%{_bindir}/byebug +%{gem_instdir}/bin + +%{gem_libdir}/ +%{gem_extdir_mri}/ + +%exclude %{gem_cache} +%{gem_spec} + +%files doc +%doc %{gem_instdir}/CONTRIBUTING.md +%doc %{gem_docdir} + +%changelog +* Tue Feb 21 2017 Jun Aruga - 9.0.6-3 +- Always use full tar.gz for installed files and + keep using gem file for gem spec (ref: bug 1425220) + +* Tue Feb 14 2017 Jun Aruga - 9.0.6-2 +- Add "set -e". + +* Wed Jan 18 2017 Jun Aruga - 9.0.6-1 +- 9.0.6 +- Apply upstream patch for test with ruby24 + +* Wed Apr 06 2016 Pavel Valena - 8.2.2-3 +- Enable tests + +* Wed Mar 02 2016 Pavel Valena - 8.2.2-2 +- Add scl macros + +* Wed Feb 3 2016 Mamoru TASAKA - 8.2.2-1 +- 8.2.2 + +* Mon Jan 11 2016 Mamoru TASAKA - 8.2.1-2 +- F-24: rebuild against ruby23 + +* Tue Dec 29 2015 Mamoru TASAKA - 8.2.1-1 +- 8.2.1 + +* Sun Sep 13 2015 Mamoru TASAKA - 6.0.2-1 +- 6.0.2 + +* Thu Jun 18 2015 Fedora Release Engineering - 5.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue May 19 2015 Mamoru TASAKA - 5.0.0-1 +- 5.0.0 + +* Fri Apr 3 2015 Mamoru TASAKA - 4.0.5-1 +- 4.0.5 + +* Sat Mar 28 2015 Mamoru TASAKA - 4.0.4-1 +- 4.0.4 + +* Fri Mar 20 2015 Mamoru TASAKA - 4.0.3-1 +- 4.0.3 + +* Tue Mar 17 2015 Mamoru TASAKA - 4.0.2-1 +- 4.0.2 + +* Sat Feb 07 2015 Mamoru TASAKA - 3.5.1-4 +- Remove simplecov + +* Tue Feb 03 2015 Mamoru TASAKA - 3.5.1-3 +- A bit modification for %%check + +* Tue Feb 03 2015 Mamoru TASAKA - 3.5.1-2 +- Make test suite exit with status + +* Tue Feb 03 2015 Mamoru TASAKA - 3.5.1-1 +- Initial package