flavors and rc scripts
Hi, I'm trying to build a python package that uses flavors to allow parallel installation for different python versions. So far building an installing works fine till the start script comes in the picture. The port should install a start script for each of the flavors installed, but USE_RC_SUBR installs the rc.script under the name given and don't add the prefix or suffix. When i use USE_RC_SUBR=${PYTHON_PKGNAMEPREFIX}scriptname i have to add a start script for every flavor. Is there a way to gent USE_RC_SUBR to add the prefix or suffix. Regards Estartu ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: flavors and rc scripts
On 3/04/2018 5:26 pm, Gerhard Schmidt wrote: > Hi, > > I'm trying to build a python package that uses flavors to allow parallel > installation for different python versions. > > So far building an installing works fine till the start script comes in > the picture. > > The port should install a start script for each of the flavors > installed, but USE_RC_SUBR installs the rc.script under the name given > and don't add the prefix or suffix. When i use > USE_RC_SUBR=${PYTHON_PKGNAMEPREFIX}scriptname i have to add a start > script for every flavor. > > Is there a way to gent USE_RC_SUBR to add the prefix or suffix. > Hi Gerhard, Good question. USES=uniquefiles (or the same thing via USE_PYTHON=concurrent) *may* be able to help you here, though I haven't seen it attempted (yet) for rc scripts specifically. For example, USE_PYTHON='concurrent' is a specific instantiation/use of Uses/uniquefiles.mk, which creates version-specific copies of files, with default filenames (optionally) symlinked to the version-suffixed counterparts, for a certain set of files (script in localbase/bin, man pages etc) in python ports. You may either be able to: a) 'extend' the list of files python.mk already looks for, for prefixing/suffixing the rc script, or b) use uniquefiles.mk variables directly in the port Hope that helps. ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: flavors and rc scripts
Am 03.04.2018 um 11:02 schrieb Kubilay Kocak: > On 3/04/2018 5:26 pm, Gerhard Schmidt wrote: >> Hi, >> >> I'm trying to build a python package that uses flavors to allow parallel >> installation for different python versions. >> >> So far building an installing works fine till the start script comes in >> the picture. >> >> The port should install a start script for each of the flavors >> installed, but USE_RC_SUBR installs the rc.script under the name given >> and don't add the prefix or suffix. When i use >> USE_RC_SUBR=${PYTHON_PKGNAMEPREFIX}scriptname i have to add a start >> script for every flavor. >> >> Is there a way to gent USE_RC_SUBR to add the prefix or suffix. >> > > Hi Gerhard, > > Good question. > > USES=uniquefiles (or the same thing via USE_PYTHON=concurrent) *may* be > able to help you here, though I haven't seen it attempted (yet) for rc > scripts specifically. Concurrent is active but does nothing for the rc script. I've done it by hand, by adding the file su SUB_FILES and add the suffix when installing the rc file. Working so far but seams to be less desirable. Regards Estartu ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: flavors and rc scripts
On Tue, Apr 03, 2018 at 09:26:51AM +0200, Gerhard Schmidt wrote: > Hi, > > I'm trying to build a python package that uses flavors to allow parallel > installation for different python versions. > > So far building an installing works fine till the start script comes in > the picture. > > The port should install a start script for each of the flavors > installed, but USE_RC_SUBR installs the rc.script under the name given > and don't add the prefix or suffix. When i use > USE_RC_SUBR=${PYTHON_PKGNAMEPREFIX}scriptname i have to add a start > script for every flavor. > > Is there a way to gent USE_RC_SUBR to add the prefix or suffix. I am not sure I understand exacly what you want to achieve by installing different flavors of the same daemon. Would you want it to run multiple times? What happens with the rc variables? Are all the flavors managed using the same variables, and then, all the daemons run concurrently? Are they supposed to be named something like this for the default flavor: scriptname_arguments scriptname_pidfile and like this for a non default flavor: scriptname_py36_arguments scriptname_py36_pidfile -- Mathieu Arnold signature.asc Description: PGP signature
Re: flavors and rc scripts
Am 03.04.2018 um 13:57 schrieb Mathieu Arnold: > On Tue, Apr 03, 2018 at 09:26:51AM +0200, Gerhard Schmidt wrote: >> Hi, >> >> I'm trying to build a python package that uses flavors to allow parallel >> installation for different python versions. >> >> So far building an installing works fine till the start script comes in >> the picture. >> >> The port should install a start script for each of the flavors >> installed, but USE_RC_SUBR installs the rc.script under the name given >> and don't add the prefix or suffix. When i use >> USE_RC_SUBR=${PYTHON_PKGNAMEPREFIX}scriptname i have to add a start >> script for every flavor. >> >> Is there a way to gent USE_RC_SUBR to add the prefix or suffix. > > I am not sure I understand exacly what you want to achieve by installing > different flavors of the same daemon. > > Would you want it to run multiple times? > > What happens with the rc variables? > > Are all the flavors managed using the same variables, and then, all the > daemons run concurrently? > > Are they supposed to be named something like this for the default > flavor: > > scriptname_arguments > scriptname_pidfile > > and like this for a non default flavor: > > scriptname_py36_arguments > scriptname_py36_pidfile Yes. There should be running multiple daemons with different python versions. And the rc script itself can start multiple daemons with different profiles. the variables start all with __... but the rc_scripts are all generated from the same template using SUB_FILE and SUB_LIST to generate the flavor specific version. There could be another way to do this by installing one rc file for all flavors. But I don't know how to do this either. The first flavor installed would install the rc and the last flavor to be removed would need to remove it. So the approach above seams the more reasonable one. Regards Estartu ___ freebsd-ports@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
Re: flavors and rc scripts
On Tue, Apr 03, 2018 at 03:01:45PM +0200, Gerhard Schmidt wrote: > Am 03.04.2018 um 13:57 schrieb Mathieu Arnold: > > On Tue, Apr 03, 2018 at 09:26:51AM +0200, Gerhard Schmidt wrote: > >> Hi, > >> > >> I'm trying to build a python package that uses flavors to allow parallel > >> installation for different python versions. > >> > >> So far building an installing works fine till the start script comes in > >> the picture. > >> > >> The port should install a start script for each of the flavors > >> installed, but USE_RC_SUBR installs the rc.script under the name given > >> and don't add the prefix or suffix. When i use > >> USE_RC_SUBR=${PYTHON_PKGNAMEPREFIX}scriptname i have to add a start > >> script for every flavor. > >> > >> Is there a way to gent USE_RC_SUBR to add the prefix or suffix. > > > > I am not sure I understand exacly what you want to achieve by installing > > different flavors of the same daemon. > > > > Would you want it to run multiple times? > > > > What happens with the rc variables? > > > > Are all the flavors managed using the same variables, and then, all the > > daemons run concurrently? > > > > Are they supposed to be named something like this for the default > > flavor: > > > > scriptname_arguments > > scriptname_pidfile > > > > and like this for a non default flavor: > > > > scriptname_py36_arguments > > scriptname_py36_pidfile > > Yes. There should be running multiple daemons with different python > versions. And the rc script itself can start multiple daemons with > different profiles. > > the variables start all with __... but the > rc_scripts are all generated from the same template using SUB_FILE and > SUB_LIST to generate the flavor specific version. > > There could be another way to do this by installing one rc file for all > flavors. But I don't know how to do this either. The first flavor > installed would install the rc and the last flavor to be removed would > need to remove it. So the approach above seams the more reasonable one. Well, rc.subr has no support for multiple flavors, or what is more generically called profiles, so this is something that the one flavorized port that needs to be installed concurrently and that has a rc file would have to do itself. It should probably not use USE_RC_SUBR, but do manually the two things it does, something along the lines of: SUB_FILES= rcfilename post-install: ${INSTALL_SCRIPT} ${WRKDIR}/rcfilename \ ${STAGEDIR}${PREFIX}/etc/rc.d/unique-rcfilename Add the unique-rcfilename to the plist. You will probably need to add some placeholders to SUB_LIST to uniquify the variables. This all looks like way more work than it may be worth. -- Mathieu Arnold signature.asc Description: PGP signature