work commit

This commit is contained in:
ziggi
2020-07-22 08:06:34 +00:00
parent 33683250b8
commit adf7c51a96
88 changed files with 5075 additions and 0 deletions

View File

@@ -0,0 +1,57 @@
# Created by: Kristaps Kulis <kristaps.kulis@gmail.com>
# $FreeBSD: head/www/py-gunicorn/Makefile 498530 2019-04-10 06:18:31Z antoine $
PORTNAME= gunicorn
PORTVERSION= 19.9.0
CATEGORIES= www python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= koobs@FreeBSD.org
COMMENT= WSGI HTTP Server for UNIX
#TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}
#OPTIONS_DEFINE= PROCTITLE
#OPTIONS_DEFAULT= PROCTITLE
#OPTIONS_GROUP= WORKERS
#OPTIONS_GROUP_WORKERS= EVENTLET GAIOHTTP GEVENT TORNADO
#EVENTLET_DESC= Eventlet async worker
#GAIOHTTP_DESC= gaiohttp async worker (Requires Python 3.3+)
#GEVENT_DESC= Gevent async worker (Requires Python < 3.x)
#PROCTITLE_DESC= Custom process titles with setproctitle(3)
#TORNADO_DESC= Tornado async worker
#EVENTLET_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}eventlet>=0.9.7:net/py-eventlet@${PY_FLAVOR}
#GAIOHTTP_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiohttp>0:www/py-aiohttp@${PY_FLAVOR}
#GEVENT_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gevent>=0.12.2:devel/py-gevent@${PY_FLAVOR}
#PROCTITLE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setproctitle>0:devel/py-setproctitle@${PY_FLAVOR}
#TORNADO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}tornado>=2.2:www/py-tornado@${PY_FLAVOR}
USES= python
USE_GITHUB= yes
USE_PYTHON= autoplist concurrent distutils
GH_ACCOUNT= benoitc
NO_ARCH= yes
.include <bsd.port.pre.mk>
#.if ${PYTHON_REL} < 3300
#.if ${PORT_OPTIONS:MGAIOHTTP}
#BROKEN= GAIOHTTP requires Python 3.3+ but this port is building with Python ${PYTHON_VER}. \
# Disable the GAIOHTTP option or change the version of Python to build with, using DEFAULT_VERSIONS
#.endif
#TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR}
#.endif
#.if ${PYTHON_REL} > 3000 && ${PORT_OPTIONS:MGEVENT}
#BROKEN= GEVENT requires Python < 3.x but this port is building with Python ${PYTHON_VER}. \
# Disable the GEVENT option of change the version of Python to build with, using DEFAULT_VERSIONS
#.endif
#do-test:
# @cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
.include <bsd.port.post.mk>

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1551828009
SHA256 (benoitc-gunicorn-19.9.0_GH0.tar.gz) = d593aa13812eadc1f5cffe4a81ccdcbcb25528e5418af1b5138e88fd8c0c2a31
SIZE (benoitc-gunicorn-19.9.0_GH0.tar.gz) = 401755

View File

@@ -0,0 +1,6 @@
Gunicorn 'Green Unicorn' is a Python WSGI HTTP Server for UNIX.
It's a pre-fork worker model ported from Ruby's Unicorn project.
The Gunicorn server is broadly compatible with various web frameworks,
simply implemented, light on server resource usage, and fairly speedy.
WWW: https://gunicorn.org/

72
python/uwsgi/Makefile Normal file
View File

@@ -0,0 +1,72 @@
# Created by: Daniel Gerzo <danger@FreeBSD.org>
# $FreeBSD: head/www/uwsgi/Makefile 518934 2019-12-03 11:48:45Z amdmi3 $
PORTNAME= uwsgi
PORTVERSION= 2.0.18
CATEGORIES= www python
MASTER_SITES= http://projects.unbit.it/downloads/
MAINTAINER= eugene@zhegan.in
COMMENT= Developer-friendly WSGI server which uses uwsgi protocol
USES= pkgconfig python
USE_PYTHON= distutils concurrent optsuffix
USE_RC_SUBR= uwsgi
MAKE_ENV+= CPUCOUNT=${MAKE_JOBS_NUMBER} UWSGI_EMBED_PLUGINS=cgi
PYSETUP= uwsgiconfig.py
PYDISTUTILS_BUILD_TARGET= --build
PYDISTUTILS_BUILDARGS= --verbose
#USERS= uwsgi
#GROUPS= uwsgi
PLIST_FILES= bin/uwsgi ${PYTHON_SITELIBDIR}/uwsgidecorators.py
SUB_LIST= PYTHON_VER=${PYTHON_VER}
#OPTIONS_DEFINE= DEBUG JSON PCRE XML SSL
#OPTIONS_DEFAULT= SSL
#
#OPTIONS_GROUP= PLG
#OPTIONS_GROUP_PLG= PSGI
#
#PLG_DESC= Enable plugins
#PSGI_DESC= PSGI embedded plugin
#
#DEBUG_VARS= PYDISTUTILS_BUILDARGS+=--debug
#
#JSON_VARS= BUILDCONF_JSON=jansson
#JSON_LIB_DEPENDS= libjansson.so:devel/jansson
#
#PCRE_VARS= BUILDCONF_PCRE=true
#PCRE_LIB_DEPENDS= libpcre.so:devel/pcre
#
#PSGI_USES= perl5
#
#XML_VARS= BUILDCONF_XML=libxml2
#XML_LIB_DEPENDS= libxml2.so:textproc/libxml2
#SSL_VARS= BUILDCONF_SSL=true
#SSL_USES= ssl
#SSL_CFLAGS= -I${OPENSSLINC}
#SSL_LDFLAGS= ${OPENSSL_LDFLAGS}
post-patch:
.for var in JSON PCRE XML SSL
${REINPLACE_CMD} -e '/^${var:tl} =/ s|= .*|= ${BUILDCONF_${var}:Ufalse}|' ${WRKSRC}/buildconf/base.ini
.endfor
#post-patch-PSGI-on:
# @${REINPLACE_CMD} -e 's/%(main_plugin)s,/%(main_plugin)s, psgi,/' ${WRKSRC}/buildconf/base.ini
do-configure:
${DO_NADA}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/
@${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
${INSTALL_DATA} ${WRKSRC}/uwsgidecorators.py ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
.include <bsd.port.mk>

3
python/uwsgi/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1573864256
SHA256 (uwsgi-2.0.18.tar.gz) = 4972ac538800fb2d421027f49b4a1869b66048839507ccf0aa2fda792d99f583
SIZE (uwsgi-2.0.18.tar.gz) = 801555

159
python/uwsgi/files/uwsgi.in Normal file
View File

@@ -0,0 +1,159 @@
#!/bin/sh
#
# $FreeBSD: head/www/uwsgi/files/uwsgi.in 473044 2018-06-22 14:59:33Z swills $
#
# PROVIDE: uwsgi
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable uwsgi:
#
# uwsgi_enable (bool): Set it to "YES" to enable uwsgi
# Default is "NO".
# uwsgi_socket (path/str): Set the path to the uwsgi unix socket
# Default is /tmp/uwsgi.sock.
# uwsgi_socket_mode (int): Set the mode of the socket.
# Default is 660.
# uwsgi_socket_owner (str): Set the owner of the socket.
# Default is uwsgi:www.
# uwsgi_emperor (bool): Set it to "YES" to run uwsgi in emperor mode
# Default is "NO".
# uwsgi_configfile (path): Set the path to the config file
# Default is %%PREFIX%%/etc/uwsgi/uwsgi.ini.
# uwsgi_vassals_dir (path): Set the path to the vassals directory
# Default is %%PREFIX%%/etc/uwsgi/vassals.
# uwsgi_logfile (path): Set the path to the uwsgi log file
# Default is /var/log/uwsgi.log.
# uwsgi_pidfile (path): Set the path to the uwsgi pid file
# Default is /var/run/uwsgi.pid.
# uwsgi_uid (int): Set the UID of the process to run with
# Default is uwsgi.
# uwsgi_gid (int): Set the GID of the process to run with
# Default is uwsgi.
# uwsgi_flags (str): Set the uwsgi command line arguments
# Default is "-L".
# uwsgi_procname (str): Define to "uWSGI" if you start uwsgi with
# --auto-procname option.
#
# If you would like to have multiple uWSGI instances running, you can
# define multiple profiles:
#
# uwsgi_profiles (str): Set the list of uwsgi profiles
# Default is "".
#
# For each profile you can then define different options (except for
# uwsgi_enable) using the syntax uwsgi_<profile>_<option>
. /etc/rc.subr
name="uwsgi"
rcvar=uwsgi_enable
load_rc_config $name
command=%%PREFIX%%/bin/uwsgi-%%PYTHON_VER%%
: ${uwsgi_enable="NO"}
: ${uwsgi_socket="/tmp/${name}.sock"}
: ${uwsgi_socket_mode="660"}
: ${uwsgi_socket_owner="uwsgi:www"}
: ${uwsgi_configfile="%%PREFIX%%/etc/uwsgi/uwsgi.ini"}
: ${uwsgi_profiles=""}
: ${uwsgi_logfile="/var/log/${name}.log"}
: ${uwsgi_pidfile="/var/run/${name}.pid"}
: ${uwsgi_uid="uwsgi"}
: ${uwsgi_gid="uwsgi"}
: ${uwsgi_flags="-L"}
: ${uwsgi_emperor="NO"}
: ${uwsgi_vassals_dir="%%PREFIX%%/etc/uwsgi/vassals"}
is_uwsgi_profile() {
local profile
for profile in $uwsgi_profiles; do
if [ "$profile" = "$1" ]; then
return 0
fi
done
return 1
}
if [ -n "${uwsgi_profiles}" ]; then
if [ -n "$2" ]; then
profile="$2"
if ! is_uwsgi_profile $profile; then
echo "$0: no such profile defined in uwsgi_profiles."
exit 1
fi
eval uwsgi_socket=\${uwsgi_${profile}_socket:-"/tmp/${name}-${profile}.sock"}
eval uwsgi_socket_mode=\${uwsgi_${profile}_socket_mode:-${uwsgi_socket_mode}}
eval uwsgi_socket_owner=\${uwsgi_${profile}_socket_owner:-${uwsgi_socket_owner}}
eval uwsgi_logfile=\${uwsgi_${profile}_logfile:-"/var/log/${name}-${profile}.log"}
eval uwsgi_pidfile=\${uwsgi_${profile}_pidfile:-"/var/run/${name}-${profile}.pid"}
eval uwsgi_uid=\${uwsgi_${profile}_uid:-"${uwsgi_uid}"}
eval uwsgi_gid=\${uwsgi_${profile}_gid:-"${uwsgi_gid}"}
eval uwsgi_flags=\${uwsgi_${profile}_flags:-"${uwsgi_flags}"}
eval uwsgi_procname=\${uwsgi_${profile}_procname:-"${uwsgi_procname}"}
eval uwsgi_emperor=\${uwsgi_${profile}_emperor:-"${uwsgi_emperor}"}
eval uwsgi_vassals_dir=\${uwsgi_${profile}_vassals_dir:-"${uwsgi_vassals_dir}"}
eval uwsgi_configfile=\${uwsgi_${profile}_configfile:-"${uwsgi_configfile}"}
elif [ -n "$1" ]; then
for profile in ${uwsgi_profiles}; do
echo "Processing ${name} profile: ${profile}"
%%PREFIX%%/etc/rc.d/uwsgi $1 ${profile}
done
exit 0
fi
fi
pidfile=${uwsgi_pidfile}
start_precmd=start_precmd
stop_postcmd=stop_postcmd
reload_precmd=reload_precmd
brutalreload_cmd=brutalreload_cmd
sig_stop="INT"
extra_commands="reload brutalreload"
procname=${uwsgi_procname}
start_precmd()
{
rc_flags=""
if [ -e ${uwsgi_configfile} ]; then
rc_flags="--ini ${uwsgi_configfile} "
fi
if checkyesno uwsgi_emperor; then
echo "Running uWSGI as Emperor. Vassals loaded from "$uwsgi_vassals_dir
required_dirs=${uwsgi_vassals_dir}
rc_flags=${rc_flags}"--emperor-pidfile ${uwsgi_pidfile} -d ${uwsgi_logfile} --emperor ${uwsgi_vassals_dir}"
rc_flags=${rc_flags}" --vassals-set uid=${uwsgi_uid} --vassals-set gid=${uwsgi_gid}"
rc_flags=${rc_flags}" --vassals-set chmod-socket=${uwsgi_socket_mode} --vassals-set chown-socket=${uwsgi_socket_owner}"
else
rc_flags=${rc_flags}"--master --uid ${uwsgi_uid} --gid ${uwsgi_gid} --pidfile ${uwsgi_pidfile} -d ${uwsgi_logfile}"
rc_flags=${rc_flags}" -s ${uwsgi_socket} --chmod-socket=${uwsgi_socket_mode} --chown-socket=${uwsgi_socket_owner}"
fi
rc_flags=${rc_flags}" ${uwsgi_flags}"
}
stop_postcmd()
{
rm -f ${uwsgi_pidfile} ${uwsgi_socket}
}
reload_precmd()
{
echo "Gracefully reloading ${name} without closing the main sockets."
}
brutalreload_cmd()
{
echo "Reloading ${name} without closing the main sockets."
reload_precmd=""
sig_reload="TERM"
run_rc_command ${rc_prefix}reload $rc_extra_args || return 1
}
run_rc_command "$1"

7
python/uwsgi/pkg-descr Normal file
View File

@@ -0,0 +1,7 @@
uWSGI is a fast (pure C), self-healing, developer-friendly WSGI server,
aimed for professional python webapps deployment and development. Over
time it has evolved in a complete stack for networked/clustered python
applications, implementing message/object passing, RPC and process
management.
WWW: http://projects.unbit.it/uwsgi/