Skip to content

Commit

Permalink
dev-python/carbon: bump to vn. 0.9.14
Browse files Browse the repository at this point in the history
updated no-data-files.patch to account for changed state in setup.py

Package-Manager: portage-2.2.24
  • Loading branch information
Ian Delaney committed Dec 27, 2015
1 parent 4e6cfc8 commit 85abb81
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
1 change: 1 addition & 0 deletions dev-python/carbon/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST carbon-0.9.12.tar.gz 47450 SHA256 df4b521a449b888fc901d11abffc9e7eb070a8670e341caa0e13ab8f3029cddf SHA512 060b3d20cf2bd95be22fba30a24591361c772edaaaa99117616f4a01a31eab9395d84c5eb835408fac2c1bc36b70950e260d56456879489a9ee3248c6c4e3f33 WHIRLPOOL c6021492dc5ed3c9c4cefe173b1e0592b18e6c2d49e48cd74059c4d3822ea0b2cf253bedc9a67f7fa37dd8944e06835a1da959300e3c6e0f1759622b19b0c61e
DIST carbon-0.9.13.tar.gz 47509 SHA256 75aecd8114435430e06803ebaf1e9cac81f58fb231fc93d8904d667d971ae6cd SHA512 89c843ac67ed4b68c28273459e5a96594851e5d2694fdefdfb71cebcdc6555d4aac8c45c1c6d2ca61a15405bac7ba3d27836470fe152d5d7a4936bb2d00e6776 WHIRLPOOL 40000d912f3881dc4f197e1290d3e0fd092ec23bc6574a97fa31d0ffa77fa651abc4d4da529e45d88d74ea763f18cde20daf5fd70549d6afd38f4c5b88d1becb
DIST carbon-0.9.14.tar.gz 50285 SHA256 e12539ca855f0777e326028a32fbff5022d75b7c3e6fcc7e4704305a650aee9a SHA512 e70275c0acce17287b3036668e45c75b9da9b54523faca0f5bdceda4b6b98c71ebf773740e85063ee3ea4e0bc64adee913bb7f8eab1f7016eb504b06f0b589e3 WHIRLPOOL 998c6a3d0b6cc9aa86cc9b79719e762610cf47012f2eebfd575a6bac3aeb78b64c34e94c5fedc5c88074400920268890e8b84e2f1b32ee4ba24bdd0bef31602d
65 changes: 65 additions & 0 deletions dev-python/carbon/carbon-0.9.14.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5

PYTHON_COMPAT=( python2_7 )

inherit distutils-r1

DESCRIPTION="Backend data caching and persistence daemon for Graphite"
HOMEPAGE="http://graphite.wikidot.com/"
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"

SLOT="0"
LICENSE="Apache-2.0"
KEYWORDS="~amd64 ~x86"

# whisper appears to have been missed from listing in install_requires in setup.py
RDEPEND="
dev-python/twisted-core[${PYTHON_USEDEP}]
dev-python/whisper[${PYTHON_USEDEP}]
dev-python/txAMQP[${PYTHON_USEDEP}]"

PATCHES=(
# Do not install the configuration and data files. We install them
# somewhere sensible by hand. Patch for this vn. 0.9.14 has been extended
# due to redhat's init scripts set to install unconditionally in setup.py
"${FILESDIR}"/${P}-no-data-files.patch
)

python_prepare_all() {
# This sets prefix to /opt/graphite. We want FHS-style paths instead.
rm setup.cfg || die
distutils-r1_python_prepare_all
}

python_install_all() {
distutils-r1_python_install_all

insinto /etc/carbon
doins conf/*

dodir /var/log/carbon /var/lib/carbon/{whisper,lists,rrd}

newinitd "${FILESDIR}"/carbon.initd carbon-cache
newinitd "${FILESDIR}"/carbon.initd carbon-relay
newinitd "${FILESDIR}"/carbon.initd carbon-aggregator

newconfd "${FILESDIR}"/carbon.confd carbon-cache
newconfd "${FILESDIR}"/carbon.confd carbon-relay
newconfd "${FILESDIR}"/carbon.confd carbon-aggregator
}

pkg_postinst() {
einfo 'This ebuild installs carbon into FHS-style paths.'
einfo 'You will probably have to set GRAPHITE_CONF_DIR to /etc/carbon'
einfo 'and GRAPHITE_STORAGE_DIR to /var/lib/carbon to make use of this'
einfo '(see /etc/carbon/carbon.conf.example).'
einfo ' '
einfo 'OpenRC init script supports multiple instances !'
einfo 'Example to run an instance b of carbon-cache :'
einfo ' ln -s /etc/init.d/carbon-cache /etc/init.d/carbon-cache.b'
einfo ' cp /etc/conf.d/carbon-cache /etc/conf.d/carbon-cache.b'
}
32 changes: 32 additions & 0 deletions dev-python/carbon/files/carbon-0.9.14-no-data-files.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
diff -ur carbon-0.9.14.orig/setup.py carbon-0.9.14/setup.py
--- setup.py 2015-11-07 13:50:29.000000000 +0800
+++ setup.py 2015-12-27 08:43:46.575905408 +0800
@@ -13,20 +13,6 @@
setup_kwargs = dict()


-storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]),
- ('storage/log',[]), ('storage/rrd',[]) ]
-conf_files = [ ('conf', glob('conf/*.example')) ]
-
-install_files = storage_dirs + conf_files
-
-# Let's include redhat init scripts, despite build platform
-# but won't put them in /etc/init.d/ automatically anymore
-init_scripts = [ ('examples/init.d', ['distro/redhat/init.d/carbon-cache',
- 'distro/redhat/init.d/carbon-relay',
- 'distro/redhat/init.d/carbon-aggregator']) ]
-install_files += init_scripts
-
-
setup(
name='carbon',
version='0.9.14',
@@ -39,7 +25,6 @@
package_dir={'' : 'lib'},
scripts=glob('bin/*'),
package_data={ 'carbon' : ['*.xml'] },
- data_files=install_files,
install_requires=['twisted', 'txamqp'],
**setup_kwargs
)

0 comments on commit 85abb81

Please sign in to comment.