%define product DeadlockDebugger %define version 1.0 %define release 1 %define rpm_prefix erp5 %define zope_home %{_prefix}/lib/erp5 %define software_home %{zope_home}/lib/python Summary: A Zope product to show threads Name: %{rpm_prefix}-%{product} Version: %{version} Release: %mkrel %{release} License: GPL Group: System/Servers URL: http://www.zope.org/Members/nuxeo/Products/%{product} Source0: http://www.zope.org/Members/nuxeo/Products/%{product}/%{version}/%{product}-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-rootdir BuildArch: noarch Requires: %{rpm_prefix}-zope Requires: python2.4-threadframe #---------------------------------------------------------------------- %description This product adds a hook so that a deadlocked Zope process can be debugged, by dumping a traceback of all running python processes. The dump is sent to the event log (at the DEBUG level) and returned to the browser (even though the Zope is deadlocked and doesn't answer any other requests!). DeadlockDebugger can of course also be used in non-deadlock situations, when a Zope process is taking a long time and you wish to know what code is being executed. #---------------------------------------------------------------------- %prep %setup -q -c %build %install %{__rm} -rf %{buildroot} %{__mkdir_p} %{buildroot}%{software_home}/Products %{__cp} -a * %{buildroot}%{software_home}/Products/ %py_compile %{buildroot}%{software_home}/Products %clean %{__rm} -rf %{buildroot} %post if [ "`%{_prefix}/bin/zopectl-erp5 status`" != "daemon manager not running" ] ; then service erp5 restart fi %postun if [ "$1" = "0" ] && [ "`%{_prefix}/bin/zopectl-erp5 status`" != "daemon manager not running" ] ; then service erp5 restart fi %files %defattr(0644, zope, zope, 0755) %dir %{software_home}/Products/%{product} %{software_home}/Products/%{product}/*.txt %{software_home}/Products/%{product}/__init__.py* %{software_home}/Products/%{product}/dumper.py* %config(noreplace) %{software_home}/Products/%{product}/custom.py* #---------------------------------------------------------------------- %changelog * Fri Feb 13 2008 Ɓukasz Nowak 1.0-1nxd2009.0 - Initial release of spec