From ddec979477f4ea89d7feb570abb7ef81c445249498cdb5dc1048e51d24b7c5d6 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Mon, 18 May 2020 13:33:45 +0000 Subject: [PATCH] - Backport fix from upstream to fix stats page + Patch: 0001-Make-the-stats-page-use-the-new-stats-API-endpoint.patch - Add missing step to start pagure web services for nginx setup in quickstart - Fix directory mode for ssh directory to fix conflict with gitolite OBS-URL: https://build.opensuse.org/package/show/devel:tools:scm/pagure?expand=0&rev=34 --- ...-page-use-the-new-stats-API-endpoint.patch | 38 +++++++++++++++++++ pagure-README.SUSE | 1 + pagure.changes | 8 ++++ pagure.spec | 4 +- 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 0001-Make-the-stats-page-use-the-new-stats-API-endpoint.patch diff --git a/0001-Make-the-stats-page-use-the-new-stats-API-endpoint.patch b/0001-Make-the-stats-page-use-the-new-stats-API-endpoint.patch new file mode 100644 index 0000000..d61c521 --- /dev/null +++ b/0001-Make-the-stats-page-use-the-new-stats-API-endpoint.patch @@ -0,0 +1,38 @@ +From 990a357f8edb2a25b791be249dd10c889422b353 Mon Sep 17 00:00:00 2001 +From: Pierre-Yves Chibon +Date: Fri, 15 May 2020 14:19:30 +0200 +Subject: [PATCH] Make the stats page use the new stats API endpoint + +We originally designed this code to use the existing API endpoint +with an argument to say that it wants the detailed version of the +stats. We later changed our mind and move the details to a new +API endpoint, but apparently we forgot to update the UI to point +to the new API endpoint (while all the JS code is compatible/expected +this data). + +Signed-off-by: Pierre-Yves Chibon +--- + pagure/templates/repo_stats.html | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/pagure/templates/repo_stats.html b/pagure/templates/repo_stats.html +index 0e92b674..1f67477c 100644 +--- a/pagure/templates/repo_stats.html ++++ b/pagure/templates/repo_stats.html +@@ -64,11 +64,10 @@ issues_history_stats_plot_call = function() { + $("#commiter_list").hide(); + $(".commit_trend").hide(); + var _stats_url = "{{ url_for( +- 'api_ns.api_view_issues_history_stats', ++ 'api_ns.api_view_issues_history_detailed_stats', + repo=g.repo.name, + username=username, +- namespace=g.repo.namespace, +- detailed=True) }}"; ++ namespace=g.repo.namespace) }}"; + var _s = $("#data_stats_spinner"); + _s.html( + "" +-- +2.26.1 + diff --git a/pagure-README.SUSE b/pagure-README.SUSE index 1941a3c..cae1395 100644 --- a/pagure-README.SUSE +++ b/pagure-README.SUSE @@ -125,6 +125,7 @@ on whether or not you're using HTTPS and if you are using HTTPS, where your cert Option B: Nginx zypper install pagure-web-nginx +systemctl enable --now pagure_web.service pagure_docs_web.service B1. Edit /etc/nginx/vhosts.d/pagure.conf to set up web settings as appropriate. diff --git a/pagure.changes b/pagure.changes index 3c86072..a1fe1da 100644 --- a/pagure.changes +++ b/pagure.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon May 18 13:31:41 UTC 2020 - Neal Gompa + +- Backport fix from upstream to fix stats page + + Patch: 0001-Make-the-stats-page-use-the-new-stats-API-endpoint.patch +- Add missing step to start pagure web services for nginx setup in quickstart +- Fix directory mode for ssh directory to fix conflict with gitolite + ------------------------------------------------------------------- Fri May 15 01:05:30 UTC 2020 - Neal Gompa diff --git a/pagure.spec b/pagure.spec index 2c2139f..80bdacc 100644 --- a/pagure.spec +++ b/pagure.spec @@ -41,6 +41,8 @@ Source1: https://raw.githubusercontent.com/fedora-infra/python-fedora Source10: pagure-README.SUSE # Backports from upstream +## Backport fix to make stats page work +Patch0001: 0001-Make-the-stats-page-use-the-new-stats-API-endpoint.patch # SUSE-specific fixes @@ -631,7 +633,7 @@ echo "See %{_docdir}/%{name}/README.SUSE to continue" %attr(-,git,git) %dir /srv/gitolite/remotes %attr(-,git,git) %dir /srv/gitolite/repositories/{,docs,forks,requests,tickets} %attr(-,git,git) %dir /srv/gitolite/.gitolite/{,conf,keydir,logs} -%attr(700,git,git) %dir /srv/gitolite/.ssh +%attr(750,git,git) %dir /srv/gitolite/.ssh %attr(-,git,git) %config(noreplace) /srv/gitolite/.gitolite/conf/gitolite.conf %attr(-,git,git) %config(noreplace) /srv/gitolite/.gitolite.rc %attr(-,git,git) %dir /srv/www/pagure-releases