From owner-freebsd-ports@freebsd.org Tue Aug 6 17:55:55 2019 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F17F3C6CEC for ; Tue, 6 Aug 2019 17:55:55 +0000 (UTC) (envelope-from jgh@helfman.org) Received: from sender4-of-o55.zoho.com (sender4-of-o55.zoho.com [136.143.188.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4632P66sTyz4J8L for ; Tue, 6 Aug 2019 17:55:54 +0000 (UTC) (envelope-from jgh@helfman.org) ARC-Seal: i=1; a=rsa-sha256; t=1565114151; cv=none; d=zoho.com; s=zohoarc; b=e+soY2yixhUgS+auJE1Wvi0LYFDiJAPcGthIC6TeKK2lxdlIcia02Wa/nL3/czoleuWQyPxK/FkfY2LOE8h5GY4cGNsNZpA31CVP6eeC/ZSryAi0tZ2GCFPAewHVcZGcmc4yyM0yKVMZfPkasaifT73+0i6nUmveJwpS/KO2A7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565114151; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=e19arwjmgyVls2a55MUD4lTyOyxZDua+jFCK9VZ4EXk=; b=gqB6x1+vueuWgbKciK1AQqOZOtlW/c5a9A8WvrLnYe99oYdlV9duzhfCZOeFP/LzIHvqqAZ/XKvn+qLcP9ci0rtHk87wMnRJXyTscgNRHryeoFLbIeGv1B1YEAHAMUxLyJmb6z8x8VXArVwQPBV6X0FuLRooWd0d4NkZrIwIac0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=helfman.org; spf=pass smtp.mailfrom=jgh@helfman.org; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1565114151; s=zoho; d=helfman.org; i=jgh@helfman.org; h=Date:From:To:Cc:Message-Id:In-Reply-To:References:Subject:MIME-Version:Content-Type; l=10281; bh=e19arwjmgyVls2a55MUD4lTyOyxZDua+jFCK9VZ4EXk=; b=DQFj5aLrwSvkgejdOLERxsIHrHUy7Q6LAGQBZMFU1l51DFl6YjpwCEk/eNWs9VmO zmxu7mWJO5l6LNKhnwuQagmMY8xSYD2oswUtalvWsys7AycETVwSAPK7kN7fP+BcTsE Nz88ioWDkriMyMPbGs5j9j8AyazszOTtTTq7ueqs= Received: from mail.zoho.com by mx.zohomail.com with SMTP id 1565114150337322.5931247369772; Tue, 6 Aug 2019 10:55:50 -0700 (PDT) Date: Tue, 06 Aug 2019 10:55:50 -0700 From: Jason Helfman To: "Daniel Morante" Cc: "freebsd-ports" Message-Id: <16c6812adbe.10e020f64473134.778021451648232868@helfman.org> In-Reply-To: References: <9caa5ea5-e030-adab-516d-df957e07760f@fechner.net> Subject: Re: How to package maven based ports MIME-Version: 1.0 X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail X-Rspamd-Queue-Id: 4632P66sTyz4J8L X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=helfman.org header.s=zoho header.b=DQFj5aLr; dmarc=none; spf=pass (mx1.freebsd.org: domain of jgh@helfman.org designates 136.143.188.55 as permitted sender) smtp.mailfrom=jgh@helfman.org X-Spamd-Result: default: False [-6.09 / 15.00]; IP_SCORE(-1.60)[ipnet: 136.143.188.0/24(-4.81), asn: 2639(-3.15), country: US(-0.05)]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[helfman.org:s=zoho]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:136.143.188.0/23]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[helfman.org]; ARC_ALLOW(-1.00)[i=1]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[helfman.org:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[55.188.143.136.list.dnswl.org : 127.0.15.0]; NEURAL_HAM_SHORT(-1.00)[-0.998,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:2639, ipnet:136.143.188.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2019 17:55:56 -0000 I've looked over this thread a bit, and have done similar things in the pas= t. I have created an archive of a maven repository after having remote repo= s break the repeatable build process. I would create an archive, and then u= se this archive as a distfile. I would then point to this archive during th= e build phase to use as a repo. I have also updated the using-java bits of the handbook awhile ago regardin= g installing war files. databases/jasperreports (a port I used to maintain was setup this way) Over the years, I have suggested this methodology, which folks agreed with = at the time, and have been in some ports since.=C2=A0 https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/using-ja= va.html Hope this helps -jgh ---- On Sat, 20 Jul 2019 12:33:50 -0700 Daniel Morante via freebsd-ports wrote ---- I've run into the same issue while attempting to port a few JAVA apps=20 that use maven and more recently one that also uses yarn for dependencies. > Have a look at the java/eclipse port. It uses a pre-warmed maven > repository that is fetched from github. While this is indeed a clever solution, it's (in my opinion) not ideal.=C2= =A0=20 Don't take this personally, I applaud you for taking the time and effort=20 in making the Eclipse port.=C2=A0 I use it on my systems.=C2=A0 However, I = feel=20 that it's important that I point this out.=C2=A0 There are potential proble= ms=20 with this approach.=C2=A0 Most notably that the source of the dependencies= =20 gets changed from the original location.=C2=A0 The consequences could be=20 serious should something happen to your repository. This in my opinion is a bigger issue caused by these so called 'modern'=20 package managers that are becoming popular to use (maven, npm, yarn, and=20 composer to name a few).=C2=A0 Historically like what is currently done wit= h=20 perl and python (and to a lesser extent ruby), we would create ports for=20 each of these libraries and let the ports system handle the rest. Ideally the FreeBSD ports system should have the needed tooling to fetch=20 these type of dependencies as part of the same process used during the=20 dist files retrieval step.=C2=A0 One method would be for the porter to=20 include the pom.xml, composer.json, and/or package.json files as part of=20 the port skeleton.=C2=A0 The ports system would (using appropriate tools)= =20 download the dependencies to 'pre-warm' a local cache as you are doing.=C2= =A0=20 Then set the environment to use the local cache instead of downloading=20 during the build phase. I think this may be possible to hack together using the current make=20 targets 'pre-fetch' and 'post-fetch'?=C2=A0 Further thinking about this,=20 having the pom.xml in the skeleton may not even be needed is you can use=20 the post-fetch target? On 7/14/2019 3:21 PM, Matthias Fechner wrote: > Am 14.07.2019 um 00:23 schrieb Jonathan Chen: >> Have a look at the java/eclipse port. It uses a pre-warmed maven >> repository that is fetched from github. >> >> You can create a localised repository that only contains the >> dependancies required by the project by specifying: >> -D maven.repo.local=3D/my/local/repo >> >> Once your project builds correctly, you can create a repo as a project >> on Github with its contents that can be retrieved with the port for >> the build. > thanks a lot for this. > I'm not fully done with the port, but I was able to get this maven > repository to be pushed to github and the port downloads it and > compilation works as expected. > Thanks a lot for you answer, it helped a lot. > > Now I need someone for testing the port, as I do not use it and are > therefor I'm not able to test it. > > The final step would be to do some clean up a make the port more pretty. > > I try later to write a short summary if some one else needs to build a > port with maven how it could be done. > > Gru=C3=9F > Matthias > _______________________________________________ mailto:freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "mailto:freebsd-ports-unsubscribe@freebsd.= org" From owner-freebsd-ports@freebsd.org Tue Aug 6 21:05:56 2019 Return-Path: Delivered-To: freebsd-ports@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2471ECA5FE for ; Tue, 6 Aug 2019 21:05:56 +0000 (UTC) (envelope-from karlo@klarinet.osamsb.hr) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4636cL4fcTz4VTr for ; Tue, 6 Aug 2019 21:05:53 +0000 (UTC) (envelope-from karlo@klarinet.osamsb.hr) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id D697F500 for ; Tue, 6 Aug 2019 17:05:51 -0400 (EDT) Received: from imap1 ([10.202.2.51]) by compute5.internal (MEProxy); Tue, 06 Aug 2019 17:05:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=5xjp9P8Ixcl+mLmlkS49Z4RsgL+FP J5D8ZD2JZulLao=; b=svSfbSYatJvb6/4AdunfPiHrVS72YieYyQlidyDxpEHtZ idXcF+W+DwlKazxqhkFhdgRT6r1DzfKL9rqdhWD5GFUJo0H6paevYIYWZg9BGsDU OMLipVb8+xTXBKYhbelsqWnzhuQonWAPPIcUVN5ApOT7uB3ki/yq32oQoSIkyEkn X49xBXmem7GQ/Y0S4J3l5qHnrTRIm0PwuqzcdIxDiuwwWu6NrSDo0jrtOeTyATCI 69JQBkj+159pRWjOcRd/wgg4FepE7q9bgMEP7jvhCySLN+Z0YLcxh5aUeAzlPjeB MTPsXyZNLVipBcpm/2nyYiZ28qR/nE5dBbKAeYIlg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddruddutddgudehiecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesthdtre dtreertdenucfhrhhomhepfdfmrhgrlhhjucfmrghrlhhofdcuoehkrghrlhhosehklhgr rhhinhgvthdrohhsrghmshgsrdhhrheqnecuffhomhgrihhnpehfrhgvvggsshgurdhorh hgnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkrghrlhhosehklhgrrhhinhgvthdrohhs rghmshgsrdhhrhenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 97756C200A4; Tue, 6 Aug 2019 17:05:50 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.6-808-g930a1a1-fmstable-20190805v2 Mime-Version: 1.0 x-forwarded-message-id: <20190804043538.B454C380075@mailuser.nyi.internal> Message-Id: <8dd1d689-a065-4931-b9d3-8727aac2d892@www.fastmail.com> Date: Tue, 06 Aug 2019 17:05:49 -0400 From: "Kralj Karlo" To: freebsd-ports@freebsd.org Subject: Creation of a diff of a new port Content-Type: text/plain X-Rspamd-Queue-Id: 4636cL4fcTz4VTr X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=svSfbSYa; dmarc=none; spf=none (mx1.freebsd.org: domain of karlo@klarinet.osamsb.hr has no SPF policy when checking 64.147.123.19) smtp.mailfrom=karlo@klarinet.osamsb.hr X-Spamd-Result: default: False [-5.88 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[messagingengine.com:s=fm3]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ports@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-0.998,0]; RCVD_COUNT_THREE(0.00)[4]; DMARC_NA(0.00)[osamsb.hr]; DKIM_TRACE(0.00)[messagingengine.com:+]; NEURAL_HAM_SHORT(-0.99)[-0.994,0]; IP_SCORE(-3.50)[ip: (-9.90), ipnet: 64.147.123.0/24(-4.88), asn: 11403(-2.68), country: US(-0.05)]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[19.123.147.64.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; RCVD_TLS_LAST(0.00)[]; MID_RHS_WWW(0.50)[] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Aug 2019 21:05:56 -0000 I am trying to create a diff of a new port in order that I may submit the port. I believe to have followed the directions from the Porter's Handbook, but the result is not as I had expected. $ portsnap fetch (I didn't save the output.) $ portsnap extract (I didn't save the output.) $ svn checkout https://svn.FreeBSD.org/ports/head /usr/ports ... (lots of output omitted) A /usr/ports/Keywords/shell.ucl A /usr/ports/Keywords/fc.ucl A /usr/ports/Keywords/desktop-file-utils.ucl U /usr/ports Checked out revision 508034. $ cp -r my-keynav-port /usr/ports/x11/keynav $ svn add /usr/ports/x11/keynav/ svn: E155013: Can't add '/usr/ports/x11/keynav' to a parent directory scheduled for deletion $ uname -a FreeBSD t5600 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC amd64 Also, I have tried running "svn diff" on ports that I did not change. I expected no output in such cases and was surprised to see output. $ svn diff | head Index: Makefile =================================================================== --- Makefile (revision 508034) +++ Makefile (nonexistent) @@ -1,102 +0,0 @@ -# Created by: Scott Blachowicz -# $FreeBSD$ - -PORTNAME= nmh -PORTVERSION= 1.7.1 What must I do in order add the new directory? I pray that you have faith in my best sentiments. Kralj Karlo