From af0293b25994462a4b2e7207612007e1a6c3181e Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Thu, 31 Oct 2013 16:20:17 +0000 Subject: [PATCH] Zuul 1.3.0 * added in openstack-pkg-tools, that superseed get-orig-source * got rid of the 3 patches that were merged by upstream since 1.2.0 Build on Ubuntu Precise successfully. --- debian/changelog | 4 +- debian/control | 1 + ...ort-error-for-zuul-version-with-docs.patch | 29 --- ...-to-set-git-user.email-and-user.name.patch | 180 ------------------ ...ame-manpage-from-zuul-to-zuul-server.patch | 39 ---- debian/patches/series | 3 - debian/rules | 9 +- 7 files changed, 9 insertions(+), 256 deletions(-) delete mode 100644 debian/patches/0001-Fix-import-error-for-zuul-version-with-docs.patch delete mode 100644 debian/patches/0002-Add-the-ability-to-set-git-user.email-and-user.name.patch delete mode 100644 debian/patches/0003-doc-rename-manpage-from-zuul-to-zuul-server.patch diff --git a/debian/changelog b/debian/changelog index 502a5f8..b586d61 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -zuul (1.2.0-1) UNRELEASED; urgency=low +zuul (1.3.0-1) UNRELEASED; urgency=low * Initial release (Closes: #705844) - -- Paul Belanger Tue, 14 May 2013 19:27:22 -0400 + -- Paul Belanger Thu, 31 Oct 2013 16:57:26 +0000 diff --git a/debian/control b/debian/control index a3b945e..d6dd685 100644 --- a/debian/control +++ b/debian/control @@ -3,6 +3,7 @@ Maintainer: Paul Belanger Section: python Priority: optional Build-Depends: debhelper (>= 8.0.0), + openstack-pkg-tools, python (>= 2.6) Build-Depends-Indep: python-extras, diff --git a/debian/patches/0001-Fix-import-error-for-zuul-version-with-docs.patch b/debian/patches/0001-Fix-import-error-for-zuul-version-with-docs.patch deleted file mode 100644 index d9ce911..0000000 --- a/debian/patches/0001-Fix-import-error-for-zuul-version-with-docs.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 46b55c5a7461936fe332a016f45217b8ea134341 Mon Sep 17 00:00:00 2001 -From: Paul Belanger -Date: Wed, 27 Mar 2013 10:52:29 -0400 -Subject: [PATCH] Fix import error for zuul version with docs - -When using sphinx-build to generate documentation, it would fail to -properly find our version information. - -Change-Id: Iee14aa76b69ca9398688345cb2dcd0db9ecdaedc -Signed-off-by: Paul Belanger ---- - doc/source/conf.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/doc/source/conf.py b/doc/source/conf.py -index f357e29..2e05cc2 100644 ---- a/doc/source/conf.py -+++ b/doc/source/conf.py -@@ -16,7 +16,7 @@ import sys, os - # If extensions (or modules to document with autodoc) are in another directory, - # add these directories to sys.path here. If the directory is relative to the - # documentation root, use os.path.abspath to make it absolute, like shown here. --#sys.path.insert(0, os.path.abspath('.')) -+sys.path.insert(0, os.path.abspath('../..')) - - # -- General configuration ----------------------------------------------------- - --- -1.7.9.5 diff --git a/debian/patches/0002-Add-the-ability-to-set-git-user.email-and-user.name.patch b/debian/patches/0002-Add-the-ability-to-set-git-user.email-and-user.name.patch deleted file mode 100644 index 2ac1692..0000000 --- a/debian/patches/0002-Add-the-ability-to-set-git-user.email-and-user.name.patch +++ /dev/null @@ -1,180 +0,0 @@ -From b67aba1d94ee95399ed09bd287be16fbf558d8dc Mon Sep 17 00:00:00 2001 -From: Paul Belanger -Date: Mon, 13 May 2013 19:22:14 -0400 -Subject: [PATCH] Add the ability to set git user.email and user.name - -It is possible the host system does not have git properly configured, -which results in merge failures because the git client is complain. For -example: - - GitCommandError: 'git merge FETCH_HEAD' returned exit status 128: - *** Please tell me who you are. - - Run - - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - - to set your account's default identity. - Omit --global to set the identity only in this repository. - -Now we can pass user.name and user.email settings to git, if configured -to do so. - -Change-Id: I896194d8d1f5334026954b02f3a1a8dd82bed2ac -Signed-off-by: Paul Belanger -Reviewed-on: https://review.openstack.org/29015 -Reviewed-by: James E. Blair -Approved: Clark Boylan -Reviewed-by: Clark Boylan -Tested-by: Jenkins ---- - doc/source/zuul.rst | 8 ++++++++ - etc/zuul.conf-sample | 2 ++ - tests/fixtures/zuul.conf | 2 ++ - tests/test_scheduler.py | 4 ++++ - zuul/merger.py | 15 ++++++++++++--- - zuul/scheduler.py | 12 +++++++++++- - 6 files changed, 39 insertions(+), 4 deletions(-) - -diff --git a/doc/source/zuul.rst b/doc/source/zuul.rst -index 96faf86..2899fdd 100644 ---- a/doc/source/zuul.rst -+++ b/doc/source/zuul.rst -@@ -94,6 +94,14 @@ zuul - Directory that Zuul should clone local git repositories to. - ``git_dir=/var/lib/zuul/git`` - -+**git_user_email** -+ Optional: Value to pass to `git config user.email`. -+ ``git_user_email=zuul@example.com`` -+ -+**git_user_name** -+ Optional: Value to pass to `git config user.name`. -+ ``git_user_name=zuul`` -+ - **push_change_refs** - Boolean value (``true`` or ``false``) that determines if Zuul should - push change refs to the git origin server for the git repositories in -diff --git a/etc/zuul.conf-sample b/etc/zuul.conf-sample -index 75d1ca5..47e1d7e 100644 ---- a/etc/zuul.conf-sample -+++ b/etc/zuul.conf-sample -@@ -15,4 +15,6 @@ log_config=/etc/zuul/logging.conf - pidfile=/var/run/zuul/zuul.pid - state_dir=/var/lib/zuul - git_dir=/var/lib/zuul/git -+;git_user_email=zuul@example.com -+;git_user_name=zuul - status_url=https://jenkins.example.com/zuul/status -diff --git a/tests/fixtures/zuul.conf b/tests/fixtures/zuul.conf -index c031ae3..3054c23 100644 ---- a/tests/fixtures/zuul.conf -+++ b/tests/fixtures/zuul.conf -@@ -11,5 +11,7 @@ sshkey=none - [zuul] - layout_config=layout.yaml - git_dir=/tmp/zuul-test/git -+git_user_email=zuul@example.com -+git_user_name=zuul - push_change_refs=true - url_pattern=http://logs.example.com/{change.number}/{change.patchset}/{pipeline.name}/{job.name}/{build.number} -diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py -index 508af42..2d5fff3 100644 ---- a/tests/test_scheduler.py -+++ b/tests/test_scheduler.py -@@ -74,6 +74,10 @@ def init_repo(project): - path = os.path.join(UPSTREAM_ROOT, project) - repo = git.Repo.init(path) - -+ repo.config_writer().set_value('user', 'email', 'user@example.com') -+ repo.config_writer().set_value('user', 'name', 'User Name') -+ repo.config_writer().write() -+ - fn = os.path.join(path, 'README') - f = open(fn, 'w') - f.write("test\n") -diff --git a/zuul/merger.py b/zuul/merger.py -index 7ad7eed..aaffa43 100644 ---- a/zuul/merger.py -+++ b/zuul/merger.py -@@ -26,11 +26,16 @@ class ZuulReference(git.Reference): - class Repo(object): - log = logging.getLogger("zuul.Repo") - -- def __init__(self, remote, local): -+ def __init__(self, remote, local, email, username): - self.remote_url = remote - self.local_path = local - self._ensure_cloned() - self.repo = git.Repo(self.local_path) -+ if email: -+ self.repo.config_writer().set_value('user', 'email', email) -+ if username: -+ self.repo.config_writer().set_value('user', 'name', username) -+ self.repo.config_writer().write() - - def _ensure_cloned(self): - if not os.path.exists(self.local_path): -@@ -117,7 +122,8 @@ class Repo(object): - class Merger(object): - log = logging.getLogger("zuul.Merger") - -- def __init__(self, trigger, working_root, push_refs, sshkey): -+ def __init__(self, trigger, working_root, push_refs, sshkey, email, -+ username): - self.trigger = trigger - self.repos = {} - self.working_root = working_root -@@ -126,6 +132,8 @@ class Merger(object): - self.push_refs = push_refs - if sshkey: - self._makeSSHWrapper(sshkey) -+ self.email = email -+ self.username = username - - def _makeSSHWrapper(self, key): - name = os.path.join(self.working_root, '.ssh_wrapper') -@@ -139,7 +147,8 @@ class Merger(object): - def addProject(self, project, url): - try: - path = os.path.join(self.working_root, project.name) -- repo = Repo(url, path) -+ repo = Repo(url, path, self.email, self.username) -+ - self.repos[project] = repo - except: - self.log.exception("Unable to initialize repo for %s" % project) -diff --git a/zuul/scheduler.py b/zuul/scheduler.py -index 8ff5a27..cf862e3 100644 ---- a/zuul/scheduler.py -+++ b/zuul/scheduler.py -@@ -246,6 +246,16 @@ class Scheduler(threading.Thread): - else: - merge_root = '/var/lib/zuul/git' - -+ if self.config.has_option('zuul', 'git_user_email'): -+ merge_email = self.config.get('zuul', 'git_user_email') -+ else: -+ merge_email = None -+ -+ if self.config.has_option('zuul', 'git_user_name'): -+ merge_name = self.config.get('zuul', 'git_user_name') -+ else: -+ merge_name = None -+ - if self.config.has_option('zuul', 'push_change_refs'): - push_refs = self.config.getboolean('zuul', 'push_change_refs') - else: -@@ -257,7 +267,7 @@ class Scheduler(threading.Thread): - sshkey = None - - self.merger = merger.Merger(self.trigger, merge_root, push_refs, -- sshkey) -+ sshkey, merge_email, merge_name) - for project in self.projects.values(): - url = self.trigger.getGitUrl(project) - self.merger.addProject(project, url) --- -1.7.9.5 - diff --git a/debian/patches/0003-doc-rename-manpage-from-zuul-to-zuul-server.patch b/debian/patches/0003-doc-rename-manpage-from-zuul-to-zuul-server.patch deleted file mode 100644 index 52adb93..0000000 --- a/debian/patches/0003-doc-rename-manpage-from-zuul-to-zuul-server.patch +++ /dev/null @@ -1,39 +0,0 @@ -From d5dcfd7d202ff384232bef0b097367f36728102d Mon Sep 17 00:00:00 2001 -From: Antoine Musso -Date: Wed, 15 May 2013 22:13:17 +0200 -Subject: [PATCH] doc: rename manpage from `zuul` to `zuul-server` - -On Debian, all binaries should have an associated manpage. While -building Zuul package we got the following lintian error: - - W: zuul: binary-without-manpage usr/bin/zuul-server - -This is easily fixed by making sphinx to name the man page zuul-server. - -Change-Id: Ie9fa681654a8e7e8785c1dcfa5ec21ba27ae3049 -Reviewed-on: https://review.openstack.org/29287 -Reviewed-by: James E. Blair -Reviewed-by: Paul Belanger -Approved: Clark Boylan -Reviewed-by: Clark Boylan -Tested-by: Jenkins ---- - doc/source/conf.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/doc/source/conf.py b/doc/source/conf.py -index 2e05cc2..6943bd4 100644 ---- a/doc/source/conf.py -+++ b/doc/source/conf.py -@@ -216,7 +216,7 @@ latex_documents = [ - # One entry per manual page. List of tuples - # (source start file, name, description, authors, manual section). - man_pages = [ -- ('index', 'zuul', u'Zuul Documentation', -+ ('index', 'zuul-server', u'Zuul Documentation', - [u'OpenStack'], 1) - ] - --- -1.8.2.3 - diff --git a/debian/patches/series b/debian/patches/series index 113abcd..e69de29 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +0,0 @@ -0001-Fix-import-error-for-zuul-version-with-docs.patch -0002-Add-the-ability-to-set-git-user.email-and-user.name.patch -0003-doc-rename-manpage-from-zuul-to-zuul-server.patch diff --git a/debian/rules b/debian/rules index 40c4daa..d7c9807 100755 --- a/debian/rules +++ b/debian/rules @@ -3,6 +3,12 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +UPSTREAM_GIT = git://github.com/openstack-infra/zuul.git + +include /usr/share/openstack-pkg-tools/pkgos.make + +export OSLO_PACKAGE_VERSION=$(VERSION) + %: dh $@ --with python2,sphinxdoc @@ -24,6 +30,3 @@ override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) nosetests endif - -get-orig-source: - uscan --noconf --force-download --rename --repack --destdir=.