From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Self-contained Guix tarball Date: Sun, 12 Apr 2015 22:07:03 +0200 Message-ID: <87a8ydt8k8.fsf_-_@gnu.org> References: <20150410084651.GA23353@thebird.nl> <873848p5kd.fsf@gnu.org> <20150410131420.GB24509@thebird.nl> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhO9w-0007QX-It for guix-devel@gnu.org; Sun, 12 Apr 2015 16:07:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhO9r-000661-Py for guix-devel@gnu.org; Sun, 12 Apr 2015 16:07:12 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:49233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhO9r-00065p-Mr for guix-devel@gnu.org; Sun, 12 Apr 2015 16:07:07 -0400 In-Reply-To: <20150410131420.GB24509@thebird.nl> (Pjotr Prins's message of "Fri, 10 Apr 2015 15:14:20 +0200") 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: Pjotr Prins Cc: guix-devel@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Pjotr Prins skribis: > Well yes, you need to install all prerequisites and that is not always > trivial. Try bootstrapping on an old Centos install, for example. > Can't even get Docker going there. > > It would be nice to have an installable binary tar ball for Guix. Just > unpack in root and go... I=E2=80=99ve given that a try since it=E2=80=99s actually quite simple to d= o. The procedure in the attached file produces a self-contained tarball. It contains the closure of Guix, as well as /var/guix and an initial /root/.guix-profile from which one can use the =E2=80=98guix=E2=80=99 comma= nds. I=E2=80=99ve uploaded the result (for x86_64) at: http://www.fdn.fr/~lcourtes/software/guix/guix-tarball-0.8.1.1140.tar.lz http://www.fdn.fr/~lcourtes/software/guix/guix-tarball-0.8.1.1140.tar.lz.= sig SHA1: afde62b3e9f97f9ae0c57eaccfaca842b157cd2f To install Guix on a foreign distro, follow these steps: 1. Download the tarball (38 MiB.) 2. As root, run: cd / tar xf /path/to/guix-tarball-0.8.1.1140.tar.lz You need lzip and GNU tar. 3. Setup the daemon as explained in the manual, and run it from /root/.guix-profile/bin/guix-daemon. And hopefully, that=E2=80=99s it. I haven=E2=80=99t actually tried it, so feedback is welcome! :-) Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-scheme Content-Disposition: inline; filename=tarball.scm Content-Description: tarball creation (use-modules (guix) (guix profiles) (gnu packages base) (gnu packages compression) (gnu packages package-management)) (define* (self-contained-tarball #:key (guix guix)) (mlet %store-monad ((profile (profile-derivation (manifest (list (package->manifest-entry guix)))))) (gexp->derivation "guix-tarball.tar.lz" #~(begin (use-modules (guix build store-copy) (guix build utils) (gnu build install) (srfi srfi-26)) (define %root (string-append (getcwd) "/root")) (define %root-profile "/var/guix/profiles/per-user/root") (define (mkdir-p* dir) (mkdir-p (string-append %root "/" dir))) (define (symlink* old new) (symlink old (string-append %root "/" new))) (setenv "PATH" (string-append #$guix "/sbin:" #$tar "/bin:" #$lzip "/bin")) ;; Populate the store. (populate-store '("profile") %root) (for-each (cut register-closure %root <>) '("profile")) ;; 'guix-register' registers profiles as GC roots ;; but the symlink target uses $TMPDIR. Fix that. (delete-file (string-append %root "/var/guix/gcroots/profiles")) (symlink* "/var/guix/profiles" "/var/guix/gcroots/profiles") ;; Make root's profile, which makes it a GC root. (mkdir-p* %root-profile) (symlink* #$profile (string-append %root-profile "/guix-profile-1-link")) (symlink* (string-append %root-profile "/guix-profile-1-link") (string-append %root-profile "/guix-profile")) (mkdir-p* "/root") (symlink* (string-append %root-profile "/guix-profile") "/root/.guix-profile") ;; Create the tarball. Use GNU format so there's no ;; file name length limitation. (chdir %root) (zero? (system* "tar" "--lzip" "--format=gnu" "-cvf" #$output "."))) #:references-graphs `(("profile" ,profile)) #:modules '((guix build utils) (guix build store-copy) (gnu build install))))) ;; (pk (with-store store ;; (run-with-store store (self-contained-tarball)))) --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVKtBoAAoJEAkLEZk9muu1shoQAKiCRVup5SL5I6TqIClNl9S5 3YO2ju3ArVAb6LOFdLj6jHrI0Uh4bD5uFD3O2l4RshOOjuy3ko716zu135udEXsT j7GjyuCD4l3p6jrNhYzjGBNTp8U8C6+UrdsQ+qgE1GraIUq/+dyKY5+lRphgCKCY djYDdOf4A0Q5XBrhHtdnVOPIVJ7vlsEnLSd8cqGM+e++wDOj2DPNa7BOoQ+JORga qZI/WsbU8Uspucz6uax3ddyaV6Yui72J60ONnie8E4anykDJSJJHmJL7UjTks5xC NSYvoS/4+xzqmPFpwliecJ6F4ieVo/z03IzMuuIpKu5+VeuHlNg8ZV5BIyFM3b2V X9IwYHi9yoMqJfeJiUlqIwbTSLKTBhcCjQVV7PqzljfFykyfogcUkAYaGxQdTbpG olzFwZIVWucrJ1V4D2v6mVmUa8vn1iU4CDhkpw2IovC2MSM0Pol+dT0jYZz18vIe V5jd131BPoLNPTu7EhISRZ9SBd60thl1e8glzwitQGngEs8+KzkPJzfoxiOGLjMc Ed8rxRcOCHf3YdXfoCBsYTuxJ3yJBcaUJU5xY+HN5Wcr6539I2y2uTosqYiWTeAa LNsg264q1tOuQm5xG3D1bu+cr9vO6vNitWGbqAJe7Xu+c1Zo9v52aVBmbGd4ro4t sdnWWC7QYYqSsSYTsb/f =60cF -----END PGP SIGNATURE----- --==-=-=--