From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13386 invoked by alias); 29 Aug 2018 15:47:14 -0000 Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com Received: (qmail 13361 invoked by uid 89); 29 Aug 2018 15:47:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=interruption, H*r:Unknown, Hx-languages-length:1748 X-HELO: blaine.gmane.org Received: from Unknown (HELO blaine.gmane.org) (195.159.176.226) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 Aug 2018 15:47:12 +0000 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1fv2eQ-0004Ct-DI for cygwin-apps@cygwin.com; Wed, 29 Aug 2018 17:44:58 +0200 To: cygwin-apps@cygwin.com From: Andrew Schulman Subject: how to use opam for package builds? Date: Wed, 29 Aug 2018 15:47:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00042.txt.bz2 orpie recently changed to an opam-based build system. So I want to use opam to update it for Cygwin, but I've never used opam before and I have some questions about how to use it. The orpie build instructions say just to run "opam install orpie". When I do that, opam complains that I haven't set it up yet: $ opam install orpie [ERROR] No OPAM root found at /home/andrew/.opam. Please run 'opam init' to initialize the state of OPAM, or specify '--root'. See 'opam init --help' for details. Now for packaging, what's the right thing to do here? For example I could create the following install function for Cygport: src_install() { opam init opam install orpie } But this has two problems: (1) I can't get "opam init" to complete. It hangs after "synchronized from https://opam.ocaml.org", until I interrupt it: $ opam init Checking for available remotes: rsync and local, git, mercurial. - you won't be able to use darcs repositories unless you install the darcs command on your system. [WARNING] Recommended external solver aspcud not found. =-=- Fetching repository information =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= [default] synchronized from https://opam.ocaml.org ### hangs here until I hit ctrl-C: ### [ERROR] Initialisation failed User interruption # opam-version 1.2.2 # os cygwin Cannot remove /home/andrew/.opam (error 255). (2) Even if I get this to work, I don't think it's the right thing to do because it's setting up persistent opam configuration in my home directory, which I don't think is the right place for packaging. Should there be some global opam configuration, that all packaging scripts that rely on opam would use? If so, where should that go? Tnanks, Andrew