disable networking in Copr by default
by Pavel Raiskup
Just to be more pedantic and probably bit more secure, what about making
networking in copr opt-in (at least for new projects)?
If build of my package used internet arbitrarily, I would be warned very
early..
Also, in Koji we also do not have networking, so we can faster teach
(future) Fedora packagers.
Thanks for considering,
Pavel
7 years, 8 months
[PATCH] [python][cli] allow insecure connection if configured
by Richard Marko
Signed-off-by: Richard Marko <rmarko(a)fedoraproject.org>
---
frontend/coprs_frontend/coprs/templates/api.html | 1 +
python/copr/README.rst | 3 ++-
python/copr/client/client.py | 14 +++++++++++---
3 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/frontend/coprs_frontend/coprs/templates/api.html b/frontend/coprs_frontend/coprs/templates/api.html
index 9944d0e..9732c08 100644
--- a/frontend/coprs_frontend/coprs/templates/api.html
+++ b/frontend/coprs_frontend/coprs/templates/api.html
@@ -35,6 +35,7 @@ login = {{ g.user.api_login }}
username = {{ g.user.name }}
token = {{ g.user.api_token }}
copr_url = {{ ('https://' + config['PUBLIC_COPR_HOSTNAME'])| fix_url_https_frontend}}
+# insecure = no # set to yes to allow insecure connection
# expiration date: {{ g.user.api_token_expiration }}
</pre>
diff --git a/python/copr/README.rst b/python/copr/README.rst
index 8b3f708..be42f9d 100644
--- a/python/copr/README.rst
+++ b/python/copr/README.rst
@@ -31,6 +31,7 @@ Usage:
token="<token from /api>",
username="<copr username>",
copr_url="<url copr instance ; optional>"
+ insecure="<allow insecure connection; boolean optional>"
)
Alternatively you could use configuration file:
@@ -44,5 +45,5 @@ Alternatively you could use configuration file:
username = <insert here your copr username>
token = <insert here your API token>
copr_url = <insert here copr url>
-
+ insecure = <allow insecure connection; boolean optional>
diff --git a/python/copr/client/client.py b/python/copr/client/client.py
index 63f1395..901c901 100644
--- a/python/copr/client/client.py
+++ b/python/copr/client/client.py
@@ -67,19 +67,22 @@ class CoprClient(UnicodeMixin):
"""
def __init__(self, username=None, login=None, token=None, copr_url=None,
- no_config=False):
+ no_config=False, insecure=False):
"""
:param unicode username: username used by default for all requests
:param unicode login: user login, used for identification
:param unicode token: copr api token
:param unicode copr_url: used as copr projects root
:param bool no_config: helper flag to indicate that no config was provided
+ :param bool insecure: allow insecure connection (no SSL
+ certificate checking)
"""
self.token = token
self.login = login
self.username = username
self.copr_url = copr_url or "http://copr.fedoraproject.org/"
+ self.insecure = insecure
self.no_config = no_config
@@ -111,7 +114,7 @@ class CoprClient(UnicodeMixin):
"""
- raw_config = configparser.ConfigParser()
+ raw_config = configparser.ConfigParser({"insecure": False})
if not filepath:
filepath = os.path.join(os.path.expanduser("~"), ".config", "copr")
config = {}
@@ -124,7 +127,9 @@ class CoprClient(UnicodeMixin):
raise CoprNoConfException()
else:
try:
- for field in ["username", "login", "token", "copr_url"]:
+ for field in ["username", "login", "token", "copr_url",
+ "insecure"]:
+
if six.PY3:
config[field] = raw_config["copr-cli"].get(field, None)
else:
@@ -170,6 +175,9 @@ class CoprClient(UnicodeMixin):
kwargs["data"] = data
if files is not None:
kwargs["files"] = files
+ if self.insecure:
+ log.warn("Using insecure connection")
+ kwargs["verify"] = False
if method not in ["get", "post", "head", "delete", "put"]:
raise Exception("Method {0} not allowed".format(method))
--
2.4.3
7 years, 11 months
New version of Copr (includes dist-git)
by Miroslav Suchý
It is my pleasure to announce that we just upgraded
https://copr.fedoraproject.org
It includes several major improvements:
* UI converted to PatternFly [1]. Most visible change is that tables
(e.g. list of builds) can be sorted using any column and you can filter
visible rows using any value.
* dist-git support -- We store your SRPM in dist-git now. It is not
accessible directly using fedpkg (it is in plan later). Dist-git is
browsable via cgit [2]. This allows us to offer you upload of SRPM
directly from your workstation. Just navigate to:
New Build -> Upload SRPM
or if you upgrade to python-copr-1.58-1 (submitted to updates just
today) then you can do:
copr-cli build name/project ./some.src.rpm
While we assume that uploading SRPM will be most popular method, we
preserved option to pass SRPM url.
You can see new state of your build - "Importing". It is obviously the
moment when we import your SRPM into dist-git.
* In project properties (Edit tab) you can now add you email if you want
to be contacted by users in case of some problems with your project.
* We improved queue handling of various architectures. This should fix
those long waiting time of PPC64LE builds.
[1] https://www.patternfly.org/
[2] http://copr-dist-git.fedorainfracloud.org/cgit/
Mirek Suchý
7 years, 11 months
Copr update and new API
by Valentin Gologuzov
New version of Copr with preview of the new REST-like API.
Hi, I am very glad to announce another Copr upgrade!
We have some major features:
* Added support for the comps.xml [1]. It allows you to provides
installation groups in your Copr repository.
Comps can be uploaded in:
[details of your project] -> Edit -> Click on Edit beside selected
chroot -> Upload comps.xml
It will be automatically added to package repository next time you build
a package.
* If dist-git fails to import srpm, Copr now provides feedback with
failure description.
* Resubmit build is refactored, now it uses dist-git as a build source.
* Builds which failed during the import stage are now deletable.
* Lots of fixes and improvements in the frontend UI.
Last, but not least change, is a new API.
We aimed to provide a simple and well structured API which
covers as much Web UI functionality as possible.
Feel free to discover it [2] and read documentation [3].
This new API is not fixed yet,
we want to get your feedback and we may change it in future.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1237246
[2] https://copr.fedoraproject.org/api_2
[3] http://copr-rest-api.readthedocs.org/en/latest/
--
Best regards,
Gologuzov Valentin.
8 years
Builders now have 75 GB of disk space
by Miroslav Suchý
I changed configuration of Copr builders so Mock now have 75 GB of tmpfs available for building.
This was requested for building LibreOffice.
--
Miroslav Suchy, RHCA
Red Hat, Senior Software Engineer, #brno, #devexp, #fedora-buildsys
8 years