megacoffee.net Gentoo overlay - legacy mirror
We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.
changeset 130:2ce94546a682
Kallithea: adding WSGI, adding .keep file to data directory
author | Daniel Neugebauer <dneuge@energiequant.de> |
---|---|
date | Sun, 10 Aug 2014 22:33:43 +0200 |
parents | 4a630613e8cd |
children | 693255175934 |
files | dev-vcs/kallithea/Manifest dev-vcs/kallithea/files/production.wsgi dev-vcs/kallithea/kallithea-9999.ebuild |
diffstat | 3 files changed, 35 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/dev-vcs/kallithea/Manifest Sun Aug 03 23:23:03 2014 +0200 +++ b/dev-vcs/kallithea/Manifest Sun Aug 10 22:33:43 2014 +0200 @@ -1,2 +1,3 @@ -EBUILD kallithea-9999.ebuild 7987 SHA256 9a4e391799515e322be44b25a24d5a693d006ebfb28450631c3c2bb92d00ec8e SHA512 60c40bb6486ce15e5d18780dbfe5f70783d5002894b323ca6bab66bd75f1eab1fbcd581e76100b78f81c60fdb58fbe5a40ab804026fa383021a96ec149cf5583 WHIRLPOOL e99fda169f0dfd30aa9928eb96b3230f6af17798cc3bc392b65d23c17ade3c696dbd9407f2237da79baa57063953dc5d7c22d1cd6803f34f0b53f2cc3ffda45b +AUX production.wsgi 448 SHA256 34aa607585b8526356d0a4e7103689a4c353e333bfd7dbd9316dea1601403af6 SHA512 f1d6310626ce5687317d856e4be2ea37d4d39dea5402846c64195d77cef1454ef96d3c6d23832a9a0c8ecdc6645582bc86b138cc7fbb7dc78226f45279d44f7a WHIRLPOOL cfee76d169facea538b00fdd9683a9ecefe58cd49f3c2f3f46e49025af459e5a8bdd236ea55252d5488ee52212f2f57423f3d8e21ddb2251e25851bffc93d243 +EBUILD kallithea-9999.ebuild 8413 SHA256 0455764589e04a214f885831587ab57a823994f9e57bda1b969f2ff746b59d03 SHA512 3e6b0a1ef1f2c1316f8690336a7d1516ac80cce301d8ac85f8b4adcb7b86780fd56328338c7c271dee0de505f54c324c1339b2b619ecc1a7169e67aac3cd4eae WHIRLPOOL 97827448c10e7ec8bd94ff129a5a9b3b2f94dde815d8a357c28b0e8e6f3c1a0768381133e730f0b0472750920cc55f9276aa0822bddc0581be0f3b2ec76eccfa MISC kallithea-test.sh 603 SHA256 4d0ab7e309ea72d79691c903ed66de0c68845244a04728d93d466ce3e243ce61 SHA512 350b5eee94f0ee5cafac0b7254c8e0b61620686694bb068d6072c85edf4f6724057294e9f95e2f00df0b0a96a1cfc1553cf0790f4a1e64342dcb574ced57783c WHIRLPOOL fa671b48d21f25367f8653a825c9bcb1b196369d0d8d1b6ba6d1d926b835e289be2554ef365954dfe2af04d4400db0a8c7bff6f5a5551c803c38fdf09357a4dc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dev-vcs/kallithea/files/production.wsgi Sun Aug 10 22:33:43 2014 +0200 @@ -0,0 +1,15 @@ +import os +os.environ["HGENCODING"] = "UTF-8" +os.environ['PYTHON_EGG_CACHE'] = '###DATADIR###/.egg-cache' + +# sometimes it's needed to set the curent dir +os.chdir('###DATADIR###/') + +import site +site.addsitedir("###BASEDIR###/lib/python2.7/site-packages") + +from paste.deploy import loadapp +from paste.script.util.logging_config import fileConfig + +fileConfig('###CONFDIR###/production.ini') +application = loadapp('config:###CONFDIR###/production.ini')
--- a/dev-vcs/kallithea/kallithea-9999.ebuild Sun Aug 03 23:23:03 2014 +0200 +++ b/dev-vcs/kallithea/kallithea-9999.ebuild Sun Aug 10 22:33:43 2014 +0200 @@ -27,6 +27,7 @@ installDataPath="/var/lib/kallithea" installBasePath="/opt/kallithea" +installConfigPath="/etc/kallithea" virtualenvActivationPath="bin/activate" pkg_setup() { @@ -108,23 +109,33 @@ sed -e "s#${realWorkDir}/dist/v#${installBasePath}#" -i "${dirtyFile}" done IFS="${oldIFS}" + + # create WSGI file + cd "${realWorkDir}/etc" + cp "${FILESDIR}/production.wsgi" . + sed -e "s:###BASEDIR###:${installBasePath}:" -i production.wsgi + sed -e "s:###DATADIR###:${installDataPath}:" -i production.wsgi + sed -e "s:###CONFDIR###:${installConfigPath}:" -i production.wsgi } src_install() { # QA: no need to have anything world-writable... chmod o-w -R dist/v/lib/python2.7/site-packages/setuptools-0.9.8-py2.7.egg-info - # install production.ini in /etc/kallithea - into /etc/kallithea - doins "${S}/etc/production.ini" - - # just copy the remaining virtualenv directory to /opt/kallithea + # just copy the virtualenv directory to /opt/kallithea dodir /opt cp -aR "${S}/dist/v" "${D}${installBasePath}" - + + # install configuration files to /etc/kallithea + diropts -m750 -oroot -gkallithea + insopts -m640 -oroot -gkallithea + insinto "${installConfigPath}" + doins "${S}/etc/production.ini" + doins "${S}/etc/production.wsgi" + # create data directory diropts -m2770 -okallithea -gkallithea - dodir "${installDataPath}" + keepdir "${installDataPath}" } pkg_postinst() {