From 20f4ea69674a6347f2752b92e0df4ea2cc6f7ce3c4395f5229f6fd757a0c2a7e Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Fri, 29 Mar 2019 14:06:16 +0000 Subject: [PATCH] - Update to 5.4 + Allow by default the ACL "pull_request_create" on project-less API token + Implement Pagure Git Auth + Add a new API endpoint allowing to update an existing PR + If the user doesn't have a valid ssh key inform but let them log in + Fix various UI issues + Add a button to take/drop a pull-request + Add a new API endpoint to assign pull-request to someone + Allow dots and plus signs in project names + Fix seeing releases when the reference provided returned a commit + Include the PR tags in their JSON representation + Ensure that forking does not run the hook + Deprecate fedmsg for fedora-messaging - Backport fix for pagure-ev issues in Python 3 + Patch: 0001-pagure-ev-python-3-compatibility.patch - Add patch to allow SQLAlchemy 1.3.0+ with Pagure + Patch: 0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch - Update the service list to enable and start in README.SUSE OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/pagure?expand=0&rev=17 --- 0001-pagure-ev-python-3-compatibility.patch | 63 +++++++++++++++++++ ...vert-Add-a-upper-limit-to-sqlalchemy.patch | 36 +++++++++++ pagure-5.3.tar.gz | 3 - pagure-5.4.tar.gz | 3 + pagure-README.SUSE | 4 +- pagure.changes | 22 +++++++ pagure.spec | 15 ++++- 7 files changed, 140 insertions(+), 6 deletions(-) create mode 100644 0001-pagure-ev-python-3-compatibility.patch create mode 100644 0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch delete mode 100644 pagure-5.3.tar.gz create mode 100644 pagure-5.4.tar.gz diff --git a/0001-pagure-ev-python-3-compatibility.patch b/0001-pagure-ev-python-3-compatibility.patch new file mode 100644 index 0000000..7420a13 --- /dev/null +++ b/0001-pagure-ev-python-3-compatibility.patch @@ -0,0 +1,63 @@ +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/0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch b/0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch new file mode 100644 index 0000000..5c104f6 --- /dev/null +++ b/0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch @@ -0,0 +1,36 @@ +From ee99a5a4a503b5b1b6b6c20876fafafa4dd6b96a Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Fri, 29 Mar 2019 08:24:05 -0400 +Subject: [PATCH] Revert "Add a upper limit to sqlalchemy as 1.3.0 breaks our + tests" + +This is required so that Pagure is installable with SQLAlchemy 1.3.0+. +The issues that affect the tests are limited to the SQLite backend, +and do not affect production deployments using PostgreSQL or MySQL/MariaDB. + +This reverts commit b92a6f378bc81890ed2c1c70c84bce687238b617. +--- + requirements.txt | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/requirements.txt b/requirements.txt +index c877d94e..996fb063 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -26,12 +26,7 @@ python-openid-teams + redis + requests + six +-# sqlalchemy minimum 0.8 +-# sqlalchemy 1.3.0 is causing issues on the pip container leading +-# test_pagure_lib.py to raise a: +-# "(sqlite3.OperationalError) no such column: users.user" +-# in test_search_projects_private line 319 +-sqlalchemy < 1.3.0 ++sqlalchemy >= 0.8 + # 1.4.0 is broken, 1.4.0-post-1 works but gives odd results on newer setuptools + # the latest version 1.5.0 is also known to work + straight.plugin +-- +2.20.1 + diff --git a/pagure-5.3.tar.gz b/pagure-5.3.tar.gz deleted file mode 100644 index 64c3cab..0000000 --- a/pagure-5.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:593c1885d3d9083f5506a484b6a8d4beb0127929f6a19cccc263888bc4738e73 -size 21845839 diff --git a/pagure-5.4.tar.gz b/pagure-5.4.tar.gz new file mode 100644 index 0000000..54a8843 --- /dev/null +++ b/pagure-5.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d7e520ccbad15a7447fa1add72419ce793a3f8482ef55426ecbdbad5ecc61532 +size 21884635 diff --git a/pagure-README.SUSE b/pagure-README.SUSE index 9859d18..16613d5 100644 --- a/pagure-README.SUSE +++ b/pagure-README.SUSE @@ -100,7 +100,9 @@ firewall-cmd --add-service=https firewall-cmd --add-service=redis firewall-cmd --runtime-to-permanent -8. Enable and start pagure_worker and pagure_gitolite_worker +8. Enable and start pagure services + +systemctl enable --now pagure_worker pagure_gitolite_worker pagure_api_key_expire_mail.timer pagure_mirror_project_in.timer 9. Enable and start apache2, or restart if it's already running diff --git a/pagure.changes b/pagure.changes index df0c78b..559b359 100644 --- a/pagure.changes +++ b/pagure.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Fri Mar 29 13:50:54 UTC 2019 - Neal Gompa + +- Update to 5.4 + + Allow by default the ACL "pull_request_create" on project-less API token + + Implement Pagure Git Auth + + Add a new API endpoint allowing to update an existing PR + + If the user doesn't have a valid ssh key inform but let them log in + + Fix various UI issues + + Add a button to take/drop a pull-request + + Add a new API endpoint to assign pull-request to someone + + Allow dots and plus signs in project names + + Fix seeing releases when the reference provided returned a commit + + Include the PR tags in their JSON representation + + Ensure that forking does not run the hook + + Deprecate fedmsg for fedora-messaging +- Backport fix for pagure-ev issues in Python 3 + + Patch: 0001-pagure-ev-python-3-compatibility.patch +- Add patch to allow SQLAlchemy 1.3.0+ with Pagure + + Patch: 0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch +- Update the service list to enable and start in README.SUSE + ------------------------------------------------------------------- Fri Feb 22 15:16:39 UTC 2019 - Neal Gompa diff --git a/pagure.spec b/pagure.spec index b46233f..05443a2 100644 --- a/pagure.spec +++ b/pagure.spec @@ -23,7 +23,7 @@ Name: pagure -Version: 5.3 +Version: 5.4 Release: 0 Summary: A git-centered forge Group: Development/Tools/Version Control @@ -40,8 +40,16 @@ Source1: https://raw.githubusercontent.com/fedora-infra/python-fedora # SUSE-specific README providing a quickstart guide Source10: pagure-README.SUSE +# Backports from upstream +## Fix for pagure-ev issues in Python 3 +Patch0001: 0001-pagure-ev-python-3-compatibility.patch + +# Not yet upstreamable patches +## Allow Pagure to use SQLAlchemy >= 1.3.0 +Patch0501: 0501-Revert-Add-a-upper-limit-to-sqlalchemy.patch + # SUSE-specific fixes -# Change the defaults in the example config to match packaging +## Change the defaults in the example config to match packaging Patch1000: pagure-5.0-default-example-cfg.patch BuildArch: noarch @@ -130,6 +138,9 @@ Requires: %{name}-theme-default %{?systemd_requires} +# We use the git tools for some actions due to deficiencies in libgit2 and pygit2 +Requires: git-core + # No dependency of the app per se, but required to make it working. OrderWithRequires: gitolite >= 3.0 Requires(pre): gitolite >= 3.0