Date: Sun, 14 Aug 2016 15:37:09 +0200 From: Mathieu Arnold <mat@FreeBSD.org> To: =?UTF-8?Q?Martin_Waschb=C3=BCsch?= <martin@waschbuesch.de>, freebsd-ports@freebsd.org Subject: Re: questions about Makefile Message-ID: <466E8D27808DEDCCA467EE3A@atuin.in.mat.cc> In-Reply-To: <0506A35B-3E3C-47D9-898F-2C61C89F4898@waschbuesch.de> References: <0506A35B-3E3C-47D9-898F-2C61C89F4898@waschbuesch.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--==========DCDB310F3CC08ED4F32C========== Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline +--On 13 ao=C3=BBt 2016 10:34:27 +0200 Martin Waschb=C3=BCsch <martin@waschbuesch.de> wrote: | Hi all, |=20 | I am in the process of creating a port for a module / plugin for | net-mgmt/zabbix-agent. |=20 | I tried to follow the Porter's Handbook, but still have three items I am | uncertain about: |=20 | 1) The plugin (obviously) relies on the zabbix-agent sources. | I added |=20 | BUILD_DEPENDS=3D ${NONEXISTENT}:net-mgmt/zabbix3-agent:extract |=20 | to make sure that the sources will always be extracted. You should use :patch, so that the sources are properly patched for = FreeBSD. | Now, how do I | properly reference these sources in my port? What I have right now (just | to make it compile) is this: |=20 | CONFIGURE_ARGS=3D | --with-zabbix=3D${PORTSDIR}/net-mgmt/zabbix3-agent/work/zabbix-3.0.2 |=20 | Obviously, I'd want to somehow get that path without having to specify | the version number as I want to build against the version currently | available in ports. How do I do that? Is there any reference to something | like this in the handbook? That doesn't work because: 1) the base directory of a workdir is changeable with WRKDIRPREFIX 2) If zabbix gets updated, it breaks. you have to use something like: ZABBIX_WRKSRC!=3D cd ${.CURDIR:H:H}/net-mgmt/zabbix3-agent && make -V = WRKSRC | 2) Imagine this module could be compiled against both, zabbix2-agent and | zabbix3-agent. I guess the cleanest way to support this would be having | one port per zabbix-version? If that is the case, should the whole thing | perhaps be a slave port belonging to zabbix{2,3}-agent? |=20 | 3) I found that I cannot (as a normal user) successfully run 'make | package'. I get an error like this: | mkdir: /usr/ports/net-mgmt/foobar/work: Permission denied | Before I add 'NEED_ROOT=3Dyes' to the Makefile, are there requirements = for | a normal user to build ports? e.g. does said user have to be in a certain | group, etc.? I mean, every port will have to create a workdir, and I | cannot imagine every port as having 'NEED_ROOT=3Dyes' in their = Makefile... | ;-) Well, your user needs to be able to write, so, either checkout a ports tree in your home directory, and set PORTSDIR accordingly, or chown -R /usr/ports to your user, or set WRKDIRPREFIX to somewhere your user can write, for example /tmp. --=20 Mathieu Arnold --==========DCDB310F3CC08ED4F32C========== Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQJ8BAEBCgBmBQJXsIIVXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQzQUI2OTc4OUQyRUQxMjEwNjQ0MEJBNUIz QTQ1MTZGMzUxODNDRTQ4AAoJEDpFFvNRg85Iq7MP/jwdkDzjPuAWhhxvC1ZtfdL1 v4DOa4QWQGYzQyZHe7bxdwJtAZPV2D4b7rCgmcuPORnxy+jdrYLcGRj53i9heXX3 Cm/0wbz7YjmXNXpcORPpc2vH4NYx6AP0FtW5MgSlfxuXnofSLncljmnHDptE6JU6 04mpAgfSSDoplP0JRurU7JDNxiUuzvi4T5mlL30kfVCxZ3egxyCcwXVaPYdgtSdA GjZILe/s1nsyfqlznEsABMRk65mQM0SMLhK/1iLTFXFVcfVaAlF5LmBzL2FiqXAS U5VjZudrIY9qC6ewUSjEe8G26H+Xs5nc39qX49fEcqUfIBhNA2FCfJFa2UcWprck WCHKa2HOXHaW8tGTXF25fmV8mHK1EYniY5a89XjqxI1uRVWqva9PL4II131Th79Q Wu7c8Am+4wTerHHaYSwgH6VwEMUOVZI6V+bSNcOHJfHU5M8Zbws9r+e05vTkQJAX ZnTwKXuouOF1nvh4oU+ou0eCc4rbpcgPpm4uay4dUZ5r47/HPALDgjs2ukDs723D GeBCNbrhQO1R2mfWW54SCEezFBLgA4GY3QtSCu4Fx5Yq5b+ojg2lTozku3upnu5T NdpWct2VeF4HDT/JuX/Cm12wu/PbaSBmXpqRzMjyvTFC7DuBSjexmrF6g/o+Ii3l vwlkaS3b4KsNdn2L1wZH =0bnp -----END PGP SIGNATURE----- --==========DCDB310F3CC08ED4F32C==========--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?466E8D27808DEDCCA467EE3A>