tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: multi-variant packages and bulk builds
> In pkgsrc there are a number of packages (category/package) that can
> be built with different PKGNAME depending on a value of some special
> variables. For example, www/ap2-* packages, */py-* and many others.
> AFAIU in order to buils these packages pbulk uses hardcoded list of
> special variables in mk/pbulk/pbulk-index.mk. For multi-variant
> packages my distbb currently builds only package, the default one, but
> I don't thing the way pbulk works is the right way.
> Instead, I propose to introduce one special variable, e.g. VARIANTS,
> and to support it in all multi-variant packages.
> Example:
> cd /usr/pkgsrc/www/py-clearsilver
> make show-var VARNAME=VARIANTS
>> PYTHON_VERSION_DEFAULT=15,20,21,22,23,25
> cd /usr/pkgsrc/www/ap2-auth-external
> make show-var VARNAME=VARIANTS
>> PKG_APACHE_DEFAULT=apache2,apache22
> cd /usr/pkgsrc/www/ap2-python
>> PKG_APACHE_DEFAULT=apache2,apache22 PYTHON_VERSION_DEFAULT=23,24,25
> Using cartesian product of all supported values for all listed
> variables, bulk build software can easily build all variants all such
> packages. I hope the idea is clear.
> Of course the code that sets VARIANTS variable should use appropriate
> xxx_ACCEPTED variables.
> One of the main benefit of this approch is that pkgsrc itself and bulk
> build programs become more isolated and independant from each other
> because pkgsrc API becomes clearer and easier.
I'm not sure but I hope there are some persons (except myself) who are
interested in wip/pkg_summary-utils :-)
Based on suggestion (VARIANTS variable) described above, I've update
pkg_src_summary program. Now it can generate summary for all variants
of multi-variant packages and even more. See below ====.
Future versions of distbb will use this ability to build multi-variant
and multi-option packages.
I though about adding the same ability for packages that support
options, but e.g. mplayer supports 28 options. It is absolutely
impossible to build/test 2^28 variants of it, so cartesian product is
useless. Therefore, I keep python/php/apache alone.
=====================================================================
from NEWS file
-----------------
pkg_src_summary: new option -m added that generates summary
for all variants of multi-variant packages
(Python {23,24,25}, PHP {4,5}, Apache {1.3,2,2.2} etc.)
Example:
0 ~>export PSS_FIELDS='PKGPATH PKGNAME'
0 ~>./pkg_src_summary -m lang/lua www/php-apc www/ap2-python
PKGPATH=lang/lua
PKGNAME=lua-5.1.3nb1
PKGPATH=www/php-apc
PKGNAME=php4-apc-4.4.8.3.0.16
=> ASSIGNMENTS=PHP_VERSION_REQD=4
PKGPATH=www/php-apc
=> PKGNAME=php5-apc-5.2.6.3.0.16
=> ASSIGNMENTS=PHP_VERSION_REQD=5
PKGPATH=www/ap2-python
=> PKGNAME=ap2-py25-python-3.2.10
=> ASSIGNMENTS=PYTHON_VERSION_REQD=25 PKG_APACHE=apache2
PKGPATH=www/ap2-python
=> PKGNAME=ap22-py25-python-3.2.10
=> ASSIGNMENTS=PYTHON_VERSION_REQD=25 PKG_APACHE=apache22
PKGPATH=www/ap2-python
PKGNAME=ap2-py24-python-3.2.10
ASSIGNMENTS=PYTHON_VERSION_REQD=24 PKG_APACHE=apache2
PKGPATH=www/ap2-python
PKGNAME=ap22-py24-python-3.2.10
ASSIGNMENTS=PYTHON_VERSION_REQD=24 PKG_APACHE=apache22
PKGPATH=www/ap2-python
PKGNAME=ap2-py23-python-3.2.10
ASSIGNMENTS=PYTHON_VERSION_REQD=23 PKG_APACHE=apache2
PKGPATH=www/ap2-python
PKGNAME=ap22-py23-python-3.2.10
ASSIGNMENTS=PYTHON_VERSION_REQD=23 PKG_APACHE=apache22
0 ~>
See lines with '=>'.
-----------------
pkg_src_summary: the following format of input PKGPATH is supported:
real_pkgpath[:var1=value1[,var2=value2[...]]]
Example:
0 ~>export PSS_FIELDS='PKGNAME PKGPATH DEPENDS BUILD_DEPENDS'
0 ~>pkg_src_summary textproc/dictem:EMACS_TYPE=xemacs
=> PKGNAME=xemacs-dictem-0.82
PKGPATH=textproc/dictem
=> DEPENDS=dict-client>=1.9.14:../../textproc/dict-client
xemacs>=21.4<21.5:../../editors/xemacs xemacs>=21.4<21.5:../../editors/xemacs
BUILD_DEPENDS= checkperms>=1.1:../../sysutils/checkperms
=> ASSIGNMENTS=EMACS_TYPE=xemacs
0 ~>pkg_src_summary
www/ap2-wsgi:PYTHON_VERSION_DEFAULT=23,PKG_APACHE_DEFAULT=apache2
=> PKGNAME=ap2-py23-wsgi-1.3
PKGPATH=www/ap2-wsgi
=> DEPENDS= python23>=2.3:../../lang/python23
apache>=2.0.51<2.2:../../www/apache2 python23>=2.3.5nb6:../../lang/python23
apache>=2.0.61nb2:../../www/apache2
BUILD_DEPENDS= libtool-base>=1.5.18nb5:../../devel/libtool-base
perl>=5.0:../../lang/perl5 checkperms>=1.1:../../sysutils/checkperms
=> ASSIGNMENTS=PYTHON_VERSION_DEFAULT=23 PKG_APACHE_DEFAULT=apache2
0 ~>
See lines with '=>'.
--
Best regards, Aleksey Cheusov.
Home |
Main Index |
Thread Index |
Old Index