[copr/copr] branch master updated: Automatic commit of package
[copr-frontend] release [1.153-1].
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
dturecek pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 0a0da98 Automatic commit of package [copr-frontend] release [1.153-1].
0a0da98 is described below
commit 0a0da987f074279d5177049a5ebbfae6769396b7
Author: Dominik Turecek <dturecek(a)redhat.com>
AuthorDate: Wed Sep 4 09:01:26 2019 +0200
Automatic commit of package [copr-frontend] release [1.153-1].
Created by command:
/usr/bin/tito tag
---
.tito/packages/copr-frontend | 2 +-
frontend/copr-frontend.spec | 9 ++++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/.tito/packages/copr-frontend b/.tito/packages/copr-frontend
index 89eea70..4d41b82 100644
--- a/.tito/packages/copr-frontend
+++ b/.tito/packages/copr-frontend
@@ -1 +1 @@
-1.152-1 frontend/
+1.153-1 frontend/
diff --git a/frontend/copr-frontend.spec b/frontend/copr-frontend.spec
index 7329fd6..db21c37 100644
--- a/frontend/copr-frontend.spec
+++ b/frontend/copr-frontend.spec
@@ -41,7 +41,7 @@
}
Name: copr-frontend
-Version: 1.152
+Version: 1.153
Release: 1%{?dist}
Summary: Frontend for Copr
@@ -361,6 +361,13 @@ usermod -L copr-fe
%changelog
+* Wed Sep 04 2019 Dominik Turecek <dturecek(a)redhat.com> 1.153-1
+- admin permission check in 'can_build_in()' (issue#970)
+- better link to builder-live.log (issue#941)
+- hide unlisted projects from homepage in RSS
+- build srpm first
+- fixes traceback with invalid chroot name (issue#810)
+
* Wed Aug 28 2019 Dominik Turecek <dturecek(a)redhat.com> 1.152-1
- fix public dump for login to work after re-import (issue#912)
- optimize frontpage and fix recent builds page (issue#937)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 8 months
[copr/copr] branch master updated: frontend: admin permission check
in 'can_build_in()'
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new f4b1192 frontend: admin permission check in 'can_build_in()'
f4b1192 is described below
commit f4b119283841a29a54b8ff43b8068cebd7a79682
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Fri Aug 30 08:40:06 2019 +0200
frontend: admin permission check in 'can_build_in()'
Commit 8e8867b5a caused that we didn't compare the admin permissions of
the logged user, but the owner of copr we tried to build against.
Fix test-cases which didn't expect that the requesting user may be
admin, and add new test-case for the bug itself (that normal user can
not build in admin's project).
Fixes: #970
---
frontend/coprs_frontend/coprs/models.py | 2 +-
.../tests/test_views/test_coprs_ns/test_coprs_builds.py | 16 +++++++++++++++-
.../tests/test_views/test_coprs_ns/test_coprs_general.py | 4 ++--
3 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/models.py b/frontend/coprs_frontend/coprs/models.py
index cc600c0..ce8c61f 100644
--- a/frontend/coprs_frontend/coprs/models.py
+++ b/frontend/coprs_frontend/coprs/models.py
@@ -115,7 +115,7 @@ class User(db.Model, helpers.Serializer):
"""
Determine if this user can build in the given copr.
"""
- if copr.user.admin:
+ if self.admin:
return True
if copr.group:
if self.can_build_in_group(copr.group):
diff --git a/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_builds.py b/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_builds.py
index 0e98253..0b6d276 100644
--- a/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_builds.py
+++ b/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_builds.py
@@ -46,7 +46,9 @@ class TestCoprAddBuild(CoprsTestCase):
def test_copr_not_yet_allowed_user_cant_add_build(self, f_users, f_coprs,
f_copr_permissions, f_db):
- self.db.session.add_all([self.u2, self.c3])
+ self.u1.admin = False
+ self.db.session.add_all([self.u1, self.u2, self.c3])
+
self.test_client.post("/coprs/{0}/{1}/new_build/"
.format(self.u2.name, self.c3.name),
data={"pkgs": "http://example.com/testing.src.rpm"},
@@ -54,6 +56,18 @@ class TestCoprAddBuild(CoprsTestCase):
assert not self.models.Build.query.first()
+ @TransactionDecorator("u2")
+ def test_copr_user_cant_add_build_to_admin_project(self, f_users, f_coprs,
+ f_copr_permissions, f_db):
+ """ test for issue#970 """
+ self.db.session.add_all([self.u1, self.c1])
+ self.test_client.post("/coprs/{0}/{1}/new_build/"
+ .format(self.u1.name, self.c1.name),
+ data={"pkgs": "http://example.com/testing.src.rpm"},
+ follow_redirects=True)
+ assert not self.models.Build.query.first()
+
+
@TransactionDecorator("u3")
def test_copr_user_without_permission_cant_add_build(self, f_users,
f_coprs,
diff --git a/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_general.py b/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_general.py
index d0fa2b7..3468024 100644
--- a/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_general.py
+++ b/frontend/coprs_frontend/tests/test_views/test_coprs_ns/test_coprs_general.py
@@ -261,8 +261,8 @@ class TestCoprDetail(CoprsTestCase):
@TransactionDecorator("u1")
def test_copr_detail_doesnt_allow_non_submitter_to_cancel_build(
self, f_users, f_coprs, f_mock_chroots, f_builds, f_db):
-
- self.db.session.add_all([self.u2, self.c2])
+ self.u1.admin = False
+ self.db.session.add_all([self.u1, self.u2, self.c2])
r = self.test_client.get(
"/coprs/{0}/{1}/build/{2}/".format(self.u2.name, self.c2.name, self.c2.builds[0].id))
assert b"/cancel_build/" not in r.data
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 8 months
[copr/copr] branch master updated: frontend: better link to
builder-live.log
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 4aa9324 frontend: better link to builder-live.log
4aa9324 is described below
commit 4aa9324f41adf6de9cd2a00eab1e2fdb142d0bae
Author: Tomas Hrnciar <thrnciar(a)reedhat.com>
AuthorDate: Mon Aug 26 13:26:49 2019 +0200
frontend: better link to builder-live.log
show builder-log.gz instead of builder-log on build page when build has finished
and hide if it is still running
Fixes: #941
Merges: #945
---
frontend/coprs_frontend/coprs/models.py | 4 +++-
.../coprs_frontend/coprs/templates/coprs/detail/build.html | 11 +++++++----
2 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/models.py b/frontend/coprs_frontend/coprs/models.py
index b61510d..cc600c0 100644
--- a/frontend/coprs_frontend/coprs/models.py
+++ b/frontend/coprs_frontend/coprs/models.py
@@ -905,7 +905,9 @@ class Build(db.Model, helpers.Serializer):
@property
def import_log_url_backend(self):
parts = ["results", self.copr.owner_name, self.copr_dirname,
- "srpm-builds", self.id_fixed_width, "builder-live.log"]
+ "srpm-builds", self.id_fixed_width,
+ "builder-live.log" if self.source_status == StatusEnum("running")
+ else "builder-live.log.gz"]
path = os.path.normpath(os.path.join(*parts))
return urljoin(app.config["BACKEND_BASE_URL"], path)
diff --git a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
index e71e678..70df0d7 100644
--- a/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
+++ b/frontend/coprs_frontend/coprs/templates/coprs/detail/build.html
@@ -164,12 +164,15 @@
<dl class="dl-horizontal">
{{ describe_failure(build) }}
<dt>SRPM build log:</dt>
- <dd>
+ {% if build.source_status | state_from_num in ['pending', 'starting'] %}
+ <dd> Build has not started yet </dd>
+ {% endif %}
{% for url in build.get_import_log_urls(g.user.admin) %}
- <a href="{{ url }}">{{ url |basename }}</a>
- {{ "," if not loop.last }}
+ <dd>
+ <a href="{{ url }}">{{ url | basename }}</a>
+ {{ "," if not loop.last }}
+ </dd>
{% endfor %}
- </dd>
<dt> Built Packages:</dt>
{% if build.built_packages %}
{% for pkg in build.built_packages.split("\n"): %}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 8 months
[copr/copr] branch master updated (43e3f7c -> 3ff3cca)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
dturecek pushed a change to branch master
in repository copr/copr.
from 43e3f7c frontend: hide unlisted projects from homepage in RSS
add 3ff3cca frontend: don't shorten the json for /backend/get-build-task/
No new revisions were added by this update.
Summary of changes:
.../coprs/views/backend_ns/backend_general.py | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 8 months
[copr/copr] branch master updated: frontend: hide unlisted projects
from homepage in RSS
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new 43e3f7c frontend: hide unlisted projects from homepage in RSS
43e3f7c is described below
commit 43e3f7ccf8826bf052ab730718a07208482889d5
Author: Tomas Hrnciar <thrnciar(a)reedhat.com>
AuthorDate: Thu Aug 29 11:06:02 2019 +0200
frontend: hide unlisted projects from homepage in RSS
This commit removes unlisted project at homepage in RSS and
adds new RSS route /rss/all/ to show also unlisted projects.
Merges: #968
---
.../coprs_frontend/coprs/views/rss_ns/rss_general.py | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/views/rss_ns/rss_general.py b/frontend/coprs_frontend/coprs/views/rss_ns/rss_general.py
index 83c9f04..0b2803b 100644
--- a/frontend/coprs_frontend/coprs/views/rss_ns/rss_general.py
+++ b/frontend/coprs_frontend/coprs/views/rss_ns/rss_general.py
@@ -8,9 +8,8 @@ from flask import render_template, Response
from coprs import models
-(a)rss_ns.route("/", defaults={"limit": 200})
-(a)rss_ns.route("/<int:limit>/")
-def rss(limit=200):
+(a)rss_ns.route("/all", defaults={"limit": 200})
+def rss_all(limit=200):
"""
Simple route that returns all projects
name, description, link to selected project
@@ -21,5 +20,18 @@ def rss(limit=200):
coprs = CoprsLogic.get_all().order_by(models.Copr.id.desc()).limit(limit)
answer = render_template("rss/rss.xml", coprs=coprs)
+ return Response(answer, mimetype="text/xml")
+
+
+(a)rss_ns.route("/", defaults={"limit": 200})
+(a)rss_ns.route("/<int:limit>/")
+def rss(limit=200):
+ """
+ Simple route that returns all projects
+ name, description, link to selected project
+ as rss feed except projects hidden from homepage
+ """
+ coprs = CoprsLogic.get_multiple(include_unlisted_on_hp=False).order_by(models.Copr.id.desc()).limit(limit)
+ answer = render_template("rss/rss.xml", coprs=coprs)
return Response(answer, mimetype="text/xml")
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 8 months
[copr/copr] branch master updated: frontend: build srpm first
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a commit to branch master
in repository copr/copr.
The following commit(s) were added to refs/heads/master by this push:
new bbdf83f frontend: build srpm first
bbdf83f is described below
commit bbdf83fb73cfb91811cdb4cd944045d10de043f7
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Thu Aug 29 00:13:21 2019 +0200
frontend: build srpm first
This makes sure that we get everything imported to dist-git as soon as
possible, and it also makes the statistics more real (because we get the
build queue large very fast).
Merges: #967
---
frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py b/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py
index c344965..5e0f72c 100644
--- a/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py
+++ b/frontend/coprs_frontend/coprs/views/backend_ns/backend_general.py
@@ -181,8 +181,10 @@ def pending_jobs():
Return the job queue.
"""
srpm_tasks = [build for build in BuildsLogic.get_pending_srpm_build_tasks() if not build.blocked]
- build_records = ([get_build_record(task) for task in BuildsLogic.get_pending_build_tasks()] +
- [get_srpm_build_record(task) for task in srpm_tasks])
+ build_records = (
+ [get_srpm_build_record(task) for task in srpm_tasks] +
+ [get_build_record(task) for task in BuildsLogic.get_pending_build_tasks()]
+ )
log.info('Selected build records: {}'.format(build_records))
return flask.jsonify(build_records)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 8 months
[copr/copr] branch master updated (b299810 -> bae2964)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to branch master
in repository copr/copr.
from b299810 docs: how_to_upgrade_builders simplified
add bae2964 frontend: fixes traceback with invalid chroot name
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/coprs/__init__.py | 3 ++-
frontend/coprs_frontend/coprs/logic/coprs_logic.py | 3 +--
2 files changed, 3 insertions(+), 3 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 8 months
[copr/copr] branch master updated (155fcd2 -> b299810)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to branch master
in repository copr/copr.
from 155fcd2 releng: add fedora 31 to releasers
add b299810 docs: how_to_upgrade_builders simplified
No new revisions were added by this update.
Summary of changes:
doc/how_to_upgrade_builders.rst | 211 +++++++++++++++-------------------------
1 file changed, 81 insertions(+), 130 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years, 8 months