%define py_version %(%{__python} -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND) %define py_prefix %(%{__python} -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND) %define py_libdir %{py_prefix}/lib/python%{py_version} %define py_incdir %{py_prefix}/include/python%{py_version} %define py_sitedir %{py_libdir}/site-packages %define debug_package %{nil} %define version 0.3.3 %define release 1 # set git to %{nil} (release) or to YYYYMMDD.123456 (git build) %define git %{nil} %if "%{?git}" != "" %define release_prefix 0. %define release_suffix .git.%{git} %endif Name: kobo Version: %{version} Release: %{?release_prefix}%{release}%{?release_suffix}%{?dist} License: LGPLv2 Summary: Python modules for tools development Group: Development/Libraries URL: https://fedorahosted.org/kobo/ Source0: https://fedorahosted.org/releases/k/o/kobo/%{name}-%{version}%{?release_suffix}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel >= 2.4 # require python-hashlib in python 2.4 %if "%{py_version}" == "2.4" Requires: python-hashlib %endif %description Kobo is a set of python modules designed for rapid tools development. %package django Summary: Django components Group: Development/Libraries Requires: kobo = %{version}-%{release} %description django Django components. %package client Summary: CLI client Group: Development/Libraries Requires: kobo = %{version}-%{release} Requires: python-simplejson %description client CLI client. %package worker Summary: Worker daemon processing tasks submitted to the hub Group: Development/Libraries Requires: kobo = %{version}-%{release} %description worker Worker daemon processing tasks submitted to the hub. %package hub Summary: Xml-rpc and web interface to a task database Group: Development/Libraries Requires: kobo = %{version}-%{release} Requires: Django >= 1 Requires: gzip %description hub Hub is a xml-rpc and web interface to a task database. %package rpmlib Summary: Functions to manipulate with RPM files Group: Development/Libraries Requires: kobo = %{version}-%{release} Requires: rpm-python Requires: koji %description rpmlib Rpmlib contains functions to manipulate with RPM files. %package admin Summary: Kobo admin script for instant project deployment Group: Development/Tools Requires: kobo >= %{version} Requires: Django >= 1 %description admin Kobo admin provides templates for various kobo-based projects, incl. CLI, hub client, worker and hub. %prep %setup -q -n %{name}-%{version}%{?release_suffix} %build echo OK %install rm -rf ${RPM_BUILD_ROOT} python setup.py install --root=${RPM_BUILD_ROOT} # delete the egg-info file egg_info=$RPM_BUILD_ROOT/%{py_sitedir}/%{name}-*.egg-info if [ -f $egg_info ]; then rm $egg_info fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %{py_sitedir}/kobo/*.py* %exclude %{py_sitedir}/kobo/rpmlib.py* %doc AUTHORS %doc COPYING %doc LICENSE %files django %defattr(644,root,root,755) %{py_sitedir}/kobo/django %files client %defattr(644,root,root,755) %{py_sitedir}/kobo/client %files worker %defattr(644,root,root,755) %{py_sitedir}/kobo/worker %files hub %defattr(644,root,root,755) %{py_sitedir}/kobo/hub %files rpmlib %defattr(644,root,root,755) %{py_sitedir}/kobo/rpmlib.py* %files admin %defattr(644,root,root,755) %{py_sitedir}/kobo/admin %attr(755,root,root) /usr/bin/kobo-admin %changelog * Tue Feb 1 2011 Daniel Mach - 0.3.3-1 - Replace double underscores with dots in xmlrpc method names. (Daniel Mach) - Fix regex in test_tback.py so unit tests pass. (Daniel Mach) - Fix session handling in worker. (Daniel Mach) - Fix kobo.Traceback to return empty string on no exception. Add traceback tests. (Tomas Kopecek) - Simplify hub deployment (add menu and template to default). Tweak kobo-admin templates. (Daniel Mach) - Add a warning about a possibly read-only database to the worker middleware assert. (Daniel Mach) - Add task notification() and cleanup() class methods. (Daniel Mach) - Revamp hub urls and admin templates. (Daniel Mach) - Prevent a race condition when using CookieTransport in threads in py2.7. (Daniel Mach) - Add unit test for EnumItem.change_state() return value. (Daniel Mach) - StateEnum.change_state() now returns bool as documented. (Martin Magr) - Command argument in kobo.shortcuts.run() can be also a list now. (Daniel Mach) - Strip path from nvr in kobo.rpmlib.parse_nvr() and parse_nvra(). (Daniel Mach) - Exclude XML-RPC from CSRF processing. (Daniel Mach) - Add stdin data support to kobo.shortcuts.run(). (Daniel Mach) - Add kobo.shortcuts.iter_chunks() to iterate through a list, string or generator and yield chunks of defined size. (Daniel Mach) - Raise an exception when spawn_subtask() or wait() method is called in a foreground task. (Daniel Mach) - Add constructor to kobo.django.hacks.UserChangeForm to fix maximum recursion depth error. (Daniel Mach) - Fix username max_length hack to work with Django 1.2.1. (Martin Bukatovic) - Add kobo.notification module to send email notifications. (Daniel Mach) - Process kobo.shortcuts.run() logging in chunks and print data immediately. (Daniel Mach) - Subtasks have to follow parent's channel and arch. (Martin Magr) - Compute elapsed time for running tasks. (Tomas Kopecek) * Wed Oct 27 2010 Daniel Mach - 0.3.2-1 - Fix XML-RPC transports to make them work in py2.5 and py2.6. (Daniel Mach) - Automatically scroll the task log window when we're at the bottom of the page. (Daniel Mach) - Show self.* attributes in extended tracebacks. (Daniel Mach) - Compress logs with gzip when a task finishes. (Daniel Mach) - Convert task logs to utf8 (with "replace" option) to prevent raising UnicodeDecodeError during template processing. (Daniel Mach) * Tue Oct 19 2010 Daniel Mach - 0.3.1-1 - Add help-admin command to display help for admin commands. (Daniel Mach) - Add config parser support for glob matching on dict keys. (Tomas Kopecek) - Implement timeout support in xmlrpc transports. (Daniel Mach) - Improve kobo.xmlrpc.CookieTransport to work with python 2.7 as well. (Daniel Mach) - Add kobo-admin utility. (Martin Bukatovic) - Add missing HttpResponseForbidden import to kobo.hub.views. (Daniel Mach) - Fix bug in "Show only my tasks" search option on Tasks page. (Daniel Mach) * Fri Aug 13 2010 Daniel Mach - 0.3.0-2 - Bump to new upstream version. - Fix kobo.rpmlib.get_digest_algo_from_header() when RPMTAG_FILEDIGESTALGO contains None value. (Daniel Mach) - Pass 'conf' argument do daemonized worker's main_loop. (Daniel Mach) * Mon Feb 15 2010 Daniel Mach - 0.2.1-1 - Split rpmlib to a subpackage. - Add missing "compare_nvr" to __all__. (Daniel Mach) - Remove duplicate subtask removal in Task.wait(). (Tomas Kopecek) - Parent task didn't wake up even if all child tasks were finished. (Tomas Kopecek) - Change 'make log' to use C locales and automatically fill name and email from GIT. (Daniel Mach) - Fix spawn_subtask argument. (cherry picked from commit 374a4165c16d6b34fa486a38525753969e549415) (Tomas Kopecek) - Fix XML-RPC method registration. (original patch by Xuqing Kuang) (Daniel Mach) - Convert rpm.labelCompare's arguments to string to prevent segfaulting. Add compare_nvr tests. (Tomas Kopecek) - Add Task.get_time_display() to get time spent in task in human readable form. (Daniel Mach) - Use koji.get_sigpacket_key_id() to read sigkey id from a rpm header. (Daniel Mach) * Thu Nov 5 2009 Daniel Mach - 0.2.0-1 - Rewrite menu to get rid of tuples in menu definition. Always use MenuItem classes. (Daniel Mach) - Send task logs to hub to enable realtime log watching. (Daniel Mach) - Add menu_item helper. (Tomas Kopecek) - New version of menu component. (Tomas Kopecek) - Order tasks to assign by priority first. (Daniel Mach) - Fix spacing errors to be more PEP 8 compliant. (Daniel Mach) - Handle SystemExit in TaskManager.run_task(). (Daniel Mach) - Add a shortcut and pkgset support for computing hashlib based hashes. (Daniel Mach) - Add hack enabling 'VERBOSE' log level in the python logging module and Logger class. (Daniel Mach) - Run tests in alphabetical order. (Daniel Mach) - Fix TaskAdmin to search for user in correct db field. (Tomas Kopecek) - More convenient admin listing for Worker model. (Tomas Kopecek) - Add files to cache faster (skip stat call when possible). (Tomas Kopecek) - Remove deps on postgresql, httpd, mod_auth_kerb and python-krbV. - Add AUTHORS, COPYING and LICENSE to kobo.rpm. * Tue Aug 18 2009 Daniel Mach - 0.1.2-1 - Read default paginate_by value from settings in kobo.django.views.generic.object_list. (Tomas Kopecek) - Add read_from_file() and rename save() to save_to_file() in kobo.shortcuts. (Daniel Mach) - Reverse FileUpload default ordering. (Daniel Mach) - Add kobo.conf.get_dict_value() to support dicts with default values. (Daniel Mach) - Add direct access to files via pkgset.RpmWrapper. (Tomas Kopecek) - Add documentation to django.auth.krb5. (Daniel Mach) - Fix worker key generation in kobo.hub.models.Worker.save(). (Daniel Mach) - Fix a security hole in krb5 middleware: a user was able to log in as different user to admin interface. (Daniel Mach) - Change Makefile to run tests before creating source tarball. (Daniel Mach) - Change HubProxy._hub verification to fix exceptions in Python2.6. (Martin Magr) - Another SQL performance improvement in Task admin. (Tomas Kopecek) - Set Task.parent as raw_id field to improve admin performance. (Daniel Mach) - Add (spent) time method to Task and display it in the admin listing. (Tomas Kopecek) * Fri Jul 24 2009 Fedora Release Engineering - 0.1.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Wed Jul 22 2009 Daniel Mach - 0.1.1-1 - Enhance types.Enum to support help_text and additonal options. Update tests for types module. (Daniel Mach) - Remove temp directory after file upload. (Tomas Kopecek) - Remove MANIFEST in make clean. (Daniel Mach) - Fix shortcuts.run to read complete stdout. (Jan Blazek) - Add rpmlib.get_file_list_from_header() which extracts file list, colors and checksums from a rpm header. (Daniel Mach) - Add get_digest_algo_from_header() function to read rpm digest algorithm. (Daniel Mach) - Update epydoc docstrings in kobo.rpmlib. (Daniel Mach) - Fix deadlock in run(). Use proc.poll() instead of proc.wait(). (Daniel Mach) - Update epydoc docstrings in kobo.shortcuts. (Daniel Mach) - Fix AtributeError when active_submenu is None. (Daniel Mach) - Return menu dict even if no menu is active. (Daniel Mach) - Do not allow to register plugins to PluginContainer base class. Add several tests. (Daniel Mach) - Add test runner. (Daniel Mach) - Add support for empty submenus. (Martin Magr) * Wed Jun 17 2009 Daniel Mach - 0.1.0-1 - first release