(no subject)
by Pierre-Yves Chibon
Hi,
Here are some patches for the copr-cli.
- Fix the exception generated when trying to read the copr_url from a
non-existant configuration file
- I rework the layout of the copr-cli list command, the table was not scaling
with projects having large description
- Add a man page for copr-cli to provide a little more documentation on where
and how to set the configuration file and what it should contain
With the changes made, at the end I went for bumping the version number to
0.2.0.
We might want to use the same version in the CLI as in the server. We won't be
able to import __version__ from the server as the CLI is independant from the
server, so we'll have to do this by hand.
Hope this helps,
Pierre
[PATCH 1/5] Fix parsing the copr_url from the configuration file
[PATCH 2/5] Rework the layout of the list command
[PATCH 3/5] Add a man page for copr-cli
[PATCH 4/5] Refer to the man page for more information about the
[PATCH 5/5] Bump the copr-cli release to 0.2.0 with all the changes
9 years, 9 months
[PATCH] Small fix in the copr-cli man page
by Pierre-Yves Chibon
---
man/copr-cli.1.asciidoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/copr-cli.1.asciidoc b/man/copr-cli.1.asciidoc
index 969fc43..892ba23 100644
--- a/man/copr-cli.1.asciidoc
+++ b/man/copr-cli.1.asciidoc
@@ -82,7 +82,7 @@ copr::
The copr repo to build the package in
pkgs::
-Package to build.
+Package to build. More precisely it should be URL to the src.rpm to build
API KEY
--
1.8.3.1
9 years, 10 months
[PATCH] Small fix in the copr-cli man page
by Pierre-Yves Chibon
---
man/copr-cli.1.asciidoc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/man/copr-cli.1.asciidoc b/man/copr-cli.1.asciidoc
index 969fc43..892ba23 100644
--- a/man/copr-cli.1.asciidoc
+++ b/man/copr-cli.1.asciidoc
@@ -82,7 +82,7 @@ copr::
The copr repo to build the package in
pkgs::
-Package to build.
+Package to build. More precisely it should be URL to the src.rpm to build
API KEY
--
1.8.3.1
9 years, 10 months
[PATCH 1/3] [backend] Handle additional macro specification in MockRemote
by Stanislav Ochotnicky
This way we will be able to pass additional macros to mock if needed. This is
needed to pass copr_username and copr_projectname macros but can be useful for
other use cases in the future
---
backend/mockremote.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/backend/mockremote.py b/backend/mockremote.py
index 75d7d2c..b266c7a 100755
--- a/backend/mockremote.py
+++ b/backend/mockremote.py
@@ -47,6 +47,7 @@ DEF_REPOS = []
DEF_CHROOT = None
DEF_USER = 'mockbuilder'
DEF_DESTDIR = os.getcwd()
+DEF_MACROS = {}
class SortedOptParser(optparse.OptionParser):
'''Optparser which sorts the options by opt before outputting --help'''
@@ -399,7 +400,8 @@ class MockRemote(object):
def __init__(self, builder=None, user=DEF_USER, timeout=DEF_TIMEOUT,
destdir=DEF_DESTDIR, chroot=DEF_CHROOT, cont=False, recurse=False,
repos=DEF_REPOS, callback=None,
- remote_basedir=DEF_REMOTE_BASEDIR, remote_tempdir=None):
+ remote_basedir=DEF_REMOTE_BASEDIR, remote_tempdir=None,
+ macros=DEF_MACROS):
self.destdir = destdir
self.chroot = chroot
@@ -409,6 +411,7 @@ class MockRemote(object):
self.callback = callback
self.remote_basedir = remote_basedir
self.remote_tempdir = remote_tempdir
+ self.macros = macros
if not self.callback:
self.callback = DefaultCallBack()
--
1.8.4
9 years, 10 months
[PATCH 1/2] [frontend] add yum_repos to coprs/user API call
by Michael Šimáček
---
coprs_frontend/coprs/logic/coprs_logic.py | 6 ++++++
coprs_frontend/coprs/views/api_ns/api_general.py | 15 ++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/coprs_frontend/coprs/logic/coprs_logic.py b/coprs_frontend/coprs/logic/coprs_logic.py
index 77599c5..5129a82 100644
--- a/coprs_frontend/coprs/logic/coprs_logic.py
+++ b/coprs_frontend/coprs/logic/coprs_logic.py
@@ -41,6 +41,7 @@ class CoprsLogic(object):
user_relation = kwargs.get('user_relation', None)
username = kwargs.get('username', None)
with_mock_chroots = kwargs.get('with_mock_chroots', None)
+ with_builds = kwargs.get('with_builds', None)
incl_deleted = kwargs.get('incl_deleted', None)
ids = kwargs.get('ids', None)
@@ -70,6 +71,11 @@ class CoprsLogic(object):
order_by(models.MockChroot.os_version.asc()).\
order_by(models.MockChroot.arch.asc())
+ if with_builds:
+ query = query.outerjoin(models.Copr.builds).\
+ options(db.contains_eager(models.Copr.builds)).\
+ order_by(models.Build.submitted_on.desc())
+
return query
@classmethod
diff --git a/coprs_frontend/coprs/views/api_ns/api_general.py b/coprs_frontend/coprs/views/api_ns/api_general.py
index 8d42745..97e4c03 100644
--- a/coprs_frontend/coprs/views/api_ns/api_general.py
+++ b/coprs_frontend/coprs/views/api_ns/api_general.py
@@ -3,6 +3,7 @@ import time
import base64
import flask
+import urlparse
from coprs import db
from coprs import exceptions
@@ -116,12 +117,21 @@ def api_coprs_by_owner(username=None):
httpcode = 200
if username:
query = coprs_logic.CoprsLogic.get_multiple(flask.g.user,
- user_relation='owned', username=username)
+ user_relation='owned', username=username, with_builds=True)
repos = query.all()
output = {'output': 'ok', 'repos': []}
for repo in repos:
+ yum_repos = {}
+ for build in repo.builds:
+ if build.results:
+ for chroot in repo.active_mock_chroots:
+ release = '{chroot.os_release}-{chroot.os_version}-{chroot.arch}'.format(chroot=chroot)
+ yum_repos[release] = urlparse.urljoin(build.results, release + '/')
+ break
+
output['repos'].append({'name': repo.name,
- 'repos': repo.repos,
+ 'additional_repos': repo.repos,
+ 'yum_repos': yum_repos,
'description': repo.description,
'instructions': repo.instructions})
else:
@@ -132,7 +142,6 @@ def api_coprs_by_owner(username=None):
jsonout.status_code = httpcode
return jsonout
-
@api_ns.route('/coprs/<username>/<coprname>/new_build/', methods=["POST"])
@api_login_required
def copr_new_build(username, coprname):
--
1.8.3.1
9 years, 10 months
Re: Build blocked
by Sylke Vicious
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ok, no problem i re-launch it.
It will be nice if that job can be removed. If it's not possible, it's
ok the same.
Thanks again for the quick reply! ;-)
Silvio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSjNoVAAoJELTlm30YURiGrmcQANdTFP9kxykcLE5cvcRAHmLX
TF/8cbrITZ+GjIHn+rVmDigGV5KWSltGTaP1hd9qVBy61O0Qh37Ys/xTv2wOHOs3
ZZSxTfwSrJJtkOxo5zWbkuAABgWoFWessZJpjMRKwmj+SNkjSPn1kklFW15rDJnQ
KSLqR51+s/odYYGwbNb4fUw7jLFT8K3lJLGnuN+W/gtbnkDnH5Rjs9WjinTQuIv9
A7kv7JmnQGRvnKnlKca7rEcFTwC5xouovJz9/PEWXWzJcJQ4bOeAfaBDpTqFS/jB
ppkr/tTc/jQ/7gml1M68ChI9Aqlt0lIlWWlnweE6fGrhu3PiftBoj2ZSBOrniE24
vYNH/cF5SSqWqTVJ42AROIWhQpQ5hIm5WXIAyLYKKGOnyIf0kSvtYdpz5Dedda+Z
KjESVnGuIACIfr7uJFhUpb3c1HSGTKjYpasDlxOtaiI7wLRJqQ8gpPTFWsfg+Cj9
LNehOuS9DXwaH/jtg90vFr/3Pw8PbMeHm4VZOgfEY3s8CvMsG+MzjhOBAQcTRD4u
ey3rYcrs8kQHfj2UzmL+qgB/wiIHXYvtoLuD+IHuIYCYovpDxSLrmvo25jZ+W9uQ
+you3tDc764MS5sbGrLO0a3AiTDT4IKMHxL/Sj8F+KZujtxFBbxMVtD/T0AzbEYV
pjoK+wF4h4cLudc2jx04
=Kcrh
-----END PGP SIGNATURE-----
9 years, 10 months
Build blocked
by Sylke Vicious
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Good day to everyone.
Yesterday evening i launched a new build (id 196). [0]
It usually takes around an hour to make all the job, but after almost
24h it still not have finished. Actually it still has to build for
Rawhide and F20.
Is it possible to unlock this situation?
Thanks in advance!
Silvio
[0]
http://copr-fe.cloud.fedoraproject.org/coprs/howcanuhavemyusername/Pumpa/...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSjNcvAAoJELTlm30YURiGDwkP/RMbg+sMdNEU3wVA90dGz3Wi
7niqMhjVqmJOa2Z/jyyp7TqrVwHjw/oM6QdflCUSDPPEtVpHfcOKBnZVZws5loxD
1QT57OCluIUtLcsdo+Xa6sU1vXIw0JXTJMBUfFO3GpZUxYO6/q0HbtuzBv1gKid7
7qvz8PD0e1e+pHXpq5QA/EHd8LKvwgqbWcZwJzaZw0mT1X5KXDdvvGpoxT0d5NH5
Sx4E/uPWTHLITIVmvKgkEopkc45TnvLY/+/KkDSnDkRVW8CWytUG3OHyV2Mc50GB
apN2GdfUn6fHK1VCvdRtiff3pm0k+W16HCGr73UniyLUBqLMNshYjrI3ejcCpveg
mZkR/ygvPNijOl9gbLKn3sKXgFdYs7/l4Skk5FH3W9iurCECbXVDoJrUyu9ZcLYh
CQcvA+G1iQ26zhbDVYpq0dJtRxOyGiuUO+KhgxWKXuBW5D+zyQxooGrkUtXUER/O
fYbJAC/efqQzsCLvfP/IU84XgUTqWlJZ7lpOSk+ibM9EApZ5RZ2ITCBzoOWmBTPn
GFbdvzvFoktxWKuXUsG/h5FZakQNOPL72HVjjIiNRZZU9ynX4/xheh8qSMB1i71+
4f0mVzxT+hTfemI+Dual4HvGHuDnrnbUxAA30GzeJ2qOlD+ywm583uyLaBWEQjsq
CKO7FKiS9XNA8OTE7k/8
=mos0
-----END PGP SIGNATURE-----
9 years, 10 months
[PATCH 1/2] [frontend] add yum_repos to coprs/user API call
by Michael Šimáček
---
coprs_frontend/coprs/logic/coprs_logic.py | 6 ++++++
coprs_frontend/coprs/views/api_ns/api_general.py | 15 ++++++++++++---
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/coprs_frontend/coprs/logic/coprs_logic.py b/coprs_frontend/coprs/logic/coprs_logic.py
index 77599c5..5129a82 100644
--- a/coprs_frontend/coprs/logic/coprs_logic.py
+++ b/coprs_frontend/coprs/logic/coprs_logic.py
@@ -41,6 +41,7 @@ class CoprsLogic(object):
user_relation = kwargs.get('user_relation', None)
username = kwargs.get('username', None)
with_mock_chroots = kwargs.get('with_mock_chroots', None)
+ with_builds = kwargs.get('with_builds', None)
incl_deleted = kwargs.get('incl_deleted', None)
ids = kwargs.get('ids', None)
@@ -70,6 +71,11 @@ class CoprsLogic(object):
order_by(models.MockChroot.os_version.asc()).\
order_by(models.MockChroot.arch.asc())
+ if with_builds:
+ query = query.outerjoin(models.Copr.builds).\
+ options(db.contains_eager(models.Copr.builds)).\
+ order_by(models.Build.submitted_on.desc())
+
return query
@classmethod
diff --git a/coprs_frontend/coprs/views/api_ns/api_general.py b/coprs_frontend/coprs/views/api_ns/api_general.py
index 8d42745..97e4c03 100644
--- a/coprs_frontend/coprs/views/api_ns/api_general.py
+++ b/coprs_frontend/coprs/views/api_ns/api_general.py
@@ -3,6 +3,7 @@ import time
import base64
import flask
+import urlparse
from coprs import db
from coprs import exceptions
@@ -116,12 +117,21 @@ def api_coprs_by_owner(username=None):
httpcode = 200
if username:
query = coprs_logic.CoprsLogic.get_multiple(flask.g.user,
- user_relation='owned', username=username)
+ user_relation='owned', username=username, with_builds=True)
repos = query.all()
output = {'output': 'ok', 'repos': []}
for repo in repos:
+ yum_repos = {}
+ for build in repo.builds:
+ if build.results:
+ for chroot in repo.active_mock_chroots:
+ release = '{chroot.os_release}-{chroot.os_version}-{chroot.arch}'.format(chroot=chroot)
+ yum_repos[release] = urlparse.urljoin(build.results, release + '/')
+ break
+
output['repos'].append({'name': repo.name,
- 'repos': repo.repos,
+ 'additional_repos': repo.repos,
+ 'yum_repos': yum_repos,
'description': repo.description,
'instructions': repo.instructions})
else:
@@ -132,7 +142,6 @@ def api_coprs_by_owner(username=None):
jsonout.status_code = httpcode
return jsonout
-
@api_ns.route('/coprs/<username>/<coprname>/new_build/', methods=["POST"])
@api_login_required
def copr_new_build(username, coprname):
--
1.8.3.1
9 years, 10 months
Signing Packages
by Sylke Vicious
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Good evening to everyone.
First of all, thanks to the people that make Copr, because is a
fantastic tool.
The question is: is it possible to sign packages? Or still in the todo
list? Because i can't find any way to do that.
Thanks in advance!
Silvio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJSik2SAAoJELTlm30YURiG0FMQALk+Yy7PhA7keo8H7SfZy6P8
1TLaH1chvo5eLBBFVL2pP56RRNLueQIDusmmPXC3PB091q185w6ErTqyxwtKW2Xh
vVtevxnhzNn0E2MlY8q42WfgdBNC7UGcfFg+IN+bISPsRAsiEDALOK+de0+SJqy/
NWXMlg2kBPWb0IySrQ9qq0oLpmvw/mPC6S9obirNktNrhcpmQ+hKuOsZjr2X5GoB
VGVdTfjkjm2OYxfsvB1iMHH/Piv7FPntL4zNt2FQ1w9iNlEsl1R1p0K4lkoDHIBt
dg6Utp52iUIA32iYU7ljSLkZJy6nhJkWhHeYMt5XZbRqtf1OAv347DWZQTLh1ZrL
NDMRACI7VYdG4B9uWi6kTXl+M1GJ4ZxKKjbt+zZn66DB8A3KUK51Gq5F7vs8eb6y
f2utPDZPBexVyTMmIMUhZBvPLXjCnuM7+Z2MmnqUXJTbCMel4sWAIUhLuKo8q7kR
CUUovJvbfavhfbHvUmAkz3U2bZXMB+gEhoZQI3egcDDurL/0TGZK0BNnxXfkL5pA
738MaehSC3vQCOri6PWhyfNyphPWwvS88cVh6k6Qg7hNjrsntSAmOpjymoVgLVST
dFzDa7MxQr12dJYweyTCRy6ma0CMfvM27eUmnvY0VvRe/Xr2FrDZcCLAOxdwC73R
HrlG06iqz2wiAxINXUi0
=VAaI
-----END PGP SIGNATURE-----
9 years, 10 months