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 334A37EE6A for ; Thu, 30 May 2013 21:37:42 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of monnier.florent@gmail.com) identity=pra; client-ip=209.85.212.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="monnier.florent@gmail.com"; x-sender="monnier.florent@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of monnier.florent@gmail.com designates 209.85.212.179 as permitted sender) identity=mailfrom; client-ip=209.85.212.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="monnier.florent@gmail.com"; x-sender="monnier.florent@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wi0-f179.google.com) identity=helo; client-ip=209.85.212.179; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="monnier.florent@gmail.com"; x-sender="postmaster@mail-wi0-f179.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoUDAPupp1HRVdSzjWdsb2JhbABZFoMjs0aOSAQEAXYIFg4BAQEBBwsLCRIGJIIjAQEEQQEbHQEDAREFCw1QAREBBQEiLodfAQMJBgydQoxIgn2EdwoZJw1Yh3QBBQyPEINeA5c+j1sWKYQ3Og X-IPAS-Result: AoUDAPupp1HRVdSzjWdsb2JhbABZFoMjs0aOSAQEAXYIFg4BAQEBBwsLCRIGJIIjAQEEQQEbHQEDAREFCw1QAREBBQEiLodfAQMJBgydQoxIgn2EdwoZJw1Yh3QBBQyPEINeA5c+j1sWKYQ3Og X-IronPort-AV: E=Sophos;i="4.87,772,1363129200"; d="scan'208";a="19689184" Received: from mail-wi0-f179.google.com ([209.85.212.179]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 30 May 2013 21:37:41 +0200 Received: by mail-wi0-f179.google.com with SMTP id hq7so40904wib.12 for ; Thu, 30 May 2013 12:37:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=QugqKeUxu+y5HDahMTsOv0r2tnBJGkptY+fvUWFLlv4=; b=rKzj6Vy12j5qMx7P9yZcjuPFSHf1oEftuHyMgvmpr4tfs1nu3V+s/VVwYCOotsf8ob 4Up/I4uxSWFDul4j3XkwoXvqtjFwSd70w0YNEB8/4fPu0TF2HnlMg4scI1efaeuS/b6y pz8ZYIDmIivxsDu1bDeXxM83FpDxR9tWkLfZeKxJ6/7g14UFB9uwvZun3kwJETYqyU6m 5HqrWNP7cd+4xhZkFJqIoj/vwDycv/OMVEgGQoO4HKCPoX2ntAhF2pHEH/3lRnPqCP1z t6jjWEUggZ74rJQ/QAz4MJMxr/iElY5ZcSG55zJ5AIiRl8LnuLDHcNRmkdNbzKPVHpyf RXeg== MIME-Version: 1.0 X-Received: by 10.180.79.200 with SMTP id l8mr131826wix.60.1369942661757; Thu, 30 May 2013 12:37:41 -0700 (PDT) Received: by 10.194.31.2 with HTTP; Thu, 30 May 2013 12:37:41 -0700 (PDT) Date: Thu, 30 May 2013 21:37:41 +0200 Message-ID: From: Florent Monnier To: Francois Berenger Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Validation-by: monnier.florent@gmail.com Subject: Re: [Caml-list] Re: opam packages wrapped inside a spec file 2013/05/30, Francois Berenger wrote: > On 05/30/2013 06:29 AM, Florent Monnier wrote: [...] >> For fun I've played with wrapping an opam package inside a rpm package. >> I just have to tar.gz the package directory and in the .spec file, sed >> the archive field for a file:// path (because not allowed to get >> something from outside) seded with the archives in the SOURCES >> directory of the rpm package. I init Opam and repo remove the internet >> one (again nothing from outside), then install in the path that >> rpmbuild wants. >> There is still one detail that won't be able to be done by a script >> it's when there's a C lib dependency, because Opam don't provide yet >> any feature for this. But this will probably come for 2.0. So it's >> potentially possible to create .rpm's for all Opam packages with >> almost no or very few human work. This kind of rpm's won't fit the >> Mageia packaging policy though, but we could change it to allow this, >> or put an unofficial rpm repo somewhere else. > > Will this procedure be automated? > > Automatic creation of RPMs from OPAM packages. > I am very interested by this. Here is the early result of playing with this: http://www.linux-nantes.org/%7Efmonnier/ocaml/opam/wrap-rpm/ you can see it's only the opam package wrapped inside a .spec file. A more clean solution would of course to make an opam2spec script to really create a .spec file that would look very close to a human made .spec file. But I think that this second solution would need more human work thant the dirty one. This second would maybe even take as many time as if it's completely made by hand because there would be more details to edit I think. And the dirty wrap method has also the advantage to stay very close to the original one. > Will this procedure be automated? This one seems to give an acceptable result. (only README LICENSE and api-doc are missing) I guess this one could be used as a template by a script for the others. > Automatic creation of RPMs from OPAM packages. > I am very interested by this. need to add the homepages and licenses fields in opam files if we want this script to be able to fill the equivalent fields of the .spec files. Also the C lib dependency needs to be found to add the BuildRequires fields. Otherwise it seems that most of it can be automated. --