Ticket #767 (closed defect: fixed)

Opened 14 years ago

Last modified 13 years ago

new bcfg2 dep python-profiler is non-free

Reported by: dclark Owned by: desai
Priority: minor Milestone: Bcfg2 1.1.0 Release
Component: bcfg2-server Version: 1.0
Keywords: Cc: solj, desai, [email protected]


r5389 added a .deb packaging dep on python-profiler based on a dep in bcfg2-server code.

python-profiler is not free software:


As shown at python-profiler is in multiverse, which is not enabled in default ubuntu installs, and is described like this:

"multiverse" component

The "multiverse" component contains software that is "not free", which means the licensing requirements of this software do not meet the Ubuntu "main" Component Licence Policy.

The onus is on you to verify your rights to use this software and comply with the licensing terms of the copyright holder.

This software is not supported and usually cannot be fixed or updated. Use it at your own risk.


As shown at python-profiler is in non-free

The free packages go into main; the non-free ones into non-free, and the free ones which depend on non-free ones into contrib.


I'm not going to comment on legal / ethical / moral issues at the moment, but from a sys admin annoyance POV this means that users running Debian and Ubuntu are unable to install bcfg2-server in a default configuration, and users of distributions like Trisquel and gNewSense that do not distribute any nonfree software will be completely unable to install it.

Relevant external discssion looks like:

The best overall writeup of the problem seems to be at

It looks like there is a project to replace with a freedom-respecting version at:

It's marked as beta, last updated 22 Aug 2006. In a 2008 thread the author recommends against using it.

There is a more recent project at: (code) that includes threading support, but is marked as being alpha.

The most recent useful answer looks like in[email protected]/msg04552.html

> the python-profile is in non-free, so what free tool do you use for
> profiling your python programs? There is cProfile in python2.5, which
> seems to be free, but for showing
> the result I need pstat, which is again non-free. Is there a DFSG free
> way to profile python programs?

I use lsprofcalltree, which fires up KCacheGrind to visualize the
results of profiling from cProfile (aka lsprof).

It looks like there are some details on how to do this at


Change History

comment:1 Changed 14 years ago by dclark

r5507 is a workaround for the .deb packaging side of the problem

comment:2 Changed 14 years ago by dclark

  • Priority changed from blocker to minor
  • Milestone changed from Bcfg2 1.0.0 Release to Bcfg2 1.0.1 Release

Based on in python 2.5 and later you can just use the new cProfile as a drop-in replacement for profile; cProfile just comes with python 2.5 and later.

It looks like can be used as a replacement for pstats.

So a possible next step would be to do the drop-in replacement of profile with cProfile and then replace this code in ./src/sbin/bcfg2-info

stats = pstats.Stats(trace)
stats.sort_stats('cumulative', 'calls', 'time')

with something like:

stats = lsprofcalltree.KCacheGrind(trace)
data = open('/tmp/bcfg2.kgrind', 'w+')

and then prompt the user to use KCachegrind to view the profiling data.

comment:3 Changed 14 years ago by somekool <[email protected]…>

can this be backported to 2.4

will the requirement on python 2.4 be preserved for bcfg2-server?

comment:4 Changed 14 years ago by somekool <[email protected]…>

comment:5 Changed 14 years ago by desai

I just make the profiling stuff optional in 1.0, so that the python-profiler switch from depends to recommends is correct.

In 1.0.1, we can make the system either use python-profiler or cProfile, which will retain backwards compatibility.

comment:6 Changed 14 years ago by solj

  • Milestone changed from Bcfg2 1.0.1 Release to Bcfg2 1.1.0 Release

Retargetting for 1.1.0 as per desai's request:

13:41 <desai> so for 767 13:41 <desai> that isn't a 1.0.1 thing 13:41 <desai> since that will change up prereqs and the like

comment:7 Changed 13 years ago by desai

  • Status changed from new to closed
  • Resolution set to fixed

I think that having profiling as an optional feature is where we will be for the forseeable future; this smells a bit like python ssl circa 2005.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.