Date: Mon, 27 Apr 2015 02:57:08 +0000 (UTC) From: Adam Weinberger <adamw@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r384811 - in head/www: . p5-Mojolicious-Plugin-SetUserGroup Message-ID: <201504270257.t3R2v8FX038403@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adamw Date: Mon Apr 27 02:57:08 2015 New Revision: 384811 URL: https://svnweb.freebsd.org/changeset/ports/384811 Log: Add www/p5-Mojolicious-Plugin-SetUserGroup, a plugin to set the user and group as which the Mojolicious daemon runs. Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/ head/www/p5-Mojolicious-Plugin-SetUserGroup/Makefile (contents, props changed) head/www/p5-Mojolicious-Plugin-SetUserGroup/distinfo (contents, props changed) head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr (contents, props changed) head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist (contents, props changed) Modified: head/www/Makefile Modified: head/www/Makefile ============================================================================== --- head/www/Makefile Mon Apr 27 02:48:28 2015 (r384810) +++ head/www/Makefile Mon Apr 27 02:57:08 2015 (r384811) @@ -1056,6 +1056,7 @@ SUBDIR += p5-Mojolicious-Plugin-Authentication SUBDIR += p5-Mojolicious-Plugin-Database SUBDIR += p5-Mojolicious-Plugin-Mongodb + SUBDIR += p5-Mojolicious-Plugin-SetUserGroup SUBDIR += p5-Mojolicious-Plugin-TtRenderer SUBDIR += p5-Mojolicious-Plugin-YamlConfig SUBDIR += p5-Monoceros Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Mojolicious-Plugin-SetUserGroup/Makefile Mon Apr 27 02:57:08 2015 (r384811) @@ -0,0 +1,30 @@ +# Created by: Adam Weinberger <adamw@FreeBSD.org> +# $FreeBSD$ + +PORTNAME= Mojolicious-Plugin-SetUserGroup +PORTVERSION= 0.001 +CATEGORIES= www perl5 +MASTER_SITES= CPAN +MASTER_SITE_SUBDIR= CPAN:DBOOK +PKGNAMEPREFIX= p5- + +MAINTAINER= perl@FreeBSD.org +COMMENT= Mojolicious plugin to set unprivileged credentials + +LICENSE= ART20 + +BUILD_DEPENDS= p5-Mojolicious>=6.0:${PORTSDIR}/www/p5-Mojolicious \ + p5-Unix-Groups>=0:${PORTSDIR}/devel/p5-Unix-Groups +RUN_DEPENDS:= ${BUILD_DEPENDS} + +USES= perl5 +USE_PERL5= configure + +.include <bsd.port.pre.mk> + +.if ${PERL_LEVEL} < 501905 +BUILD_DEPENDS+= p5-Scalar-List-Utils>=1.33:${PORTSDIR}/lang/p5-Scalar-List-Utils +RUN_DEPENDS+= p5-Scalar-List-Utils>=1.33:${PORTSDIR}/lang/p5-Scalar-List-Utils +.endif + +.include <bsd.port.post.mk> Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Mojolicious-Plugin-SetUserGroup/distinfo Mon Apr 27 02:57:08 2015 (r384811) @@ -0,0 +1,2 @@ +SHA256 (Mojolicious-Plugin-SetUserGroup-0.001.tar.gz) = 62ba9db779b44cfae3672898d866ece1e55ecd6bd644d6f5453f6099e2e7945f +SIZE (Mojolicious-Plugin-SetUserGroup-0.001.tar.gz) = 8070 Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-descr Mon Apr 27 02:57:08 2015 (r384811) @@ -0,0 +1,12 @@ +This plugin is intended to replace the setuidgid functionality of Mojo::Server. +It should be loaded in application startup and it will change the user and +group credentials of the process when Mojo::IOLoop is started, which occurs in +each worker process of a Mojo::Server::Prefork daemon like hypnotoad. + +This allows an application to be started as root so it can bind to privileged +ports such as port 80 or 443, but run worker processes as unprivileged users. +However, if the application is not started as root, it will most likely fail to +change credentials. So, you should only set the user/group when the application +is started as root. + +https://metacpan.org/pod/Mojolicious::Plugin::SetUserGroup Added: head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/p5-Mojolicious-Plugin-SetUserGroup/pkg-plist Mon Apr 27 02:57:08 2015 (r384811) @@ -0,0 +1,2 @@ +%%SITE_PERL%%/Mojolicious/Plugin/SetUserGroup.pm +%%PERL5_MAN3%%/Mojolicious::Plugin::SetUserGroup.3.gz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504270257.t3R2v8FX038403>