From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SME1a-0001tE-J6 for garchives@archives.gentoo.org; Mon, 23 Apr 2012 07:49:34 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1C04FE0C0D; Mon, 23 Apr 2012 07:49:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id B9FF9E0C01 for ; Mon, 23 Apr 2012 07:49:17 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 46FAE1B4115 for ; Mon, 23 Apr 2012 07:49:11 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 0851EE5402 for ; Mon, 23 Apr 2012 07:49:10 +0000 (UTC) From: "Tiziano Müller" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Tiziano Müller" Message-ID: <1335162987.1629c0e0f4bc9d7a84ce00760498b4dc74b7cf62.dev-zero@gentoo> Subject: [gentoo-commits] dev/dev-zero:master commit in: www-servers/uwsgi/files/, www-servers/uwsgi/ X-VCS-Repository: dev/dev-zero X-VCS-Files: www-servers/uwsgi/Manifest www-servers/uwsgi/files/1.1.2-threaded-php.patch www-servers/uwsgi/files/uwsgi.confd www-servers/uwsgi/files/uwsgi.initd www-servers/uwsgi/uwsgi-0.9.8.6.ebuild www-servers/uwsgi/uwsgi-1.0.4.ebuild www-servers/uwsgi/uwsgi-1.1.2.ebuild X-VCS-Directories: www-servers/uwsgi/files/ www-servers/uwsgi/ X-VCS-Committer: dev-zero X-VCS-Committer-Name: Tiziano Müller X-VCS-Revision: 1629c0e0f4bc9d7a84ce00760498b4dc74b7cf62 X-VCS-Branch: master Date: Mon, 23 Apr 2012 07:49:10 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 5dd4084e-814f-4ef2-9ccf-0f492dcb23fc X-Archives-Hash: 990fae37ab4b466e4ee41f823afff314 commit: 1629c0e0f4bc9d7a84ce00760498b4dc74b7cf62 Author: Tiziano M=C3=BCller dev-zero ch> AuthorDate: Mon Apr 23 06:30:04 2012 +0000 Commit: Tiziano M=C3=BCller gentoo org> CommitDate: Mon Apr 23 06:36:27 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/dev-zero.git;a= =3Dcommit;h=3D1629c0e0 Pulled updates from Ultrabug. Build more plugins and add PHP support. --- www-servers/uwsgi/Manifest | 11 +- www-servers/uwsgi/files/1.1.2-threaded-php.patch | 40 +++++ www-servers/uwsgi/files/uwsgi.confd | 34 ++-- www-servers/uwsgi/files/uwsgi.initd | 118 ++++++++----- www-servers/uwsgi/uwsgi-0.9.8.6.ebuild | 186 --------------= ------ .../{uwsgi-1.0.4.ebuild =3D> uwsgi-1.1.2.ebuild} | 65 ++++++-- 6 files changed, 194 insertions(+), 260 deletions(-) diff --git a/www-servers/uwsgi/Manifest b/www-servers/uwsgi/Manifest index afa2c38..40b070f 100644 --- a/www-servers/uwsgi/Manifest +++ b/www-servers/uwsgi/Manifest @@ -1,10 +1,9 @@ +AUX 1.1.2-threaded-php.patch 1098 RMD160 df45f3951fe9b75e2fbde10e5bcf8fa= 42f42c7eb SHA1 de05ded4b9a82392bb662a2cf2a05e8741fce641 SHA256 e5f03fcdf2= ebf7d2867b21e640f2c44f23da169108b2ea964e96fea44152d49b AUX 42_mod_uwsgi.conf 159 RMD160 d3de5b69a9e292c731508b13a0bdbe234fac9db= 7 SHA1 24624a805c16778aaa4e24b74d2e8230ee381aec SHA256 b759712baa7b8abab2= ffd56c3cbc970cb9189ef1efa3f3aa154a963dc67ba861 -AUX uwsgi.confd 1247 RMD160 f3cbb0ed1e83385e917949b7df1b8953792b9464 SHA= 1 2cba8d1990f0138f7bea113fec924b1656d53a8c SHA256 26c52f22137ffd44ef4c094= ce9cf3b55f1c418f1602e0451462103a5117174a4 -AUX uwsgi.initd 2386 RMD160 a799175f2b94eb96dc19ff9b8b4d5c18a52cbd38 SHA= 1 ffa1870c2e14871764447bc97e6d7b9f24364a28 SHA256 d523238595e83b7f82001de= a41ffa3298836fd0027859ed3e1bf4f84d75e1370 -DIST uwsgi-0.9.8.6.tar.gz 359620 RMD160 78b92fe3a9b272ca5a2704b0db7d1956= b9149a0b SHA1 bb835c3c14310640b24ebdbcf0aa91e8ce8bd5a6 SHA256 14379c00550= 63dbfbc4ce9ba10dfd6eec827286a462300d98947174d9694d981 -DIST uwsgi-1.0.4.tar.gz 465762 RMD160 afc67a752fb0055cb87769219a60b9e8f0= 9acfcc SHA1 ba2e249e962acbdc9a3e7c3c86b2ceb9019503f6 SHA256 3267c48fdfce4= 1766a237eb696eaaa6ee8d90672b483dbfc746663ddc8383b8d -EBUILD uwsgi-0.9.8.6.ebuild 4304 RMD160 ce533908cedae761db93ae26b811ae09= e12847fc SHA1 29710c3c36fe5cffb34c180f9c6a48d7ace001e5 SHA256 5bf9203180b= fa41622cad1f8c414b0a00af7b901e70017784f7648be43316b28 -EBUILD uwsgi-1.0.4.ebuild 5303 RMD160 657947aa39bb28ce8f2e4d8229617474c8= 431f50 SHA1 3a54351ee06a32fbc3b79f272a9b24bfea2313d4 SHA256 6968941db8836= ddfb4bbcb1ba54c4f0f580bcc9f8ba0f52e149133c802465b5f +AUX uwsgi.confd 1436 RMD160 27556a66bcd8f55e50bbce61110fdcc0a7b78b22 SHA= 1 a054d3d71fe333edc3a13c441051592a0db552e0 SHA256 2d87d90f643948e6d7f2a49= 1196874d930122c37ff65949b089fdcba26916399 +AUX uwsgi.initd 3191 RMD160 dc665d3dc1325266c2fcee095503ae4e6b297980 SHA= 1 56396e9f7870a61e4084b524432972f349c09240 SHA256 4e2913b96e6fc8828787912= 6727ae627e32fd5b51076aa8155af73359f1c97ca +DIST uwsgi-1.1.2.tar.gz 497365 RMD160 4bb5f23db5b2ca0ae585dfde01dfc5bc1e= a823c2 SHA1 b48ec35fcdd19c1786257958e34089c021655ba9 SHA256 0fc96217f83fe= d8cfaa340db2d09adb938b43edb1a963df8ede87f8d87b06e76 +EBUILD uwsgi-1.1.2.ebuild 6524 RMD160 afb8c1a773f22e2c957148b82ddb47b14f= c2034a SHA1 5137ee230f82190623b3f10dec6e31f7f4b1d402 SHA256 09dc9f03b3e05= 8063765b9fbb6f93df29da596d91f8d2a86d9a40e1d977c89bb EBUILD uwsgi-9999.ebuild 5244 RMD160 d4e039a853ae5e78b7a969c6cd3c14b2047= a0caa SHA1 5463d445d460fa649cb1f90a2d16c170a0f7ddae SHA256 d0a9ddac405f57= 588009d4e6c87f08033cc405b60433aeb44b4f41bc153e99f4 MISC ChangeLog 533 RMD160 cef38aefe63bc7d5ad4a767bc34b7f57a1be9b5a SHA1 = 80e5cd4bd06fa22b86e439e7260064260df14d37 SHA256 418abb3d30490aae32336efcb= 4c27ee96af8a09f1f9bbfc629384efe8c2363a9 MISC metadata.xml 255 RMD160 07d553bdf9282f61c4e99ad3f7697a310946cf9d SH= A1 533ddafc8a18d2110ccdbec4c99c48abbcd6e633 SHA256 e3eef1b3ebe3eea3ba7465= 7f3a332c7427c1bd24a5609d2ff887f63901d9cd35 diff --git a/www-servers/uwsgi/files/1.1.2-threaded-php.patch b/www-serve= rs/uwsgi/files/1.1.2-threaded-php.patch new file mode 100644 index 0000000..ed75ad9 --- /dev/null +++ b/www-servers/uwsgi/files/1.1.2-threaded-php.patch @@ -0,0 +1,40 @@ +diff -r a6dd30e36bc0 plugins/php/php_plugin.c +--- a/plugins/php/php_plugin.c Fri Apr 20 16:27:00 2012 +0200 ++++ b/plugins/php/php_plugin.c Sun Apr 22 11:54:49 2012 +0200 +@@ -116,7 +116,7 @@ + } +=20 +=20 +-static int sapi_uwsgi_send_headers(sapi_headers_struct *sapi_headers) ++static int sapi_uwsgi_send_headers(sapi_headers_struct *sapi_headers TS= RMLS_DC) + { + sapi_header_struct *h; + zend_llist_position pos; +@@ -237,7 +237,7 @@ + } +=20 +=20 +-static char *sapi_uwsgi_read_cookies(void) ++static char *sapi_uwsgi_read_cookies(TSRMLS_D) + { + uint16_t len =3D 0; + struct wsgi_request *wsgi_req =3D (struct wsgi_request *) SG(server_co= ntext); +@@ -624,6 +624,10 @@ + struct uwsgi_string_list *pset =3D uphp.set; + struct uwsgi_string_list *append_config =3D uphp.append_config; +=20 ++#ifdef ZTS ++ tsrm_startup(1, 1, 0, NULL); ++#endif ++ + sapi_startup(&uwsgi_sapi_module); +=20 + // applying custom options +@@ -721,6 +725,7 @@ +=20 + zend_file_handle file_handle; +=20 ++ TSRMLS_FETCH(); // fetch the threading state in case PHP is built w= ith threading + SG(server_context) =3D (void *) wsgi_req; +=20 + if (uwsgi_parse_vars(wsgi_req)) { diff --git a/www-servers/uwsgi/files/uwsgi.confd b/www-servers/uwsgi/file= s/uwsgi.confd index e08f688..5d1fc5c 100644 --- a/www-servers/uwsgi/files/uwsgi.confd +++ b/www-servers/uwsgi/files/uwsgi.confd @@ -1,51 +1,53 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/www-servers/uwsgi/files/uwsgi.confd,v= 1.1 2011/05/31 19:49:07 maksbotan Exp $ =20 -# DO NOT MODIFY THIS FILE DIRECTLY! CREATE A COPY AND MODIFY THAT INSTEA= D! +# YOU SHOULD ONLY MODIFY THIS FILE IF YOU USE THE UWSGI EMPEROR MODE! +# IF YOU WANT TO RUN A SINGLE APP INSTANCE, CREATE A COPY AND MODIFY THA= T INSTEAD! =20 # Path (or name) of UNIX/TCP socket to bind to -# -#UWSGI_SOCKET=3D127.0.0.1:1234 +# Example : UWSGI_SOCKET=3D127.0.0.1:1234 +UWSGI_SOCKET=3D =20 -# Enable threads? +# Enable threads? (1 =3D yes, 0 =3D no). The default is 0 # -#UWSGI_THREADS=3D1 +UWSGI_THREADS=3D0 =20 # The path to your uWSGI application. # -#UWSGI_PROGRAM=3D +UWSGI_PROGRAM=3D =20 # The path to your uWSGI xml config file. # -#UWSGI_XML_CONFIG=3D +UWSGI_XML_CONFIG=3D =20 # The number of child processes to spawn. The default is 1. # -#UWSGI_CHILDREN=3D1 +UWSGI_PROCESSES=3D1 =20 -# The log file path. If empty logging is disabled +# The log file path. If empty, log only errors # -#UWSGI_LOG_FILE=3D +UWSGI_LOG_FILE=3D =20 # If you want to run your application inside a chroot then specify the # directory here. Leave this blank otherwise. # -#UWSGI_CHROOT=3D +UWSGI_CHROOT=3D =20 # If you want to run your application from a specific directiory specify # it here. Leave this blank otherwise. # -# UWSGI_DIR=3D +UWSGI_DIR=3D =20 # The user and group to run your application as. If you do not specify t= hese, # the application will be run as root:root. # -#UWSGI_USER=3D +UWSGI_USER=3D =20 -# Run the uwsgi emperor which loads vassals dynamically +# Run the uwsgi emperor which loads vassals dynamically from this PATH # see http://projects.unbit.it/uwsgi/wiki/Emperor -#UWSGI_EMPEROR=3D +# The advised Gentoo folder is /etc/uwsgi.d/ +UWSGI_EMPEROR_PATH=3D =20 # Additional options you might want to pass to uWSGI # -#UWSGI_EXTRA_OPTIONS=3D +UWSGI_EXTRA_OPTIONS=3D diff --git a/www-servers/uwsgi/files/uwsgi.initd b/www-servers/uwsgi/file= s/uwsgi.initd index bb3ba6d..5b6335a 100644 --- a/www-servers/uwsgi/files/uwsgi.initd +++ b/www-servers/uwsgi/files/uwsgi.initd @@ -9,37 +9,53 @@ UWSGI_EXEC=3D/usr/bin/uwsgi PIDPATH=3D/var/run/uwsgi PIDFILE=3D"${PIDPATH}/${PROGNAME}.pid" =20 -opts=3D"${opts} reload" +extra_started_commands=3D"${opts} reload stats" =20 depend() { need net } =20 -start() { - mkdir -p "/var/run/uwsgi" - +start_emperor() { local OPTIONS + OPTIONS=3D"--emperor ${UWSGI_EMPEROR_PATH} --daemonize" =20 - if [ "${SVCNAME}" =3D "uwsgi" ]; then - eerror "You are not supposed to run this script directly. Create a sym= link" - eerror "for the uwsgi application you want to run as well as a copy of= the" - eerror "configuration file and modify it appropriately like so..." - eerror - eerror " ln -s uwsgi /etc/init.d/uwsgi.trac" - eerror " cp /etc/conf.d/uwsgi /etc/conf.d/uwsgi.trac" - eerror " `basename "${EDITOR}"` /etc/conf.d/uwsgi.trac" - eerror - return 1 + if [ -n "${UWSGI_LOG_FILE}" ]; then + OPTIONS=3D"${OPTIONS} ${UWSGI_LOG_FILE}" + else + OPTIONS=3D"${OPTIONS} /dev/null --disable-logging" fi =20 - OPTIONS=3D"--daemonize" + [ -z "${UWSGI_DIR}" ] && UWSGI_DIR=3D"/" + [ -z "${UWSGI_USER}" ] && UWSGI_USER=3D"root" =20 - if [ -n "$UWSGI_LOG_FILE" ]; then - OPTIONS=3D"${OPTIONS} $UWSGI_LOG_FILE" + if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then + OPTIONS=3D"${OPTIONS} ${UWSGI_EXTRA_OPTIONS}" + fi + + ebegin "Starting uWSGI emperor" + cd "${UWSGI_DIR}" && \ + start-stop-daemon --start --user "${UWSGI_USER}" --exec "${UWSGI_EXEC}"= \ + -- ${OPTIONS} --pidfile "${PIDFILE}" + return $? +} + +start_app() { + local OPTIONS + OPTIONS=3D"--master --daemonize" + + if [ -n "${UWSGI_LOG_FILE}" ]; then + OPTIONS=3D"${OPTIONS} ${UWSGI_LOG_FILE}" else OPTIONS=3D"${OPTIONS} /dev/null --disable-logging" fi =20 + [ -z "${UWSGI_DIR}" ] && UWSGI_DIR=3D"/" + [ -z "${UWSGI_USER}" ] && UWSGI_USER=3D"root" + + if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then + OPTIONS=3D"${OPTIONS} ${UWSGI_EXTRA_OPTIONS}" + fi + if [ "${UWSGI_THREADS}" =3D "1" ]; then OPTIONS=3D"${OPTIONS} --enable-threads" fi @@ -48,49 +64,71 @@ start() { OPTIONS=3D"${OPTIONS} --socket ${UWSGI_SOCKET}" fi =20 - if [ -n "${UWSGI_CHILDREN}" ]; then - OPTIONS=3D"${OPTIONS} --processes ${UWSGI_CHILDREN}" + if [ -n "${UWSGI_PROCESSES}" ]; then + OPTIONS=3D"${OPTIONS} --processes ${UWSGI_PROCESSES}" fi =20 if [ -n "${UWSGI_CHROOT}" ]; then OPTIONS=3D"${OPTIONS} --chroot ${UWSGI_CHROOT}" fi =20 - [ -z "${UWSGI_DIR}" ] && UWSGI_DIR=3D"/" - [ -z "${UWSGI_USER}" ] && UWSGI_USER=3D"root" - - if [ -n "${UWSGI_EXTRA_OPTIONS}" ]; then - OPTIONS=3D"${OPTIONS} ${UWSGI_EXTRA_OPTIONS}" - fi - if [ -n "${UWSGI_PROGRAM}" ]; then - OPTIONS=3D"${OPTIONS} --wsgi-file ${UWSGI_PROGRAM}" + OPTIONS=3D"${OPTIONS} --file ${UWSGI_PROGRAM}" fi =20 if [ -n "${UWSGI_XML_CONFIG}" ]; then OPTIONS=3D"${OPTIONS} --xmlconfig ${UWSGI_XML_CONFIG}" fi =20 - if [ -n "${UWSGI_EMPEROR}" ] ; then - OPTIONS=3D"${OPTIONS} --emperor ${UWSGI_EMPEROR}" - else - OPTIONS=3D"${OPTIONS} --master" - fi - ebegin "Starting uWSGI application ${PROGNAME}" cd "${UWSGI_DIR}" && \ - start-stop-daemon --start --user "${UWSGI_USER}" --exec "${UWSGI_EXEC}"= -- ${OPTIONS} --pidfile "${PIDFILE}" - eend $? + start-stop-daemon --start --user "${UWSGI_USER}" --exec "${UWSGI_EXEC}"= \ + -- ${OPTIONS} --pidfile "${PIDFILE}" + return $? +} + +start() { + mkdir -p "${PIDPATH}" + + if [ "${SVCNAME}" =3D=3D "uwsgi" ]; then + if [ -n "${UWSGI_EMPEROR_PATH}" ]; then + start_emperor + eend $? + else + eerror "You are not supposed to run this script directly. Create a sy= mlink" + eerror "for the uwsgi application you want to run as well as a copy o= f the" + eerror "configuration file and modify it appropriately like so..." + eerror + eerror " ln -s uwsgi /etc/init.d/uwsgi.trac" + eerror " cp /etc/conf.d/uwsgi /etc/conf.d/uwsgi.trac" + eerror " `basename "${EDITOR}"` /etc/conf.d/uwsgi.trac" + eerror + return 1 + fi + else + start_app + eend $? + fi } =20 stop() { - ebegin "Stopping uWSGI application ${PROGNAME}" - start-stop-daemon --stop --pidfile "${PIDFILE}" --signal 3 + if [ -n "${UWSGI_EMPEROR_PATH}" ]; then + ebegin "Stopping uWSGI emperor" + else + ebegin "Stopping uWSGI application ${PROGNAME}" + fi + start-stop-daemon --stop --signal QUIT --pidfile "${PIDFILE}" eend $? } =20 reload() { - elog "Reloading uWSGI" - start-stop-daemon --signal HUP --pidfile "${PIDFILE}" - eend $? + ebegin "Reloading uWSGI" + start-stop-daemon --signal HUP --pidfile "${PIDFILE}" + eend $? +} + +stats() { + ebegin "Logging uWSGI statistics" + start-stop-daemon --signal USR1 --pidfile "${PIDFILE}" + eend $? } diff --git a/www-servers/uwsgi/uwsgi-0.9.8.6.ebuild b/www-servers/uwsgi/u= wsgi-0.9.8.6.ebuild deleted file mode 100644 index 04fd42a..0000000 --- a/www-servers/uwsgi/uwsgi-0.9.8.6.ebuild +++ /dev/null @@ -1,186 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -EAPI=3D"4" -PYTHON_DEPEND=3D"python? 2:2.4:2.7 3:3.1:3.2" -SUPPORT_PYTHON_ABIS=3D"1" - -inherit apache-module python multilib - -DESCRIPTION=3D"uWSGI server for Python web applications" -HOMEPAGE=3D"http://projects.unbit.it/uwsgi/" -SRC_URI=3D"http://projects.unbit.it/downloads/${P}.tar.gz" - -LICENSE=3D"GPL-2" -SLOT=3D"0" -KEYWORDS=3D"~amd64 ~x86" -IUSE=3D"apache2 debug json ldap lua +nagios +pcre perl python rrdtool sq= lite +xml yaml zeromq" - -CDEPEND=3D"json? ( dev-libs/jansson ) - ldap? ( net-nds/openldap ) - lua? ( dev-lang/lua ) - pcre? ( dev-libs/libpcre ) - perl? ( dev-lang/perl ) - sqlite? ( dev-db/sqlite:3 ) - xml? ( dev-libs/libxml2 ) - yaml? ( dev-libs/libyaml ) - zeromq? ( net-libs/zeromq )" -DEPEND=3D"${CDEPEND} - dev-util/pkgconfig" -RDEPEND=3D"${CDEPEND} - rrdtool? ( net-analyzer/rrdtool )" - -APXS2_S=3D"${S}/apache2" -APACHE2_MOD_CONF=3D"42_mod_${PN}" -want_apache2_2 - -use_true_false() { - if use $1 ; then - echo "true" - else - echo "false" - fi -} - -pkg_setup() { - depend.apache_pkg_setup - python_pkg_setup -} - -src_prepare() { - sed -i \ - -e "s|'-O2', ||" \ - -e "s|'-Werror', ||" \ - -e "s|uc.get('plugin_dir')|uc.get('plugin_build_dir')|" \ - uwsgiconfig.py || die "sed failed" - - sed -i \ - -e 's|python\([0-9].[0-9]\)-config|python-config-\1|' \ - plugins/python??/uwsgiplugin.py || die "sed failed" -} - -src_configure() { - local plugins=3D"" - use nagios && plugins+=3D", nagios" - use rrdtool && plugins+=3D", rrdtool" - - cat > "buildconf/gentoo.ini" << EOF -[uwsgi] -xml =3D $(use_true_false xml) -ini =3D true -yaml =3D $(use_true_false yaml) -json =3D $(use_true_false json) -sqlite3 =3D $(use_true_false sqlite) -zeromq =3D $(use_true_false zeromq) -snmp =3D true -sctp =3D false -spooler =3D true -embedded =3D true -udp =3D true -multicast =3D true -threading =3D true -sendfile =3D true -minterpreters =3D true -async =3D true -evdis =3D false -ldap =3D $(use_true_false ldap) -pcre =3D $(use_true_false pcre) -debug =3D $(use_true_false debug) -unbit =3D false -xml_implementation =3D libxml2 -yaml_implementation =3D libyaml -malloc_implementation =3D libc -plugins =3D -bin_name =3D uwsgi -append_version =3D -plugin_dir =3D /usr/$(get_libdir)/uwsgi -plugin_build_dir =3D ${T}/plugins -embedded_plugins =3D ping, cache, rpc, fastrouter, http, ugreen, ${plug= ins:1} -as_shared_library =3D false - -locking =3D auto -event =3D auto -timer =3D auto -filemonitor =3D auto - -embed_files =3D - -embed_config =3D - -[python] -paste =3D true -web3 =3D true - -EOF -} - -src_compile() { - python uwsgiconfig.py --build gentoo || die "building uwsgi failed" - - mkdir -p "${T}/plugins" - - if use lua ; then - python uwsgiconfig.py --plugin plugins/lua gentoo || die "building plu= gin for lua failed" - fi - - if use perl ; then - python uwsgiconfig.py --plugin plugins/perl gentoo || die "building pl= ugin for perl failed" - fi - - if use python ; then - for a in ${PYTHON_ABIS} ; do - python uwsgiconfig.py --plugin plugins/python${a/.} gentoo || die "bu= ilding plugin for python-${a} failed" - done - fi - - if use apache2 ; then - for m in Ruwsgi uwsgi ; do - APXS2_ARGS=3D"-c mod_${m}.c" - apache-module_src_compile - done - fi -} - -src_install() { - dobin uwsgi - - insinto /usr/$(get_libdir)/uwsgi - doins "${T}/plugins"/*.so - - use lua && dosym uwsgi /usr/bin/uwsgi_lua - - use perl && dosym uwsgi /usr/bin/uwsgi_perl - - if use python ; then - for a in ${PYTHON_ABIS} ; do - dosym uwsgi /usr/bin/uwsgi_python${a/.} - done - fi - - if use apache2; then - for m in Ruwsgi uwsgi ; do - APACHE2_MOD_FILE=3D"${APXS2_S}/.libs/mod_${m}.so" - apache-module_src_install - done - fi - - newinitd "${FILESDIR}"/uwsgi.initd uwsgi - newconfd "${FILESDIR}"/uwsgi.confd uwsgi -} - -pkg_postinst() { - if use apache2 ; then - elog "Two Apache modules have been installed: mod_uwsgi and mod_Ruwsgi= ." - elog "You can enable them with -DUWSGI or -DRUWSGI in /etc/conf.d/apac= he2." - elog "Both have the same configuration interface and define the same s= ymbols." - elog "Therefore you can enable only one of them at a time." - elog "mod_uwsgi is commercially supported by Unbit and stable but a bi= t hacky." - elog "mod_Ruwsgi is newer and more Apache-API friendly but not commerc= ially supported." - fi - - if use lua || use perl || use python; then - elog "The lua, perl and python modules are built as plugins." - elog "Use '--plugins lua', '--plugins psgi' or '--plugins python27' to= load them." - fi -} diff --git a/www-servers/uwsgi/uwsgi-1.0.4.ebuild b/www-servers/uwsgi/uws= gi-1.1.2.ebuild similarity index 70% rename from www-servers/uwsgi/uwsgi-1.0.4.ebuild rename to www-servers/uwsgi/uwsgi-1.1.2.ebuild index ad2a719..982c9ac 100644 --- a/www-servers/uwsgi/uwsgi-1.0.4.ebuild +++ b/www-servers/uwsgi/uwsgi-1.1.2.ebuild @@ -1,16 +1,21 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ =20 EAPI=3D"4" PYTHON_DEPEND=3D"python? 2:2.4:2.7 3:3.1:3.2" +PYTHON_MODNAME=3D"uwsgidecorators" SUPPORT_PYTHON_ABIS=3D"1" USE_RUBY=3D"ruby18 ree18 ruby19" RUBY_OPTIONAL=3D"yes" +PHP_EXT_NAME=3D"dummy" +PHP_EXT_INI=3D"no" +USE_PHP=3D"php5-3 php5-4" +PHP_EXT_OPTIONAL_USE=3D"php" =20 MY_P=3D"${P/_/-}" =20 -inherit apache-module python multilib ruby-ng +inherit apache-module eutils python multilib pax-utils php-ext-source-r2= ruby-ng =20 DESCRIPTION=3D"uWSGI server for Python web applications" HOMEPAGE=3D"http://projects.unbit.it/uwsgi/" @@ -19,17 +24,20 @@ SRC_URI=3D"http://projects.unbit.it/downloads/${MY_P}= .tar.gz" LICENSE=3D"GPL-2" SLOT=3D"0" KEYWORDS=3D"~amd64 ~x86" -IUSE=3D"apache2 +caps +carbon debug json ldap lua +nagios +pcre perl pyt= hon ruby rrdtool sqlite +uuid +xml yaml zeromq" +IUSE=3D"apache2 +caps +carbon debug graylog2 json ldap lua +nagios perl = +pcre php python rrdtool rsyslog ruby spooler sqlite syslog +uuid +xml ya= ml zeromq" +REQUIRED_USE=3D"|| ( lua perl php python ruby )" =20 -CDEPEND=3D"uuid? ( sys-apps/util-linux ) - caps? ( sys-libs/libcap ) +CDEPEND=3D"caps? ( sys-libs/libcap ) json? ( dev-libs/jansson ) + graylog2? ( sys-libs/zlib ) ldap? ( net-nds/openldap ) lua? ( dev-lang/lua ) pcre? ( dev-libs/libpcre ) perl? ( dev-lang/perl ) ruby? ( $(ruby_implementations_depend) ) sqlite? ( dev-db/sqlite:3 ) + rsyslog? ( app-admin/rsyslog ) + uuid? ( sys-apps/util-linux ) xml? ( dev-libs/libxml2 ) yaml? ( dev-libs/libyaml ) zeromq? ( net-libs/zeromq )" @@ -62,6 +70,8 @@ pkg_setup() { } =20 src_prepare() { + epatch "${FILESDIR}/${PV}-threaded-php.patch" + sed -i \ -e "s|'-O2', ||" \ -e "s|'-Werror', ||" \ @@ -70,14 +80,21 @@ src_prepare() { =20 sed -i \ -e 's|python\([0-9].[0-9]\)-config|python-config-\1|' \ - plugins/python??/uwsgiplugin.py || die "sed failed" + plugins/python/uwsgiplugin.py || die "sed failed" + + sed -i \ + -e "s|/lib|/$(get_libdir)|" \ + plugins/php/uwsgiplugin.py || die "sed failed" } =20 src_configure() { local plugins=3D"" use carbon && plugins+=3D", carbon" + use graylog2 && plugins+=3D", graylog2" use nagios && plugins+=3D", nagios" use rrdtool && plugins+=3D", rrdtool" + use rsyslog && plugins+=3D", rsyslog" + use syslog && plugins+=3D", syslog" =20 cat > "buildconf/gentoo.ini" << EOF [uwsgi] @@ -110,7 +127,7 @@ bin_name =3D uwsgi append_version =3D plugin_dir =3D /usr/$(get_libdir)/uwsgi plugin_build_dir =3D ${T}/plugins -embedded_plugins =3D ping, cache, rpc, fastrouter, http, ugreen, signal= , ${plugins:1} +embedded_plugins =3D ping, cache, rpc, fastrouter, http, ugreen, signal= , logsocket, router_uwsgi, router_redirect, router_basicauth, zergpool, $= {plugins:1} as_shared_library =3D false =20 locking =3D auto @@ -118,7 +135,7 @@ event =3D auto timer =3D auto filemonitor =3D auto =20 -embed_files =3D +embed_files =3D=20 =20 embed_config =3D [python] @@ -132,14 +149,18 @@ EOF each_ruby_compile() { cd "${WORKDIR}/${MY_P}" =20 - sed -i -e "s|^NAME=3D.*|NAME=3D'rack_${RUBY##*/}'|" plugins/rack/uwsgip= lugin.py || die "sed failed" - UWSGICONFIG_RUBYPATH=3D"${RUBY}" python uwsgiconfig.py --plugin plugins= /rack gentoo || die "building plugin for ${RUBY} failed" + UWSGICONFIG_RUBYPATH=3D"${RUBY}" python uwsgiconfig.py --plugin plugins= /rack gentoo rack_${RUBY##*/} || die "building plugin for ${RUBY} failed" =20 if [[ "${RUBY}" =3D=3D *ruby19 ]] ; then - UWSGICONFIG_RUBYPATH=3D"${RUBY}" python uwsgiconfig.py --plugin plugin= s/ruby19 gentoo || die "building plugin for ${RUBY} failed" + UWSGICONFIG_RUBYPATH=3D"${RUBY}" python uwsgiconfig.py --plugin plugin= s/fiber gentoo || die "building fiber plugin for ${RUBY} failed" fi } =20 +install_python_lib() { + insinto $(python_get_sitedir) + doins uwsgidecorators.py +} + src_compile() { python uwsgiconfig.py --build gentoo || die "building uwsgi failed" =20 @@ -153,9 +174,15 @@ src_compile() { python uwsgiconfig.py --plugin plugins/psgi gentoo || die "building pl= ugin for perl failed" fi =20 + if use php ; then + for s in $(php_get_slots); do + UWSGICONFIG_PHPDIR=3D"/usr/$(get_libdir)/${s}" python uwsgiconfig.py = --plugin plugins/php gentoo ${s/.} || die "building plugin for ${s} faile= d" + done + fi + if use python ; then for a in ${PYTHON_ABIS} ; do - python uwsgiconfig.py --plugin plugins/python${a/.} gentoo || die "bu= ilding plugin for python-${a} failed" + python${a} uwsgiconfig.py --plugin plugins/python gentoo python${a/.}= || die "building plugin for python-${a} failed" done fi =20 @@ -163,6 +190,10 @@ src_compile() { ruby-ng_src_compile fi =20 + if use spooler ; then + python uwsgiconfig.py --plugin plugins/spooler gentoo || die "building= plugin for spooler failed" + fi + if use apache2 ; then for m in Ruwsgi uwsgi ; do APXS2_ARGS=3D"-c mod_${m}.c" @@ -173,6 +204,7 @@ src_compile() { =20 src_install() { dobin uwsgi + pax-mark m "${D}"/usr/bin/uwsgi =20 insinto /usr/$(get_libdir)/uwsgi doins "${T}/plugins"/*.so @@ -181,7 +213,14 @@ src_install() { =20 use perl && dosym uwsgi /usr/bin/uwsgi_perl =20 + if use php ; then + for a in ${PYTHON_ABIS} ; do + dosym uwsgi /usr/bin/uwsgi_${s/.} + done + fi + if use python ; then + python_execute_function install_python_lib for a in ${PYTHON_ABIS} ; do dosym uwsgi /usr/bin/uwsgi_python${a/.} done @@ -196,6 +235,8 @@ src_install() { =20 newinitd "${FILESDIR}"/uwsgi.initd uwsgi newconfd "${FILESDIR}"/uwsgi.confd uwsgi + keepdir /etc/"${PN}".d + use spooler && keepdir /var/spool/"${PN}" } =20 pkg_postinst() {