debian packaging

Bug #522873 reported by Arthur Gautier
60
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Graphite
Won't Fix
High
Unassigned

Bug Description

Here is a patch for debian packaging of graphite :)

Revision history for this message
Arthur Gautier (superbaloo) wrote :
Revision history for this message
chrismd (chrismd) wrote :

This is fantastic, thanks Arthur! I'm going to try and get the next release of Graphite (due in the next few days) with some binary packages like this available.

Changed in graphite:
assignee: nobody → chrismd (chrismd)
milestone: none → 0.9.6
Revision history for this message
Elliot Murphy (statik) wrote :

This is really cool!

I have been working on packaging also, but I only have a package for whisper so far. Typically, the debian/ directory would not be included in the tarball that you release on pypi.

http://svn.debian.org/viewsvn/python-modules/packages/python-whisper/trunk/debian/

I have been working on this with the debian python packaging team, and would love to see the other packages added there as well so they can easily flow into debian and ubuntu.

Revision history for this message
chrismd (chrismd) wrote :

Arthur, I looked through the patch and noticed in many places you changed import paths to be relative (ie. changing "import graphite.storage" to "import storage", etc). Was there a particular reason you needed to do this? I'd just like to understand better so I don't break anything down the road.

Revision history for this message
Allan Bailey (zirpu) wrote :

It's not a good idea to use relative imports. Just in general, it can introduce and/or hide bugs in strange ways. It's usually
better to be explicit.

Revision history for this message
Arthur Gautier (superbaloo) wrote :

@chrismd these changes were workaround for pythonpath problems i had, but like allan said that's probably a bad idea to do this way.

The problem is I tried to split applications in differents paths like you may see.

May it would be nicer to include another path in pythonpath, i don't know

Revision history for this message
Arthur Gautier (superbaloo) wrote :

May we speak on irc or jabber about this ? i'm available on freenode :) feel free to join #graphite :)

Revision history for this message
chrismd (chrismd) wrote :

Sure I'm available on jabber with my same username at jabber.org.

Changed in graphite:
importance: Undecided → High
status: New → In Progress
Revision history for this message
chrismd (chrismd) wrote :

Hey guys, I've created a new branch, lp:~graphite-dev/graphite/debian-packaging, and applied Arthur's patch to it. I think this is close to being ready with just a couple issues in python-path.patch.

First is the change to use relative paths in the import statements. I think I know why you had to do this in your setup Arthur, the graphite-vhost you included in the patch has the following line in it:

PythonPath "['/usr/share/pyshared/graphite'] + sys.path"

In order for 'import graphite.xyz' statements to work it would have to be this instead:

PythonPath "['/usr/share/pyshared'] + sys.path"

I've made this change in the branch and updated python-path.patch to not change any import paths, now it only changes the storage/content directory paths in settings.py. Let me know if this works for you.

Thanks

Revision history for this message
chrismd (chrismd) wrote :

I'm releasing 0.9.6 despite this not being resolved yet, I figure I'll just post .deb packages for download once this is finalized.

Revision history for this message
Arthur Gautier (superbaloo) wrote :
Revision history for this message
chrismd (chrismd) wrote :

I finally got around to trying to test the deb packages and I have run into a few issues. I am using Ubuntu 9.10, dpkg version 1.15.4ubuntu1.

I used the command "dpkg -b . graphite-web" to try and build packages.

First issue I ran into was that it was looking for the control file under the DEBIAN directory (note all caps) whereas on the branch all the debian directories are lowercase. Maybe I'm using an old version of dpkg? Does anyone else's system use the lowercase directory?

Second issue is that there is a space in the control file that again my dpkg did not like. Granted this is trivial to fix but I thought it might be another indicator that my build setup is somehow different from Arthur's. Does this work for you as is?

Third issue, after renaming the directory to uppercase and removing the control file space I get this error when trying to build:

dpkg-deb: parse error, in file './DEBIAN/control' near line 14 package 'graphite':
 `Depends' field, invalid package name `${python:Depends}': must start with an alphanumeric

At this point I'm pretty sure something important is different / missing in my setup. Any thoughts? Also if anyone else can successfully build working deb packages with this branch please post them so we can test & publish them even as we work out the details of the build process.

Revision history for this message
zlj (zlj) wrote :

Hi,

'dpkg -b' command is more related to package "re-packing" process than real build process. Try this:

bzr branch lp:~graphite-dev/graphite/debian-packaging
cd debian-packaging
dpkg-buildpackage -rfakeroot

More advanced technique is to use pbuilder which usually helps you to keep your system clean from bunch of development packages as well as test your build process in a clean chroot (and even more :)). More on this topic could be found here: https://wiki.ubuntu.com/PbuilderHowto

Cheers

zlj (zlj)
tags: added: packaging
Revision history for this message
zlj (zlj) wrote :

Hi again,

regarding your request of working packages built from lp:~graphite-dev/graphite/debian-packaging branch.

In the following tarball I'm attaching build log and ready to go deb package prepared in my Lenny amd64 pbuilder environment.

Cheers

Revision history for this message
Ivan Pouzyrevsky (ivan-pouzyrevsky) wrote :

Hey there.

Any status updates on Debian packaging for graphite? What is the most recent working set of debian scripts? What have to be done to commit Debian packaging into trunk?

Cheers.

Revision history for this message
chrismd (chrismd) wrote :

I have unfortunately lost the bandwidth to work on this, though I'd be glad to assist anyone who does want to work on it however I can.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I have a recipe for daily builds of graphite, whisper and carbon:
# bzr-builder format 0.3 deb-version {debupstream}~bzr{revno}-0landscape1~bzr{revno:packaging}
lp:~landscape/graphite/trunk
nest-part packaging lp:~landscape/graphite/graphite-landscape-packaging debian debian

The landscape trunk branch is basically a copy of graphite's upstream trunk, so you could use that instead (bar any recent incompatible changes). The packaging branch builds the 3 projects out of that single trunk branch.

I don't use graphite anymore, so I don't know if the package actually works now. It used to, though.

Revision history for this message
Gabriel Filion (gabriel-filion) wrote :

Hello, this is nice, I'm eager to see those packages get into debian/ubuntu. Since I just found this issue out, I haven't had time to try the packages yet.

May I suggest that a PPA be used for official packages so that it's easier for people to try them out?

Revision history for this message
Jonas Genannt (hggh) wrote :

Before the packages could uploaded into debian, upstream developers had to fixed the license problem in carbon:

https://bugs.launchpad.net/graphite/+bug/919428

Revision history for this message
Jonas Genannt (hggh) wrote :

Graphite Carbon is now available at Debian unstable: http://packages.qa.debian.org/g/graphite-carbon.html

Changed in graphite:
milestone: 0.9.6 → 0.9.10
Revision history for this message
Nils Kübler (disruption) wrote :

I Really need that Package :( Could someone please create it?

Revision history for this message
Nicolas Simonds (nicolas.simonds) wrote :

The setup.py shipped with graphite-web can build dpkgs, with a little help:

pip install stdeb
python setup.py --command=stdeb.command sdist_dsc

...then edit the control/changelog/etc. scripts to taste. It does a pretty good job.

Revision history for this message
Michael Leinartas (mleinartas) wrote :

Closing out this old issue as hggh has been shepherding this into official debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=659632

Changed in graphite:
assignee: chrismd (chrismd) → nobody
status: In Progress → Won't Fix
Revision history for this message
Jonas Genannt (hggh) wrote :

Graphite-web is now finally available in Debian: http://packages.qa.debian.org/g/graphite-web.html

(Will not be released with Wheezy, but it's easy to backport it.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.