Permalink
Browse files

more comprehensive README

  • Loading branch information...
1 parent 72e163d commit 63c6da744f9f930c39e01861461bf3ab1cd11748 @mapleoin committed Jan 16, 2013
Showing with 26 additions and 6 deletions.
  1. +26 −6 README.rst
View
@@ -2,16 +2,35 @@
OBS service for downloading git tarballs
=========================================
-This is an `Open Build Service`_ source service.
+This is an `Open Build Service`_ source service. It downloads a tarball and parses its git ChangeLog file for information about recent changes which then go to the package's .changes file.
-Requires argparse which is part of python2.7, but available as a third-party dependency in python2.6.
+The ``Version`` field will be set to
+``%(tarball_version)s+git.%(timestamp)s.%(commit_sha)s``. Where
+``tarball_version`` is the version as read from the parent directory
+inside the downloaded tarball - everything after the last dash (``-``)
+in the directory's name. ``timestamp`` is the current seconds from the
+UNIX epoch when the source service was run (if there were new
+changes). ``commit_sha`` is the latest commit sha hash from the
+ChangeLog file.
-The ``git_tarballs`` service will also change the specfile's ``Source:`` to the
-``filename`` argument of the service and the ``%setup -q`` line to match the
-parent folder name in the tarball.
+The ``git_tarballs`` service will also change the specfile's ``Source:``
+to the ``filename`` argument of the service and the ``%setup -q`` line
+to match the parent folder name in the tarball.
+On the first run, ``git_tarballs`` will just set the spec file's
+``Version`` field to the latest git commit. The .changes file will only
+be updated with commit message information when newer commits (compared
+to the one now set in ``Version``) are found.
-TODO:
+Dependencies
+------------
+
+Requires argparse which is part of python2.7, but available as a
+third-party dependency in python2.6.
+
+The tests require `python-mock`_. To run them, just use ``nosetests`` or ``python -m unittest discover`` (on python2.7).
+
+TODO
* ignore Merge commits
* use current user's email address in .changes file
@@ -20,3 +39,4 @@ TODO:
.. _Open Build Service: http://openbuildservice.org/
+.. _python-mock: http://www.voidspace.org.uk/python/mock/mock.html

0 comments on commit 63c6da7

Please sign in to comment.