[copr] master: Automatic commit of package [copr] release [1.28-1]. (d9f6a41)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit d9f6a416d007250078b0412a86117d6530a82bf1
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Feb 27 10:56:41 2014 +0100
Automatic commit of package [copr] release [1.28-1].
>---------------------------------------------------------------
copr.spec | 5 ++++-
rel-eng/packages/copr | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/copr.spec b/copr.spec
index f0d7ba5..5c8a2f4 100644
--- a/copr.spec
+++ b/copr.spec
@@ -9,7 +9,7 @@
%global modulename copr
Name: copr
-Version: 1.27
+Version: 1.28
Release: 1%{?dist}
Summary: Cool Other Package Repo
@@ -411,6 +411,9 @@ fi
%endif # with_server
%changelog
+* Thu Feb 27 2014 Miroslav Suchý <msuchy(a)redhat.com> 1.28-1
+- [backend] - pass lock to Actions
+
* Wed Feb 26 2014 Miroslav Suchý <msuchy(a)redhat.com> 1.27-1
- [frontend] update to jquery 1.11.0
- [fronted] link username to fas
diff --git a/rel-eng/packages/copr b/rel-eng/packages/copr
index 7d36413..af8d66b 100644
--- a/rel-eng/packages/copr
+++ b/rel-eng/packages/copr
@@ -1 +1 @@
-1.27-1 ./
+1.28-1 ./
10 years, 1 month
[copr] master: [backend] - pass lock to Actions (656967d)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 656967db4f047d768963db088ccaea61de6a3a63
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Thu Feb 27 10:16:39 2014 +0100
[backend] - pass lock to Actions
addressing:
Process jobgrab:
Traceback (most recent call last):
File "/usr/lib64/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/share/copr/copr-be.py", line 103, in run
self.fetch_jobs()
File "/usr/share/copr/copr-be.py", line 96, in fetch_jobs
ao.run()
File "/usr/share/copr/backend/actions.py", line 66, in run
rc, out, err = createrepo(os.path.join(path, chroot))
>---------------------------------------------------------------
backend/actions.py | 5 +++--
backend/mockremote.py | 2 +-
copr-be.py | 11 ++++++-----
3 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/backend/actions.py b/backend/actions.py
index fdb6eaa..63dafed 100644
--- a/backend/actions.py
+++ b/backend/actions.py
@@ -11,12 +11,13 @@ class Action(object):
""" Object to send data back to fronted """
- def __init__(self, opts, events, action):
+ def __init__(self, opts, events, action, lock):
super(Action, self).__init__()
self.frontend_callback = FrontendCallback(opts)
self.destdir = opts.destdir
self.data = action
self.events = events
+ self.lock = lock
def event(self, what):
self.events.put({"when": time.time(), "who": "action", "what": what})
@@ -63,7 +64,7 @@ class Action(object):
if altered:
self.event("Running createrepo")
- rc, out, err = createrepo(os.path.join(path, chroot))
+ rc, out, err = createrepo(os.path.join(path, chroot), self.lock)
if err.strip():
self.event(
"Error making local repo: {0}".format(err))
diff --git a/backend/mockremote.py b/backend/mockremote.py
index bba46e3..d2f4767 100755
--- a/backend/mockremote.py
+++ b/backend/mockremote.py
@@ -62,7 +62,7 @@ class SortedOptParser(optparse.OptionParser):
return optparse.OptionParser.format_help(self, formatter=None)
-def createrepo(path, lock):
+def createrepo(path, lock=None):
if os.path.exists(path + '/repodata/repomd.xml'):
comm = ['/usr/bin/createrepo_c', '--database', '--ignore-lock',
'--update', path]
diff --git a/copr-be.py b/copr-be.py
index e5f3554..8dea940 100755
--- a/copr-be.py
+++ b/copr-be.py
@@ -40,7 +40,7 @@ class CoprJobGrab(multiprocessing.Process):
- submit them to the jobs queue for workers
"""
- def __init__(self, opts, events, jobs):
+ def __init__(self, opts, events, jobs, lock):
# base class initialization
multiprocessing.Process.__init__(self, name="jobgrab")
@@ -48,6 +48,7 @@ class CoprJobGrab(multiprocessing.Process):
self.events = events
self.jobs = jobs
self.added_jobs = []
+ self.lock = lock
def event(self, what):
self.events.put({"when": time.time(), "who": "jobgrab", "what": what})
@@ -92,7 +93,7 @@ class CoprJobGrab(multiprocessing.Process):
len(r_json["actions"])))
for action in r_json["actions"]:
- ao = Action(self.opts, self.events, action)
+ ao = Action(self.opts, self.events, action, self.lock)
ao.run()
def run(self):
@@ -179,6 +180,7 @@ class CoprBackend(object):
self.config_file = config_file
self.ext_opts = ext_opts # to stow our cli options for read_conf()
self.opts = self.read_conf()
+ self.lock = multiprocessing.Lock()
# job is a path to a jobfile on the localfs
self.jobs = multiprocessing.Queue()
@@ -192,7 +194,7 @@ class CoprBackend(object):
self.event("Starting up Job Grabber")
# create job grabber
- self._jobgrab = CoprJobGrab(self.opts, self.events, self.jobs)
+ self._jobgrab = CoprJobGrab(self.opts, self.events, self.jobs, self.lock)
self._jobgrab.start()
if not os.path.exists(self.opts.worker_logdir):
@@ -270,10 +272,9 @@ class CoprBackend(object):
self.event("Spinning up more workers for jobs")
for _ in range(self.opts.num_workers - len(self.workers)):
worker_num = len(self.workers) + 1
- lock = multiprocessing.Lock()
w = Worker(
self.opts, self.jobs, self.events, worker_num,
- lock=lock)
+ lock=self.lock)
self.workers.append(w)
w.start()
self.event("Finished starting worker processes")
10 years, 1 month
[copr] master: Automatic commit of package [copr] release [1.27-1]. (ee87319)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit ee873194d1a7de4ed27b0eb54f46c781455872c0
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Wed Feb 26 23:34:56 2014 +0100
Automatic commit of package [copr] release [1.27-1].
>---------------------------------------------------------------
copr.spec | 31 ++++++++++++++++++++++++++++++-
rel-eng/packages/copr | 2 +-
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/copr.spec b/copr.spec
index 720c54e..f0d7ba5 100644
--- a/copr.spec
+++ b/copr.spec
@@ -9,7 +9,7 @@
%global modulename copr
Name: copr
-Version: 1.26
+Version: 1.27
Release: 1%{?dist}
Summary: Cool Other Package Repo
@@ -411,6 +411,35 @@ fi
%endif # with_server
%changelog
+* Wed Feb 26 2014 Miroslav Suchý <msuchy(a)redhat.com> 1.27-1
+- [frontend] update to jquery 1.11.0
+- [fronted] link username to fas
+- [cli] allow to build into projects of other users
+- [backend] do not create repo in destdir
+- [backend] ensure that only one createrepo is running at the same time
+- [cli] allow to get data from sent build
+- temporary workaround for BZ 1065251
+- Chroot details API now uses GET instead of POST
+- when deleting/canceling task, go to same page
+- add copr modification to web api
+- 1063311 - admin should be able to delete task
+- [frontend] Stray end tag h4.
+- [frontend] another s/coprs/projects/ rename
+- [frontend] provide info about last successfull build
+- [spec] rhel5 needs group definition even in subpackage
+- [frontend] move 'you agree' text to dd
+- [frontend] add margin to chroots-set
+- [frontend] add margin to field label
+- [frontend] put disclaimer to paragraph tags
+- [frontend] use black font color
+- [frontend] use default filter instead of *_not_filled
+- [frontend] use markdown template filter
+- [frontend] use isdigit instead of is_int
+- [frontend] move Serializer to helpers
+- [frontend] fix coding style and py3 compatibility
+- [cli] fix coding style and py3 compatibility
+- [backend] fix coding style and py3 compatibility
+
* Tue Jan 28 2014 Miroslav Suchý <miroslav(a)suchy.cz> 1.26-1
- lower testing date
- move localized_time into filters
diff --git a/rel-eng/packages/copr b/rel-eng/packages/copr
index cd95b1f..7d36413 100644
--- a/rel-eng/packages/copr
+++ b/rel-eng/packages/copr
@@ -1 +1 @@
-1.26-1 ./
+1.27-1 ./
10 years, 1 month
[copr] master: [cli] correctly pass username (48f3ef9)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 48f3ef93b10b732ef09f3f80859eddbad324f54e
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Feb 25 16:57:49 2014 +0100
[cli] correctly pass username
>---------------------------------------------------------------
copr_cli/subcommands.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/copr_cli/subcommands.py b/copr_cli/subcommands.py
index 91fa6ab..7d8d574 100644
--- a/copr_cli/subcommands.py
+++ b/copr_cli/subcommands.py
@@ -201,7 +201,7 @@ def build(copr, pkgs, memory, timeout, wait=True, result=None):
copr_api_url = get_api_url()
URL = "{0}/coprs/{1}/{2}/new_build/".format(
copr_api_url,
- user["username"],
+ username,
copr)
data = {"pkgs": " ".join(pkgs),
10 years, 1 month
[copr] master: [frontend] update to jquery 1.11.0 (b66665e)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit b66665ecb193512ddfefdca55dde304bb1394a85
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Feb 25 14:53:44 2014 +0100
[frontend] update to jquery 1.11.0
>---------------------------------------------------------------
coprs_frontend/coprs/templates/layout.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/coprs_frontend/coprs/templates/layout.html b/coprs_frontend/coprs/templates/layout.html
index ec4c1e9..5a607bc 100644
--- a/coprs_frontend/coprs/templates/layout.html
+++ b/coprs_frontend/coprs/templates/layout.html
@@ -3,7 +3,7 @@
<head>
<title>{% block title %}Coprs Build System{% endblock %}</title>
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='copr.css') }}">
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
+ <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/vnd.microsoft.icon">
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
<script src="{{ url_for('static', filename='copr.js') }}"></script>
10 years, 1 month
[copr] master: [frontend] correctly address lock variable (e60b11a)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit e60b11a76196b2cce5a11234d9d9043080087506
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Feb 25 14:53:12 2014 +0100
[frontend] correctly address lock variable
>---------------------------------------------------------------
backend/dispatcher.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/backend/dispatcher.py b/backend/dispatcher.py
index 436b9e4..8b6fb0f 100644
--- a/backend/dispatcher.py
+++ b/backend/dispatcher.py
@@ -470,7 +470,7 @@ class Worker(multiprocessing.Process):
recurse=True,
repos=chroot_repos,
macros=macros,
- lock=lock,
+ lock=self.lock,
buildroot_pkgs=job.buildroot_pkgs,
callback=mockremote.CliLogCallBack(
quiet=True, logfn=chrootlogfile))
10 years, 1 month
[copr] master: [fronted] link username to fas (18f553b)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit 18f553b2d6f83a57f569355c564b5034e8e1f76c
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Feb 25 10:49:11 2014 +0100
[fronted] link username to fas
>---------------------------------------------------------------
coprs_frontend/coprs/templates/layout.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/coprs_frontend/coprs/templates/layout.html b/coprs_frontend/coprs/templates/layout.html
index 9bb4322..ec4c1e9 100644
--- a/coprs_frontend/coprs/templates/layout.html
+++ b/coprs_frontend/coprs/templates/layout.html
@@ -14,7 +14,7 @@
<a href="{{ url_for('coprs_ns.coprs_show') }}"><img id="logo" src="{{ url_for('static', filename='copr_logo.png') }}" alt="Copr Build System"></a>
<div class="login">
{% if g.user %}
- <div><span class="text">logged in as </span>{{ g.user.name }} | <a href="{{ url_for('misc.logout') }}">log out</a></div>
+ <div><span class="text">logged in as </span><a href="https://admin.fedoraproject.org/accounts/user/view/{{ g.user.name }}">{{ g.user.name }}</a> | <a href="{{ url_for('misc.logout') }}">log out</a></div>
{% else %}
<div><a href="{{ url_for('misc.login') }}">log in</a> | <a href="https://admin.fedoraproject.org/accounts/user/new">sign up</a></div>
{% endif %}
10 years, 1 month
[copr] master: [cli] allow to build into projects of other users (ef24243)
by Miroslav Suchý
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : master
>---------------------------------------------------------------
commit ef2424329be4fbfd9a9438531d50ad3310ad88a5
Author: Miroslav Suchý <msuchy(a)redhat.com>
Date: Tue Feb 25 10:31:19 2014 +0100
[cli] allow to build into projects of other users
>---------------------------------------------------------------
copr_cli/main.py | 2 +-
copr_cli/subcommands.py | 18 +++++++++++++-----
man/copr-cli.1.asciidoc | 4 +++-
3 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/copr_cli/main.py b/copr_cli/main.py
index 9644471..96775f5 100644
--- a/copr_cli/main.py
+++ b/copr_cli/main.py
@@ -94,7 +94,7 @@ def setup_parser():
help="Build packages to a "
"specified copr")
parser_build.add_argument("copr",
- help="The copr repo to build the package in"
+ help="The copr repo to build the package in. Can just name of project or even in format username/project."
)
parser_build.add_argument("pkgs", nargs="+",
help="URL of packages to build")
diff --git a/copr_cli/subcommands.py b/copr_cli/subcommands.py
index 53a4fab..91fa6ab 100644
--- a/copr_cli/subcommands.py
+++ b/copr_cli/subcommands.py
@@ -5,14 +5,14 @@ Function actually doing the work of calling the API and handling the
output.
"""
+import ConfigParser
+import datetime
+import json
import os
+import re
+import requests
import sys
import time
-import json
-import datetime
-import ConfigParser
-
-import requests
import copr_exceptions
@@ -190,6 +190,14 @@ def build(copr, pkgs, memory, timeout, wait=True, result=None):
And "id" and "status" otherwise.
"""
user = get_user()
+ username = user["username"]
+
+ # if you specify copr as username/foo, retrieve and cut username
+ m = re.match(r"(\w+)/(\w+)", copr)
+ if m:
+ username = m.group(1)
+ copr = m.group(2)
+
copr_api_url = get_api_url()
URL = "{0}/coprs/{1}/{2}/new_build/".format(
copr_api_url,
diff --git a/man/copr-cli.1.asciidoc b/man/copr-cli.1.asciidoc
index b29e081..295efba 100644
--- a/man/copr-cli.1.asciidoc
+++ b/man/copr-cli.1.asciidoc
@@ -85,7 +85,9 @@ Override timeout for this build
Don't wait for build completion
copr::
-The copr repo to build the package in
+The copr repo to build the package in. This can be simple name of some of your projects. Or
+you can specify it as username/project. This way you can build into project of somebody else
+if you are allowed to.
pkg_url::
URL of package to build. Package must be placed on some public web of ftp, from where it can
10 years, 1 month