forked from pool/pagure
Accepting request 1178124 from devel:tools:scm
OBS-URL: https://build.opensuse.org/request/show/1178124 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pagure?expand=0&rev=26
This commit is contained in:
commit
d60f14969c
44
5486.patch
Normal file
44
5486.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 7abc9608afe37e28221d12afb5c2078518febf9f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dominik Wombacher <dominik@wombacher.cc>
|
||||||
|
Date: May 27 2024 18:52:55 +0000
|
||||||
|
Subject: [PATCH 1/2] fix(oidc): Edge case, avoid 'KeyError' after pagure update if a cached session is used
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/pagure/ui/oidc_login.py b/pagure/ui/oidc_login.py
|
||||||
|
index 2495387..225646b 100644
|
||||||
|
--- a/pagure/ui/oidc_login.py
|
||||||
|
+++ b/pagure/ui/oidc_login.py
|
||||||
|
@@ -34,6 +34,8 @@ _log = logging.getLogger(__name__)
|
||||||
|
def fas_user_from_oidc():
|
||||||
|
if "oidc_cached_userdata" in flask.session:
|
||||||
|
flask.g.fas_user = munch.Munch(**flask.session["oidc_cached_userdata"])
|
||||||
|
+ # Edge case, avoid 'KeyError' after pagure update if a cached session is used
|
||||||
|
+ flask.g.fas_user.can_create = flask.g.fas_user.get("can_create", False)
|
||||||
|
elif oidc.user_loggedin and "oidc_logintime" in flask.session:
|
||||||
|
email_key, fulln_key, usern_key, ssh_key, groups_key = [
|
||||||
|
pagure_config["OIDC_PAGURE_EMAIL"],
|
||||||
|
|
||||||
|
From 6ff9732cb86b305ebcc32cdb0e7ff578171f4dd1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dominik Wombacher <dominik@wombacher.cc>
|
||||||
|
Date: May 27 2024 18:54:54 +0000
|
||||||
|
Subject: [PATCH 2/2] fix(5.14.x): Use '==' instead of 'is' in template if condition because of old Jinja2 version on EL8
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/pagure/templates/master.html b/pagure/templates/master.html
|
||||||
|
index 4e2bc55..fa23194 100644
|
||||||
|
--- a/pagure/templates/master.html
|
||||||
|
+++ b/pagure/templates/master.html
|
||||||
|
@@ -40,7 +40,7 @@
|
||||||
|
{% if (config.get('ENABLE_NEW_PROJECTS', True) and config.get('ENABLE_UI_NEW_PROJECTS', True))
|
||||||
|
or config.get('ENABLE_GROUP_MNGT', False) %}
|
||||||
|
{#can_create is only defined if using OIDC so assume we cancreate #}
|
||||||
|
- {% if (g.fas_user.can_create is not defined) or (g.fas_user.can_create is true)%}
|
||||||
|
+ {% if (g.fas_user.can_create is not defined) or (g.fas_user.can_create == true)%}
|
||||||
|
<li class="nav-item dropdown ml-3">
|
||||||
|
<a class="nav-link dropdown-toggle font-weight-bold"
|
||||||
|
data-toggle="dropdown"
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f684d8193d4c4cf637b465c80cbfece6eb2b1646df3ec4f993adf75ea78d5a1a
|
|
||||||
size 22045766
|
|
3
pagure-5.14.1.tar.gz
Normal file
3
pagure-5.14.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4bdab80fb36b161cef6805dcadaa6db5513898e213ca15f9684be06d24b71a54
|
||||||
|
size 17738653
|
@ -1,3 +1,17 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jun 2 09:16:20 UTC 2024 - Dominik Wombacher <dominik@wombacher.cc>
|
||||||
|
|
||||||
|
- Backport patches to fix issues after 5.14.1 release (https://pagure.io/pagure/pull-request/5486)
|
||||||
|
+ fix(5.14.x): Use '==' instead of 'is' in template if condition because to work with old Jinja2 versions
|
||||||
|
+ fix(oidc): Edge case, avoid 'KeyError' after pagure update if a cached session is used
|
||||||
|
+ Patch: 5486.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun May 26 20:11:46 UTC 2024 - Georg Pfuetzenreuter <mail+rpm@georg-pfuetzenreuter.net>
|
||||||
|
|
||||||
|
- Update to 5.14.1
|
||||||
|
* no upstream changelog
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 3 16:57:56 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>
|
Tue May 3 16:57:56 UTC 2022 - Ferdinand Thiessen <rpm@fthiessen.de>
|
||||||
|
|
||||||
|
11
pagure.spec
11
pagure.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package pagure
|
# spec file for package pagure
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
# Copyright (c) 2021 Neal Gompa <ngompa13@gmail.com>.
|
# Copyright (c) 2021 Neal Gompa <ngompa13@gmail.com>.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@ -23,14 +23,14 @@
|
|||||||
%global __requires_exclude_from ^%{python3_sitelib}/pagure/.*$
|
%global __requires_exclude_from ^%{python3_sitelib}/pagure/.*$
|
||||||
|
|
||||||
Name: pagure
|
Name: pagure
|
||||||
Version: 5.13.3
|
Version: 5.14.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A git-centered forge
|
Summary: A git-centered forge
|
||||||
Group: Development/Tools/Version Control
|
Group: Development/Tools/Version Control
|
||||||
# Pagure itself is GPL-2.0-or-later; flask_fas_openid.py is LGPL-2.1-or-later
|
# Pagure itself is GPL-2.0-or-later; flask_fas_openid.py is LGPL-2.1-or-later
|
||||||
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
License: GPL-2.0-or-later AND LGPL-2.1-or-later
|
||||||
URL: https://pagure.io/pagure
|
URL: https://pagure.io/pagure
|
||||||
Source0: https://pagure.io/releases/pagure/%{name}-%{version}.tar.gz
|
Source0: https://pagure.io/pagure/archive/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
# Vendor in the single file from python-fedora that's needed
|
# Vendor in the single file from python-fedora that's needed
|
||||||
# This way, we avoid having to pull in all of python-fedora
|
# This way, we avoid having to pull in all of python-fedora
|
||||||
@ -45,6 +45,9 @@ Source10: pagure-README.SUSE
|
|||||||
# SUSE-specific fixes
|
# 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
|
Patch1000: pagure-5.0-default-example-cfg.patch
|
||||||
|
# PATCH-FIX-UPSTREAM 5486.patch https://pagure.io/pagure/pull-request/5486 dominik@wombacher.cc -- Use '==' instead of 'is' in template if condition because to work with older Jinja2 versions. Edge case, avoid 'KeyError' after pagure update if a cached session is used.
|
||||||
|
Patch1001: 5486.patch
|
||||||
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -613,7 +616,7 @@ echo "See %{_docdir}/%{name}/README.SUSE to continue"
|
|||||||
%systemd_postun_with_restart pagure_mirror.service
|
%systemd_postun_with_restart pagure_mirror.service
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.SUSE README.rst UPGRADING.rst doc/_build/html files/gitolite3.rc files/pagure.cfg.sample
|
%doc README.SUSE README.rst UPGRADING.rst files/gitolite3.rc files/pagure.cfg.sample
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%config(noreplace) %{_sysconfdir}/pagure/pagure.cfg
|
%config(noreplace) %{_sysconfdir}/pagure/pagure.cfg
|
||||||
%config(noreplace) %{_sysconfdir}/pagure/alembic.ini
|
%config(noreplace) %{_sysconfdir}/pagure/alembic.ini
|
||||||
|
Loading…
Reference in New Issue
Block a user