From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id E6A9D7EFC0 for ; Mon, 4 Jan 2016 17:08:53 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.20,521,1444687200"; d="scan'208";a="195524268" Received: from meleze.ens.fr (HELO [129.199.99.114]) ([129.199.99.114]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 04 Jan 2016 17:08:53 +0100 To: caml-list@inria.fr References: <568A2FBF.1000207@inria.fr> <568A848A.50108@cea.fr> From: Francois Berenger Message-ID: <568A9915.7000006@inria.fr> Date: Mon, 4 Jan 2016 17:08:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <568A848A.50108@cea.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] How to create a local opam repository for offline use? On 01/04/2016 03:41 PM, François Bobot wrote: > Hello, > > On 04/01/2016 09:39, Francois Berenger wrote: >> What is the current procedure to prepare an opam repository >> so that a machine that has no internet access can still use >> opam ? >> >> Furthermore, is it possible to create a minimal opam repository, >> so also for offline use, but let's say I know only a single >> software with all its dependencies will be installed by the >> offline machine. >> Because, I am foreseeing that downloading all tarballs of all possible >> ocaml software/libraries might exhaust my patience. > > The relevant issues are, I think: > https://github.com/ocaml/opam/issues/2098 > > And a PR that solve some remaining problems with virtual packages: > https://github.com/ocaml/opam/pull/2257 > > However I need to rewrite it in order to have something less hackish. OK, thanks for the info, so here is a recipe that worked for me: wget https://github.com/ocaml/opam-repository/archive/master.tar.gz tar xzf master.tar.gz cd opam-repository-master opam-admin make --resolve PKG # here I needed to remove # ocamlbuild from the depends field in the opam file of several packages # so that the solver finally succeed, so opam-admin-make probably has # a bug opam repo add offline $PWD opam repo remove default # then I have only one opam repository setup # here I turned off my network card opam update opam install PKG # worked using tarballs from the local-disk only -- Regards, Francois. "When in doubt, use more types"