From patchwork Wed Jun 8 22:57:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Woodcroft X-Patchwork-Id: 12893 Received: (qmail 65831 invoked by uid 89); 8 Jun 2016 22:58:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.1 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=packageversion, package-version, inspector, Inspector X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: lists.gnu.org Received: from lists.gnu.org (HELO lists.gnu.org) (208.118.235.17) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 08 Jun 2016 22:57:50 +0000 Received: from localhost ([::1]:59852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAmPz-0002ZP-0y for patchwork@sourceware.org; Wed, 08 Jun 2016 18:57:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAmPs-0002ZI-JQ for guix-devel@gnu.org; Wed, 08 Jun 2016 18:57:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAmPo-0005nv-ED for guix-devel@gnu.org; Wed, 08 Jun 2016 18:57:39 -0400 Received: from mailhub2.soe.uq.edu.au ([130.102.132.209]:52396 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAmPm-0005nX-S7 for guix-devel@gnu.org; Wed, 08 Jun 2016 18:57:36 -0400 Received: from smtp2.soe.uq.edu.au (smtp2.soe.uq.edu.au [10.138.113.41]) by newmailhub.uq.edu.au (8.14.5/8.14.5) with ESMTP id u58MvRMO030853; Thu, 9 Jun 2016 08:57:28 +1000 Received: from [172.23.208.246] (scmb-bwoodc.biosci.uq.edu.au [172.23.208.246]) (authenticated bits=0) by smtp2.soe.uq.edu.au (8.14.5/8.14.5) with ESMTP id u58MvRVT030088 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 9 Jun 2016 08:57:27 +1000 Subject: Fwd: Re: [Patch] ruby-byebug@9.0.5 References: <57580FE8.7070800@uq.edu.au> To: "guix-devel@gnu.org" , Matthew Jordan From: Ben Woodcroft X-Forwarded-Message-Id: <57580FE8.7070800@uq.edu.au> Message-ID: <5758A2D7.8000805@uq.edu.au> Date: Thu, 9 Jun 2016 08:57:27 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <57580FE8.7070800@uq.edu.au> X-UQ-FilterTime: 1465426649 X-Scanned-By: MIMEDefang 2.73 on UQ Mailhub X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 130.102.132.209 X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+patchwork=sourceware.org@gnu.org Sender: "Guix-devel" This got bounced from the list for being over the attachment size limit, so sending again with gzipped build.log On 06/06/16 07:22, Matthew Jordan wrote: > Good Day Ben Woodcroft, > > This is what I have so far, although I'm not that familiar with byebug > though. I'll try to dig a bit deeper to get a better understanding of > what's going on. Thanks for looking into it. [..] >> I had a go at re-enabling tests which were disabled in the original >> package - see the attached patch. Unfortunately it is still failing a >> few tests. Would you like to take a look into why this might be? > Here a summary of test info. The test > "Byebug::SaveTest#test_save_shows_a_success_message" seems to fail cause > it's looking for a file in a home directory that doesn't exist. Setting > the HOME variable seems to solve that. Good plan. I'm not sure how you set HOME in your package, but setting it to /tmp seems to give less errors, though there is still 4 of them. The first one seems to be due to "File.realpath" returning a form the test isn't expecting: e.g. expected; "--> #0 Byebug::ByebugTest201606081021q3p5qfClass.to_int(str#String) at /tmp/nix-build-ruby-byebug-9.0.5.drv-0/byebug_test20160608-102-1q3p5qf.rb:16 observed "--> #0 Byebug::ByebugTest201606081021q3p5qfClass.to_int(str#String) at .../tmp/nix-build-ruby-byebug-9.0.5.drv-0/byebug_test20160608-102-1q3p5qf.rb:16", This might be fixable by patching line 76 of this file: https://github.com/deivid-rodriguez/byebug/blob/24ad09b8f84531a7d5b112e6e7932bbc13fb7086/test/support/test_case.rb I've not had time to look at the other tests, some are the same as the errors you found. Are you able to take a look please? Thanks, ben From c323ab6c9d1e9d8cfa7f6b879e17826f7e1ef62e Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Thu, 2 Jun 2016 22:06:46 +1000 Subject: [PATCH] gnu: ruby-byebug: Update to 9.0.5. * gnu/packages/ruby.scm (ruby-byebug): Update to 9.0.5. [source]: Use 'GitHub' source. [arguments]: Enable tests. [native-inputs]: Add dependencies for tests. --- gnu/packages/ruby.scm | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm index 527f76b..327a6a4 100644 --- a/gnu/packages/ruby.scm +++ b/gnu/packages/ruby.scm @@ -2757,17 +2757,49 @@ with PostgreSQL 8.4 and later.") (define-public ruby-byebug (package (name "ruby-byebug") - (version "6.0.2") + (version "9.0.5") (source (origin (method url-fetch) - (uri (rubygems-uri "byebug" version)) + (uri (string-append + "https://github.com/deivid-rodriguez/byebug/archive/v" version + ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0537h9qbhr6csahmzyn4lk1g5b2lcligbzd21gfy93nx9lbfdnzc")))) + "0apgk5d2s68rzmzli09ryqigbk2nx7k5r01qw0iz51pp7m7hm34l")))) (build-system ruby-build-system) (arguments - '(#:tests? #f)) ; no tests + `(#:phases + (modify-phases %standard-phases + ;; Most of the dependencies are not needed for building and testing, + ;; so remove them. + (add-before 'build 'remove-dependencies + (lambda _ + (substitute* "Gemfile" + (("gem .*") "")) + (substitute* "Rakefile" + (("require 'chandler/tasks'") "")) + #t)) + ;; Tests require an installed gem, so run tests after install phase. + (delete 'check) + (add-after 'install 'check-after-install + (lambda* (#:key outputs #:allow-other-keys) + (setenv "HOME" "/tmp") + (setenv "GEM_PATH" + (string-append + (getenv "GEM_PATH") + ":" + (gem-home (assoc-ref outputs "out") + ,(package-version ruby)))) + (and (system* "rake" "compile") + (zero? (system* "rake" "test")))))))) + (native-inputs + `(("bundler" ,bundler) + ("ruby-yard" ,ruby-yard) + ("ruby-rake-compiler" ,ruby-rake-compiler) + ("ruby-simplecov" ,ruby-simplecov) + ("ruby-pry" ,ruby-pry))) (synopsis "Debugger for Ruby 2") (description "Byebug is a Ruby 2 debugger implemented using the Ruby 2 TracePoint C API for execution control and the Debug Inspector C API for call -- 2.7.4