From owner-svn-doc-all@freebsd.org Sat Jan 9 20:24:15 2016 Return-Path: Delivered-To: svn-doc-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B4B3A69194; Sat, 9 Jan 2016 20:24:15 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 12353102E; Sat, 9 Jan 2016 20:24:14 +0000 (UTC) (envelope-from bjk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u09KOEww013946; Sat, 9 Jan 2016 20:24:14 GMT (envelope-from bjk@FreeBSD.org) Received: (from bjk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u09KOECr013945; Sat, 9 Jan 2016 20:24:14 GMT (envelope-from bjk@FreeBSD.org) Message-Id: <201601092024.u09KOECr013945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bjk set sender to bjk@FreeBSD.org using -f From: Benjamin Kaduk Date: Sat, 9 Jan 2016 20:24:14 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r47981 - head/en_US.ISO8859-1/htdocs/news/status X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Jan 2016 20:24:15 -0000 Author: bjk Date: Sat Jan 9 20:24:13 2016 New Revision: 47981 URL: https://svnweb.freebsd.org/changeset/doc/47981 Log: Add entry on generating port variants from Brendan Molloy Modified: head/en_US.ISO8859-1/htdocs/news/status/report-2015-10-2015-12.xml Modified: head/en_US.ISO8859-1/htdocs/news/status/report-2015-10-2015-12.xml ============================================================================== --- head/en_US.ISO8859-1/htdocs/news/status/report-2015-10-2015-12.xml Sat Jan 9 20:00:45 2016 (r47980) +++ head/en_US.ISO8859-1/htdocs/news/status/report-2015-10-2015-12.xml Sat Jan 9 20:24:13 2016 (r47981) @@ -928,4 +928,99 @@ + + + Supporting Variants in the Ports Framework + + + + + Brendan + Molloy + + brendan+freebsd@bbqsrc.net + + + + + Poudriere PoC with Variants + Ports Makefile PoC with Examples + + + +

I recently became involved with &os; (as in, the last 2-3 + weeks), and found myself quickly involved with Ports development. + What quickly struck me was the difficulty in providing a Python + package that was depended upon by multiple versions of Python. As + it turns out, poudriere can currently only generate one package + per port, meaning that a Python version-neutral (compatible with + 2.x and 3.x) port cannot simultaneously be packaged for each + variant at the same time.

+ +

I discussed the issue with &a.koobs;, who suggested that I + look into implementing a "variants protocol" within the + Ports framework and the necessary changes to poudriere in order to + allow a port to generate more than one package.

+ +

Support for variants is strongly needed in Ports and + provides significant benefits.

+ +
    +
  • It would allow Python and other languages to provide + packages for dependencies for multiple language versions from the + same port.
  • + +
  • It alleviates the need for so-called "slave + ports", as a single port could now have multiple generated + packages from a single port.
  • + +
  • It would have a very small impact on the greater Ports + ecosystem: adding only two new variables, VARIANT and + VARIANTS.
  • + +
  • It would provide a more consistent approach between + different packaging teams for handling variations.
  • +
+ +

For a simple example, editors/vim-lite could + be folded into the editors/vim port, while still + generating a vim and vim-lite package. + For Python, VARIANTS can be derived from the already + used USES flags and generate compatible packages. + py27-foobar and py34-foobar could now be + consistently generated by poudriere without issue.

+ +

Fortunately, this is not a wishful thinking piece. I dug + in my heels and have implemented a proof-of-concept implementation + of variants in the Ports framework, including the necessary + modifications to poudriere in order to support it. It was mildly + upsetting to find that poudriere is mostly written in Bourne shell + scripts, but press on I did nonetheless.

+ +

I started with the + prototype made by &a.bapt; as a base, and built from there. + The poudriere PoC aims to limit changes as much as possible to + merely adding support for the new variants flags, while also at + the request of &a.koobs; making the logging output more + package-centric (as opposed to port-centric) as a result of these + changes.

+ +

This is a work in progress, and I would + love to hear your feedback. I've enjoyed my first few weeks + working on &os;, and I hope to stay here for quite some time.

+ + + + +

Any constructive feedback on the implementation would be + very welcome!

+
+ + +

Hopefully the code will be of sufficient quality to be considered + for formal review in the coming months.

+
+
+