From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id D43237EE6A for ; Thu, 30 May 2013 22:11:18 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=74.125.82.178; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of mmatalka@gmail.com designates 74.125.82.178 as permitted sender) identity=mailfrom; client-ip=74.125.82.178; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-we0-f178.google.com) identity=helo; client-ip=74.125.82.178; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-we0-f178.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArgAAEqxp1FKfVKyjWdsb2JhbABZFoJSUcIXfhYOAQEBAQcLCwkSBiSCIwEBBAFAARsdAQMBCwYFCw0JJQ8BBA0CEQEFASITG4dfAQMJBgELnTGMSIJ9hHoKGScNWId0AQUMjDiCWAeDVwOVWIFmjB2DPj+ENQ X-IPAS-Result: ArgAAEqxp1FKfVKyjWdsb2JhbABZFoJSUcIXfhYOAQEBAQcLCwkSBiSCIwEBBAFAARsdAQMBCwYFCw0JJQ8BBA0CEQEFASITG4dfAQMJBgELnTGMSIJ9hHoKGScNWId0AQUMjDiCWAeDVwOVWIFmjB2DPj+ENQ X-IronPort-AV: E=Sophos;i="4.87,772,1363129200"; d="scan'208";a="16254780" Received: from mail-we0-f178.google.com ([74.125.82.178]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 30 May 2013 22:11:18 +0200 Received: by mail-we0-f178.google.com with SMTP id q56so631861wes.37 for ; Thu, 30 May 2013 13:11:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=QytgFX50DOM3tKBkGP7T4c3tTCTdl8WDVCd7zAs6rEQ=; b=QcBECwnWbKlY2meL7iETCxe7yFwbjBCr9h54UuOmLmwGe+IAo6EcAMYLRtDPl2L3CI SQxpNxi6VqpmgWqPMW57eJ0hkILJRJ3sqjnXb0GuOBhHETZ5PYt38ATVUqj5sN/5hHTP vwjDJZRX2zlUjqED/a44BiqZFiXVwEdcuQLZAV54L4IaCCtuFQlEB+XjKEjERrzFtbRZ Lh+93zfBtr/tdO5KiOcN3vlMtLsgaR9j+OpIPLUCFpOXfudkv7dPJdZlHJzkl8urC1mf 4GXJDsT3Uk0ajS5195jO2Ht281PycWKmkm2jWAIqoQZsA1TEr7cNfOVaRVuhoVaqUcGP UPdA== X-Received: by 10.194.110.133 with SMTP id ia5mr6388342wjb.35.1369944677463; Thu, 30 May 2013 13:11:17 -0700 (PDT) Received: from localhost ([2a01:7e00::f03c:91ff:fe70:2696]) by mx.google.com with ESMTPSA id e5sm588662wiy.5.2013.05.30.13.11.16 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 13:11:17 -0700 (PDT) From: Malcolm Matalka To: Florent Monnier Cc: Francois Berenger , caml-list@inria.fr References: Date: Thu, 30 May 2013 20:11:16 +0000 In-Reply-To: (Florent Monnier's message of "Thu, 30 May 2013 21:37:41 +0200") Message-ID: <87obbsns7v.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] Re: opam packages wrapped inside a spec file Have you looked at fpm (https://github.com/jordansissel/fpm) for producing RPMs and debs from an arbitrary directory structure? /M Florent Monnier writes: > 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. > > --