From 7389b432de9ef6ea9964197041d1e55a963ce7385f9f2f37f05b91913eb81211 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Tue, 9 Apr 2019 13:09:48 +0000 Subject: [PATCH] - Update to 5.5 + Add support for !owner to the API listing projects + Make sure that TemporaryClone.push also pushes tags + Various UI improvements + Allow blocking an user on a project + Replace calls to pygit2.clone_repository by calls to git clone directly + Make fork more performant by using 'git push --mirror' + Use the user's default email when rebasing - Drop patch that is part of this release + 0001-pagure-ev-python-3-compatibility.patch - Backport fix for pull mirroring service + 0001-Couple-of-fixes-for-the-mirroring-in-feature.patch OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/pagure?expand=0&rev=19 --- ...f-fixes-for-the-mirroring-in-feature.patch | 52 +++++++++++++++ 0001-pagure-ev-python-3-compatibility.patch | 63 ------------------- pagure-5.4.tar.gz | 3 - pagure-5.5.tar.gz | 3 + pagure.changes | 16 +++++ pagure.spec | 6 +- 6 files changed, 74 insertions(+), 69 deletions(-) create mode 100644 0001-Couple-of-fixes-for-the-mirroring-in-feature.patch delete mode 100644 0001-pagure-ev-python-3-compatibility.patch delete mode 100644 pagure-5.4.tar.gz create mode 100644 pagure-5.5.tar.gz diff --git a/0001-Couple-of-fixes-for-the-mirroring-in-feature.patch b/0001-Couple-of-fixes-for-the-mirroring-in-feature.patch new file mode 100644 index 0000000..fe27134 --- /dev/null +++ b/0001-Couple-of-fixes-for-the-mirroring-in-feature.patch @@ -0,0 +1,52 @@ +From cea8e24f3eb1280c88230981ef624d0f0b9e638c Mon Sep 17 00:00:00 2001 +From: Pierre-Yves Chibon +Date: Mon, 8 Apr 2019 11:57:21 +0200 +Subject: [PATCH] Couple of fixes for the mirroring-in feature + +This commit does a couple of fixes in the code used for the mirroring-in +feature. +It ensures any exception thrown by pagure.lib.git.mirror_pull_project are +caught and properly logged. Otherwise, the script dies in the middle of +the processing. +It also checks that there is a remote before doing anything and if there +is no remote, it just bails. + +Signed-off-by: Pierre-Yves Chibon +--- + files/mirror_project_in.py | 5 ++++- + pagure/lib/git.py | 3 +++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/files/mirror_project_in.py b/files/mirror_project_in.py +index cfca629b..ba04f2fc 100644 +--- a/files/mirror_project_in.py ++++ b/files/mirror_project_in.py +@@ -34,7 +34,10 @@ def main(check=False, debug=False): + for project in projects: + if debug: + print("Mirrorring %s" % project.fullname) +- pagure.lib.git.mirror_pull_project(session, project, debug=debug) ++ try: ++ pagure.lib.git.mirror_pull_project(session, project, debug=debug) ++ except Exception as err: ++ print("ERROR: %s" % err) + + session.remove() + if debug: +diff --git a/pagure/lib/git.py b/pagure/lib/git.py +index 31253c11..c0e6d023 100644 +--- a/pagure/lib/git.py ++++ b/pagure/lib/git.py +@@ -2846,6 +2846,9 @@ def generate_archive(project, commit, tag, name, archive_fmt): + def mirror_pull_project(session, project, debug=False): + """ Mirror locally a project from a remote URL. """ + remote = project.mirrored_from ++ if not remote: ++ _log.info("No remote found, ignoring") ++ return + repopath = tempfile.mkdtemp(prefix="pagure-mirror_in-") + lclrepopath = pagure.utils.get_repo_path(project) + +-- +2.20.1 + diff --git a/0001-pagure-ev-python-3-compatibility.patch b/0001-pagure-ev-python-3-compatibility.patch deleted file mode 100644 index 7420a13..0000000 --- a/0001-pagure-ev-python-3-compatibility.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 47a9abb72e96fac3b03ecefb021a4ec1e8fc95f3 Mon Sep 17 00:00:00 2001 -From: Julen Landa Alustiza -Date: Thu, 14 Mar 2019 12:56:06 +0100 -Subject: [PATCH] pagure-ev: python 3 compatibility - ---- - pagure-ev/pagure_stream_server.py | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/pagure-ev/pagure_stream_server.py b/pagure-ev/pagure_stream_server.py -index 0e4a99a1..4439c917 100644 ---- a/pagure-ev/pagure_stream_server.py -+++ b/pagure-ev/pagure_stream_server.py -@@ -26,7 +26,7 @@ import os - - - import redis --from trololio import asyncio as trololio -+import trololio - - from six.moves.urllib.parse import urlparse - -@@ -137,7 +137,7 @@ def handle_client(client_reader, client_writer): - data = None - while True: - # give client a chance to respond, timeout after 10 seconds -- line = yield trololio.From(trololio.wait_for( -+ line = yield trololio.From(trololio.asyncio.wait_for( - client_reader.readline(), - timeout=10.0)) - if not line.decode().strip(): -@@ -199,7 +199,7 @@ def handle_client(client_reader, client_writer): - oncall = 0 - oncall += 1 - yield trololio.From(client_writer.drain()) -- yield trololio.From(trololio.sleep(1)) -+ yield trololio.From(trololio.asyncio.sleep(1)) - else: - log.info("Sending %s", msg['data']) - client_writer.write(('data: %s\n\n' % msg['data']).encode()) -@@ -243,8 +243,8 @@ def main(): - _get_session() - - try: -- loop = trololio.get_event_loop() -- coro = trololio.start_server( -+ loop = trololio.asyncio.get_event_loop() -+ coro = trololio.asyncio.start_server( - handle_client, - host=None, - port=pagure.config.config['EVENTSOURCE_PORT'], -@@ -253,7 +253,7 @@ def main(): - log.info( - 'Serving server at {}'.format(SERVER.sockets[0].getsockname())) - if pagure.config.config.get('EV_STATS_PORT'): -- stats_coro = trololio.start_server( -+ stats_coro = trololio.asyncio.start_server( - stats, - host=None, - port=pagure.config.config.get('EV_STATS_PORT'), --- -2.20.1 - diff --git a/pagure-5.4.tar.gz b/pagure-5.4.tar.gz deleted file mode 100644 index 54a8843..0000000 --- a/pagure-5.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d7e520ccbad15a7447fa1add72419ce793a3f8482ef55426ecbdbad5ecc61532 -size 21884635 diff --git a/pagure-5.5.tar.gz b/pagure-5.5.tar.gz new file mode 100644 index 0000000..32f1053 --- /dev/null +++ b/pagure-5.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:814841db86fd6199b42a48e636cb920b86f9666148d806a387735f2f327817ba +size 21716088 diff --git a/pagure.changes b/pagure.changes index 559b359..0f27dc1 100644 --- a/pagure.changes +++ b/pagure.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Tue Apr 9 12:52:31 UTC 2019 - Neal Gompa + +- Update to 5.5 + + Add support for !owner to the API listing projects + + Make sure that TemporaryClone.push also pushes tags + + Various UI improvements + + Allow blocking an user on a project + + Replace calls to pygit2.clone_repository by calls to git clone directly + + Make fork more performant by using 'git push --mirror' + + Use the user's default email when rebasing +- Drop patch that is part of this release + + 0001-pagure-ev-python-3-compatibility.patch +- Backport fix for pull mirroring service + + 0001-Couple-of-fixes-for-the-mirroring-in-feature.patch + ------------------------------------------------------------------- Fri Mar 29 13:50:54 UTC 2019 - Neal Gompa diff --git a/pagure.spec b/pagure.spec index 05443a2..b825ebc 100644 --- a/pagure.spec +++ b/pagure.spec @@ -23,7 +23,7 @@ Name: pagure -Version: 5.4 +Version: 5.5 Release: 0 Summary: A git-centered forge Group: Development/Tools/Version Control @@ -41,8 +41,8 @@ Source1: https://raw.githubusercontent.com/fedora-infra/python-fedora Source10: pagure-README.SUSE # Backports from upstream -## Fix for pagure-ev issues in Python 3 -Patch0001: 0001-pagure-ev-python-3-compatibility.patch +## Fix pull mirror service functionality +Patch0001: 0001-Couple-of-fixes-for-the-mirroring-in-feature.patch # Not yet upstreamable patches ## Allow Pagure to use SQLAlchemy >= 1.3.0