Commit 8dd841b4 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

Initial commit.

parents
[_Storage Tradeoffs in a Collaborative Backup Service for Mobile Devices_](https://hal.inria.fr/hal-00187069/en) redone
========================================================================
This repository contains code to deploy and run the software and file
sets used to perform the evaluations that appear in [_Storage Tradeoffs
in a Collaborative Backup Service for Mobile
Devices_](https://hal.inria.fr/hal-00187069/en), published at the
[European Dependable Computing Conference
(EDCC)](http://edcc.dependability.org/),
[2006](https://dblp.uni-trier.de/db/conf/edcc/edcc2006), as part of the
[“Ten Year Reproducibility
Challenge”](https://rescience.github.io/ten-years/).
To build and run the evaluation, install
[GNU Guix](https://guix.gnu.org) and type:
```
guix time-machine -C channels.scm -- build -f guix.scm
```
This is work in progress!
;; This file lists channels that GNU Guix should pull in order to be able to
;; deploy all the software 'guix.scm' refers to.
(list (channel
(name 'guix-past)
(url "https://gitlab.inria.fr/guix-hpc/guix-past.git")
(commit "e8cd40fbfc096fdd6d2068442ab91d80894e19d3"))
(channel
(name 'guix)
(url "https://git.savannah.gnu.org/git/guix.git")
(commit "6e27d1088da07380872f0df9f308b674536cefc8")))
;;; Copyright © 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This program is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
;; This file contains code to deploy and run the libchop algorithm
;; evaluation. Run with:
;;
;; guix build -f guix.scm
(use-modules (guix) (gnu)
(guix git-download)
(gnu packages guile)
(past packages backup)
(srfi srfi-1)
(ice-9 match))
;;;
;;; File sets.
;;;
(define file-set/gnu-manuals
;; The "gnu-manuals" file set.
(let ((commit "9572cc2870e597f6323cc544d85929b3f14fb4bb"))
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.inria.fr/lcourtes-phd/file-sets.git")
(commit commit)))
(file-name (string-append "file-sets-" (string-take commit 7)))
(sha256
(base32
"1mq83dzh6r27yrmb1qsclgzxk9by7pkqd1vwkhy4r02gfxzb064y")))))
(define file-set-cache
;; Cache for use as ~/.chop-eval/cache/web.
(computed-file "file-set-cache"
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (guix build utils))
(for-each (lambda (file)
(install-file file #$output))
(find-files #$file-set/gnu-manuals
"\\.ps.gz"))))))
;;;
;;; Evaluation.
;;;
(define chop-eval
;; Scripts to perform the evaluation shown in the paper.
(let ((commit "b8aac089e164c39bcc5b8cd97b96c5aaabf597ba")) ;13 Apr. 2006
(origin
(method git-fetch)
(uri (git-reference
(url "https://gitlab.inria.fr/lcourtes-phd/chop-eval.git")
(commit commit)))
(file-name (string-append "chop-eval-" (string-take commit 7)))
(sha256
(base32
"0ildad6b9m58nn8g7rjrss1snfc972fjkagbsamy36d1wkpmybad")))))
(define libchop&co
;; Libchop and its propagated inputs
(append-map (lambda (package)
(cons package
(match (package-transitive-propagated-inputs package)
(((labels packages) ...)
packages))))
(list libchop/guile-1.8)))
(define evaluation
;; The actual evaluation.
(let ()
(define build
(with-imported-modules '((guix build utils))
#~(begin
(use-modules (guix build utils))
(setenv "GUILE_LOAD_PATH"
(string-join '(#$@libchop&co) "/share/guile/site:"
'suffix))
(setenv "PATH"
(string-join (list #$guile-1.8
#$(specification->package "coreutils")
#$(specification->package "bash")
#$(specification->package "gzip"))
"/bin:" 'suffix))
;; Provide a valid shebang for the scripts.
(copy-recursively #$chop-eval ".")
(for-each patch-shebang
'("run.sh" "chop-eval.scm"))
;; Allow the local Guile modules to be found.
(setenv "GUILE_LOAD_PATH"
(string-append (getcwd) "/module:"
(getenv "GUILE_LOAD_PATH")))
(mkdir #$output)
;; Make the file sets available in the local "cache". It must be
;; copied because (chop utils cache) attempts to link(2) to it.
(setenv "HOME" (getcwd))
(copy-recursively #$file-set-cache
".chop-eval/cache/web")
;; FIXME: For now, limit to that one file set.
(substitute* "run.sh"
(("^file_sets=.*")
"file_sets=built-in:gnu-manuals-postscript\n"))
(invoke "./run.sh"))))
(computed-file "evaluation" build)))
evaluation
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment