RPM packaging

Bug #546737 reported by zlj on 2010-03-25
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Won't Fix

Bug Description


I've prepared specs and patches for graphite-web, carbon and whisper components. Packaging is based on experimental branch lp:~kmisoft/graphite/arithmetic_exp and was intended to be used on CentOS 5 platform. Specs are far from ideal state, I'll be happy to collaborate to bring them into better shape.

Known problems and notes:
- build dependencies are not implemented yet (I was too lazy to track them);
- you need to manually initialize graphite.db using 'sudo python /usr/lib/python2.4/site-packages/graphite/manage.py syncdb' after installation;
- packages from non-official repositories are required (pyparsing package from epel repo, for example);
- more extensive testing in a chroot'ed environment required.

Please kindly review these changes, I'll be happy to improve the quality of packaging. BTW, I also able to help with Debian packaging work.

zlj (zlj) on 2010-03-25
description: updated
zlj (zlj) on 2010-08-11
Changed in graphite:
assignee: nobody → Ilya Zakreuski (zlj)
chrismd (chrismd) on 2010-12-23
Changed in graphite:
importance: Undecided → High
status: New → Confirmed
Pete Fritchman (petef) wrote :

It would be nice to be able to use the result of "python setup.py bdist_rpm" as well. With these MANIFEST.in files, the RPMs are pretty usable:

MANIFEST.in for carbon:
include bin/* conf/* lib/carbon/*.xml

MANIFEST.in for graphite-web:
include webapp/graphite/*.example webapp/graphite/render/*.conf webapp/graphite/templates/*

Pete Fritchman (petef) wrote :

Actually, for graphite-web:

include webapp/graphite/*.example webapp/graphite/render/*.conf webapp/graphite/templates/*
recursive-include webapp/content *

chrismd (chrismd) wrote :
chrismd (chrismd) wrote :
chrismd (chrismd) wrote :
chrismd (chrismd) wrote :
chrismd (chrismd) wrote :

Posted some rpm specs/scripts contributed by Dan Aharon

chrismd (chrismd) wrote :

Attaching some more contributed SRPMS from brownoxford

chrismd (chrismd) wrote :
chrismd (chrismd) wrote :
Dan Carley (dcarley) wrote :

Thanks to the previous contributors of these. The packaging certainly makes getting Graphite & co onto CentOS and RHEL a whole lot easier.

I've updated them with some tweaks. A summary of the changes:

 - Moved Carbon's state directory to /var/lib which is a bit more FHS friendly. /var/spool is usually reserved for data which will be deleted after processing.
 - There was a debug to stdout line that had sneaked into the patches.
 - No longer restarts Apache because it's slightly surprising behaviour.
 - Separate packages for SELinux modules that allow it to work with SEL in targeted mode.

The updated SPECs and patches are available on Github with a full changelog: https://github.com/dcarley/graphite-rpms

Dan Carley (dcarley) wrote :

I forgot to mention that the Carbon package now depends on python-twisted-core >= 8.0 (due to bug #89138) which can be recompiled from RHEL6 sources.

Jeremy Carroll (phobos182) wrote :

I'm +1 for this patch. My initial experience with installing carbon on CentOS was a little painful. This RPM release adheres to the FHS specification instead of putting everything in opt.

chrismd (chrismd) wrote :

I would absolutely love to put out an RPM, but:

1) I don't have any CentOS machines to test on
2) I don't know all the "correct" ways of doing things in rpm specs for CentOS

I've put out some incorrectly built non-compliant RPMs in the past, that seems to cause more problems than it solves. I've also gotten lots of spec files sent to me (which are way better than what I came up with) by several users, but they tend to take different approaches and address different things (see the stuff attached to this bug).

In order to get an official Graphite RPM built and published I need someone's help. I need someone to own the RPM building process. I need someone who can provide the spec/build-script and answer questions when users have issues.

It's just not something I have the knowledge/time to support myself. Sorry I've let this languish for so long, I should've said this a long time ago.

chrismd (chrismd) wrote :

This is a user-contributed source rpm with one specfile that builds all of the graphite components out into separate packages, it follows the redhat packaging guidelines pretty close until getting into storage/conf ... thoughts on how to handle that are documented in the specfile. This is also based on the latest & greatest 0.9.9 release. Thanks to Justin Venus for contributing!

Deshi Xiao (xiaods) wrote :

i suggest provide spec and init file in a github repo, is good for every user.

Deshi Xiao (xiaods) wrote :

i have evaluted graphite-0.9.9-1.el6.src.rpm in rhel6 environments. also found some exception. we can defined a scope environment for rpm package.suppose support fedora, centos5, centos6.
fedora rpm guide is defato rpm starndard rules. (http://docs.fedoraproject.org/en-US/Fedora_Draft_Documentation/0.1/html/RPM_Guide/index.html)

I can contribute my effects if you need some rpm testing works

Deshi Xiao (xiaods) wrote :

i came across a rpm spec repo on github, i think this is reference for this bug fix works.

Alexandru Ardelean (commodo) wrote :


I've been asked to package and maintain graphite for a project that I'm working on.
I'll try to push my changes/updates to launchpad/github/wherever.
The requirement I received was to arrange the parts of Graphite by the File Hierarchy Standard; so, instead of putting everything in /opt/graphite, I've changed the packaging to put elements in

You may try to get the packages from here:

You may get to look at everything [with source code and some git stuff] here:

The graphite.tar.gz archive contains the entire folder minus the dists folder.

I still have to work on them and see; right now, Audit causes permission problems, so you may have to call "setenforce 0" to disable it.
I've tried it on CentOS 6.3 and it worked for me, both on 32 and 64 bit versions; if it works with CentOS 5 or other version, then, great : send me a message saying so.

Note that I haven't yet taken the time to support .deb packaging; I might get to that soon.

Michael Leinartas (mleinartas) wrote :

Marking this closed as graphite-web is now being built on koji for Fedora inclusion: http://arm.koji.fedoraproject.org/koji/packageinfo?packageID=15072

Changed in graphite:
assignee: Ilya Zakreuski (zlj) → nobody
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers