From: Pjotr Prins <pjotr.public12@thebird.nl>
To: Ben Woodcroft <b.woodcroft@uq.edu.au>
Cc: "guix-devel@gnu.org" <guix-devel@gnu.org>
Subject: Re: [PATCH] Help Ruby packages be reproducible
Date: Wed, 30 Dec 2015 03:47:37 +0100 [thread overview]
Message-ID: <20151230024737.GA10513@thebird.nl> (raw)
In-Reply-To: <56832BA6.6030806@uq.edu.au>
Excellent.
On Wed, Dec 30, 2015 at 10:56:06AM +1000, Ben Woodcroft wrote:
> On 30/12/15 10:51, Ben Woodcroft wrote:
> >Too ham-fisted?
> Maybe, but badly committed at least. Try this.
> From 3d23171d88b9f38c90efa469f6519b52b15a1d01 Mon Sep 17 00:00:00 2001
> From: Ben Woodcroft <donttrustben@gmail.com>
> Date: Wed, 30 Dec 2015 10:27:33 +1000
> Subject: [PATCH] build: ruby: Remove cached gem after install.
>
> The .gem file stored in GEM_HOME after install is both redundant and an
> archive that stores timestamped files which makes builds non-deterministic. So
> delete it after 'gem install'.
>
> * guix/build/ruby-build-system.scm (install): Remove cached gem after install.
> ---
> guix/build/ruby-build-system.scm | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/guix/build/ruby-build-system.scm b/guix/build/ruby-build-system.scm
> index 2685da1..b020272 100644
> --- a/guix/build/ruby-build-system.scm
> +++ b/guix/build/ruby-build-system.scm
> @@ -1,6 +1,7 @@
> ;;; GNU Guix --- Functional package management for GNU
> ;;; Copyright ?? 2015 David Thompson <davet@gnu.org>
> ;;; Copyright ?? 2015 Pjotr Prins <pjotr.public01@thebird.nl>
> +;;; Copyright ?? 2015 Ben Woodcroft <donttrustben@gmail.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -115,15 +116,19 @@ GEM-FLAGS are passed to the 'gem' invokation, if present."
> (assoc-ref inputs "ruby"))
> 1))
> (out (assoc-ref outputs "out"))
> - (gem-home (string-append out "/lib/ruby/gems/" ruby-version ".0")))
> -
> + (gem-home (string-append out "/lib/ruby/gems/" ruby-version ".0"))
> + (gem-name (first-matching-file "\\.gem$")))
> (setenv "GEM_HOME" gem-home)
> (mkdir-p gem-home)
> - (zero? (apply system* "gem" "install" (first-matching-file "\\.gem$")
> - "--local" "--ignore-dependencies"
> - ;; Executables should go into /bin, not /lib/ruby/gems.
> - "--bindir" (string-append out "/bin")
> - gem-flags))))
> + (apply system* "gem" "install" gem-name
> + "--local" "--ignore-dependencies"
> + ;; Executables should go into /bin, not /lib/ruby/gems.
> + "--bindir" (string-append out "/bin")
> + gem-flags)
> + ;; Remove the cached gem file as this is unnecessary and contains
> + ;; timestamped files rendering builds not reproducible.
> + (delete-file (string-append gem-home "/cache/" gem-name))
> + #t))
>
> (define %standard-phases
> (modify-phases gnu:%standard-phases
> --
> 2.6.3
>
--
next prev parent reply other threads:[~2015-12-30 2:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-29 5:46 [PATCH] Add 12 rubygems Ben Woodcroft
2015-12-29 5:51 ` Ben Woodcroft
2015-12-30 17:26 ` Ludovic Courtès
2015-12-29 7:18 ` Ricardo Wurmus
2015-12-30 0:51 ` [PATCH] Help Ruby packages be reproducible (was: [PATCH] Add 12 rubygems.) Ben Woodcroft
2015-12-30 0:56 ` [PATCH] Help Ruby packages be reproducible Ben Woodcroft
2015-12-30 2:47 ` Pjotr Prins [this message]
2015-12-30 8:26 ` Ricardo Wurmus
2015-12-30 23:52 ` Ben Woodcroft
2015-12-31 10:03 ` Ricardo Wurmus
2016-01-01 15:10 ` Ludovic Courtès
2016-01-02 15:02 ` Ben Woodcroft
2016-01-06 11:46 ` Ricardo Wurmus
2016-01-07 13:24 ` Ludovic Courtès
2016-01-08 14:16 ` Thompson, David
2016-01-07 14:31 ` Ludovic Courtès
2016-01-08 11:34 ` Ben Woodcroft
2016-01-08 16:55 ` Ludovic Courtès
2015-12-31 12:03 ` Ben Woodcroft
2015-12-30 9:14 ` [PATCH] Add 12 rubygems Ricardo Wurmus
2016-01-07 14:29 ` Ricardo Wurmus
2016-01-26 6:37 ` Ben Woodcroft
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151230024737.GA10513@thebird.nl \
--to=pjotr.public12@thebird.nl \
--cc=b.woodcroft@uq.edu.au \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.