From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: [PATCH] Update Ruby to 2.3.0 Date: Sun, 10 Jan 2016 22:53:23 +1000 Message-ID: <56925443.6070608@uq.edu.au> References: <87wprqspc3.fsf@gnu.org> <5689C833.3050608@uq.edu.au> <568A4D9E.3030504@uq.edu.au> <87a8ojk6kp.fsf@gnu.org> <568F9AA9.7040605@uq.edu.au> <87wprkggjz.fsf_-_@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIFV3-0004ym-Ok for Guix-devel@gnu.org; Sun, 10 Jan 2016 07:53:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIFV0-0002gN-It for Guix-devel@gnu.org; Sun, 10 Jan 2016 07:53:37 -0500 In-Reply-To: <87wprkggjz.fsf_-_@gnu.org> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= Cc: Guix-devel On 09/01/16 02:52, Ludovic Court=C3=A8s wrote: > Ben Woodcroft skribis: > >> From 28dee96b0de99adf8657457660b9e3733434d2b4 Mon Sep 17 00:00:00 200= 1 >> From: Ben Woodcroft >> Date: Mon, 4 Jan 2016 09:38:42 +1000 >> Subject: [PATCH 4/4] gnu: ruby: Update to 2.3.0. >> >> * gnu/packages/ruby.scm (ruby): Update to 2.3.0. > Please mention the switch to =E2=80=98modify-phases=E2=80=99 here. I even made it a separate commit. [..] > I overlooked this part before but: (1) this looks weird (the spaces > around =E2=80=98=3D=E2=80=99 suggest it=E2=80=99s Makefile syntax, not = shell syntax), and (2) we > shouldn=E2=80=99t use the bundled libffi. > > How much work would it be to fix #2? It would be awesome if you could > do that. Sorry for the extra work! All good, was easy to fix. I also removed it from ruby-2.2 which bundles=20 the same libffi version. However, it seems 11 rubygems are also bundled. To unbundle these and=20 deal with the circular dependencies, I reckon we should create a new=20 ruby-base package that removes the bundled gems, then we package the 11=20 gems and their dependencies using ruby-base, and the 'ruby' package then=20 inherits from ruby-base but also propagates the 11 gems. However I don't=20 think I have time to implement this right now, especially since most of=20 the 11 haven't been packaged by us yet and core-updates is to be merged=20 soon. So do we merge this update as-is or wait for a more perfect solution? >> +(define-public ruby-2.2 >> + (package (inherit ruby) >> + (version "2.2.4") >> + (source >> + (origin >> + (method url-fetch) >> + (uri (string-append "http://cache.ruby-lang.org/pub/ruby/" >> + (version-major+minor version) >> + "/ruby-" version ".tar.bz2")) >> + (sha256 >> + (base32 >> + "0g3ps4q3iz7wj9m45n8xyxzw8nh29ljdqb87b0f6i0p3853gz2yj")))) >> + (arguments >> + `(#:test-target "test" >> + #:parallel-tests? #f >> + #:phases >> + (alist-cons-before >> + 'configure 'replace-bin-sh >> + (lambda _ >> + (substitute* '("Makefile.in" >> + "ext/pty/pty.c" >> + "io.c" >> + "lib/mkmf.rb" >> + "process.c" >> + "test/rubygems/test_gem_ext_configure_builde= r.rb" >> + "test/rdoc/test_rdoc_parser.rb" >> + "test/ruby/test_rubyoptions.rb" >> + "test/ruby/test_process.rb" >> + "test/ruby/test_system.rb" >> + "tool/rbinstall.rb") >> + (("/bin/sh") (which "sh")))) >> + %standard-phases))))) > AFAICS all of =E2=80=98arguments=E2=80=99 can be omitted once the above= libffi > substitution is removed. > > (If it there=E2=80=99s still a need for different phases, it should use > =E2=80=98substitute-keyword-arguments=E2=80=99 to modify only #:phases,= and then > =E2=80=98modify-phases=E2=80=99 rather than =E2=80=98alist-cons-before=E2= =80=99.) Thanks for the tip, but ruby-2.2 is a now simple inherit. > Could you send an updated patch, hopefully the last one? :-) Please feel free to suggest further changes if you spot anything further. Thanks for the review, ben