From 383f784d47cf86891b9968d92381760baf883b9f Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Fri, 22 Jan 2016 03:28:18 +0100 Subject: [PATCH] COPR moved Signed-off-by: Patrick Uiterwijk --- Vagrantfile | 2 +- backend/docs/source/INSTALL.rst | 2 +- cli/copr_cli/README.rst | 4 ++-- cli/copr_cli/main.py | 2 +- cli/man/copr-cli.1.asciidoc | 4 ++-- dist-git/README | 2 +- frontend/coprs_frontend/config/copr.conf | 2 +- frontend/coprs_frontend/coprs/config.py | 2 +- frontend/coprs_frontend/coprs/rest_api/common.py | 2 +- .../coprs/templates/coprs/copr-repo-package.spec | 4 ++-- frontend/coprs_frontend/coprs/views/misc.py | 2 +- frontend/coprs_frontend/run/generate_repo_packages.py | 2 +- frontend/docs/api_2/source/Resources/build.rst | 12 ++++++------ frontend/docs/api_2/source/Resources/build_task.rst | 4 ++-- frontend/docs/api_2/source/Resources/mock_chroot.rst | 4 ++-- frontend/docs/api_2/source/Resources/project.rst | 10 +++++----- frontend/docs/api_2/source/Resources/project_chroot.rst | 10 +++++----- frontend/docs/api_2/source/index.rst | 4 ++-- python/copr/README.rst | 2 +- python/copr/client/client.py | 2 +- python/copr/client_v2/client.py | 4 ++-- python/copr/test/resources/copr_cli.conf | 2 +- python/docs/client_v2/initialization.rst | 2 +- python/docs/index.rst | 2 +- 24 files changed, 44 insertions(+), 44 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 89c43fa..099e10f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -25,7 +25,7 @@ Vagrant.configure(2) do |config| frontend.vm.provision "shell", # inline: "sudo dnf -y copr enable msuchy/copr" # WORKAROUND: old DNF plugin uses outdated .repo URL - inline: "sudo wget https://copr.fedoraproject.org/coprs/msuchy/copr/repo/fedora-21/msuchy-copr-fedora-21.repo -P /etc/yum.repos.d/" + inline: "sudo wget https://copr.fedorainfracloud.org/coprs/msuchy/copr/repo/fedora-21/msuchy-copr-fedora-21.repo -P /etc/yum.repos.d/" # Install build dependencies for Copr Frontend frontend.vm.provision "shell", diff --git a/backend/docs/source/INSTALL.rst b/backend/docs/source/INSTALL.rst index 742a0f9..372f8c0 100644 --- a/backend/docs/source/INSTALL.rst +++ b/backend/docs/source/INSTALL.rst @@ -3,7 +3,7 @@ INSTALL 1. Obtain rpms: -Get rpm either from upstream copr: https://copr.fedoraproject.org/coprs/msuchy/copr/ :: +Get rpm either from upstream copr: https://copr.fedorainfracloud.org/coprs/msuchy/copr/ :: dnf copr enable msuchy/copr dnf install -y copr-backend copr-selinux diff --git a/cli/copr_cli/README.rst b/cli/copr_cli/README.rst index b1488f8..2e7bbfd 100644 --- a/cli/copr_cli/README.rst +++ b/cli/copr_cli/README.rst @@ -32,7 +32,7 @@ Usage: .. _test instance: http://copr-fe-dev.cloud.fedoraproject.org/ - Create an account on copr `test instance`_ -- Go to the API page: http://copr.fedoraproject.org/api +- Go to the API page: https://copr.fedorainfracloud.org/api - Retrieve your API token - Create the file ``~/.config/copr`` - In this file add the following content @@ -44,7 +44,7 @@ Usage: username = login = token = - copr_url = https://copr.fedoraproject.org + copr_url = https://copr.fedorainfracloud.org You should be able to use copr-cli to list, create and build on copr. diff --git a/cli/copr_cli/main.py b/cli/copr_cli/main.py index 9471b33..71e7fad 100644 --- a/cli/copr_cli/main.py +++ b/cli/copr_cli/main.py @@ -48,7 +48,7 @@ class Commands(object): copr_exceptions.CoprConfigException): print(no_config_warning) self.client = CoprClient( - copr_url=u"http://copr.fedoraproject.org", + copr_url=u"https://copr.fedorainfracloud.org", no_config=True ) diff --git a/cli/man/copr-cli.1.asciidoc b/cli/man/copr-cli.1.asciidoc index c797453..1a84516 100644 --- a/cli/man/copr-cli.1.asciidoc +++ b/cli/man/copr-cli.1.asciidoc @@ -170,7 +170,7 @@ Normally, the exit code is 0 when everything goes well. But if not, we could get API KEY ------- -Visit the page https://copr.fedoraproject.org/api/ to obtain an API token. +Visit the page https://copr.fedorainfracloud.org/api/ to obtain an API token. This token must be saved in the file `~/.config/copr` in the following format: @@ -178,7 +178,7 @@ format: username = msuchy login = Y57wcg==##fkfaxbkjhuoiebfafadl token = vbfseelqdebzedukgombekmuvbkqwo - copr_url = https://copr.fedoraproject.org + copr_url = https://copr.fedorainfracloud.org Be aware that API tokens have an expiration date. The expiration date for your token is listed on the /api page. diff --git a/dist-git/README b/dist-git/README index 8dc64e7..f2dce4c 100644 --- a/dist-git/README +++ b/dist-git/README @@ -1,4 +1,4 @@ -0. enable https://copr.fedoraproject.org/coprs/asamalik/dist-git/ +0. enable https://copr.fedorainfracloud.org/coprs/asamalik/dist-git/ 1. install dist-git, copr-dist-git, cgit 2. create user copr-dist-git in groups cvsadmin, packager (groups from dist-git) 3. create user copr-service in groups packager, apache diff --git a/frontend/coprs_frontend/config/copr.conf b/frontend/coprs_frontend/config/copr.conf index 24aa384..0a5d30c 100644 --- a/frontend/coprs_frontend/config/copr.conf +++ b/frontend/coprs_frontend/config/copr.conf @@ -76,7 +76,7 @@ SEND_EMAILS = True # } #} -PUBLIC_COPR_HOSTNAME = "copr.fedoraproject.org" +PUBLIC_COPR_HOSTNAME = "copr.fedorainfracloud.org" DIST_GIT_URL = "http://copr-dist-git-dev.fedorainfracloud.org/cgit/" diff --git a/frontend/coprs_frontend/coprs/config.py b/frontend/coprs_frontend/coprs/config.py index 2b098df..6962697 100644 --- a/frontend/coprs_frontend/coprs/config.py +++ b/frontend/coprs_frontend/coprs/config.py @@ -59,7 +59,7 @@ class ProductionConfig(Config): # SECRET_KEY = "put_some_secret_here" # BACKEND_PASSWORD = "password_here" # SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://login:password@/db_name" - PUBLIC_COPR_HOSTNAME = "copr.fedoraproject.org" + PUBLIC_COPR_HOSTNAME = "copr.fedorainfracloud.org" class DevelopmentConfig(Config): diff --git a/frontend/coprs_frontend/coprs/rest_api/common.py b/frontend/coprs_frontend/coprs/rest_api/common.py index d554369..46116cf 100644 --- a/frontend/coprs_frontend/coprs/rest_api/common.py +++ b/frontend/coprs_frontend/coprs/rest_api/common.py @@ -107,7 +107,7 @@ def rest_api_auth_required(f): if not token_auth: message = ( "Login invalid/expired. " - "Please visit https://copr.fedoraproject.org/api " + "Please visit https://copr.fedorainfracloud.org/api " "get or renew your API token.") raise AuthFailed(message) diff --git a/frontend/coprs_frontend/coprs/templates/coprs/copr-repo-package.spec b/frontend/coprs_frontend/coprs/templates/coprs/copr-repo-package.spec index 858a192..c570f48 100644 --- a/frontend/coprs_frontend/coprs/templates/coprs/copr-repo-package.spec +++ b/frontend/coprs_frontend/coprs/templates/coprs/copr-repo-package.spec @@ -5,8 +5,8 @@ Summary: COPR %{user}/%{copr} Repository Configuration Group: System Environment/Base License: GPLv2+ -URL: https://copr.fedoraproject.org/coprs/%{user}/%{copr}/ -Source0: https://copr.fedoraproject.org/coprs/frostyx/tracer/repo/%{chroot}/%{user}-%{copr}-%{chroot}.repo +URL: https://copr.fedorainfracloud.org/coprs/%{user}/%{copr}/ +Source0: https://copr.fedorainfracloud.org/coprs/frostyx/tracer/repo/%{chroot}/%{user}-%{copr}-%{chroot}.repo BuildArch: noarch diff --git a/frontend/coprs_frontend/coprs/views/misc.py b/frontend/coprs_frontend/coprs/views/misc.py index 88f3a2f..b6ed1e2 100644 --- a/frontend/coprs_frontend/coprs/views/misc.py +++ b/frontend/coprs_frontend/coprs/views/misc.py @@ -248,7 +248,7 @@ def api_login_required(f): output = { "output": "notok", "error": "Login invalid/expired. " - "Please visit https://copr.fedoraproject.org/api " + "Please visit https://copr.fedorainfracloud.org/api " "get or renew your API token.", } jsonout = flask.jsonify(output) diff --git a/frontend/coprs_frontend/run/generate_repo_packages.py b/frontend/coprs_frontend/run/generate_repo_packages.py index 2ed2533..acdeb62 100644 --- a/frontend/coprs_frontend/run/generate_repo_packages.py +++ b/frontend/coprs_frontend/run/generate_repo_packages.py @@ -29,7 +29,7 @@ from coprs.logic.coprs_logic import CoprsLogic # ---------------------------------------------------------------------------------------------------------------------- hostname = app.config["PUBLIC_COPR_HOSTNAME"] -scheme = "https" if hostname == "copr.fedoraproject.org" else "http" # Workaround to broken enforce https on fe-dev +scheme = "https" if hostname == "copr.fedorainfracloud.org" else "http" # Workaround to broken enforce https on fe-dev FRONTEND_URL = "{}://{}".format(scheme, hostname) FRONTEND_DIR = os.path.dirname(here) diff --git a/frontend/docs/api_2/source/Resources/build.rst b/frontend/docs/api_2/source/Resources/build.rst index 485ff16..7beeb87 100644 --- a/frontend/docs/api_2/source/Resources/build.rst +++ b/frontend/docs/api_2/source/Resources/build.rst @@ -86,7 +86,7 @@ List builds .. sourcecode:: http GET /api_2/builds?project_id=3985&limit=1 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response**: @@ -183,7 +183,7 @@ From SRPM URL .. sourcecode:: http POST /api_2/builds HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string Content-Type: application/json @@ -245,7 +245,7 @@ MUST be uploaded as binary ``srpm`` file. .. sourcecode:: http POST /api_2/builds HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string Content-Length: xxxx Content-Type: multipart/form-data; boundary=--------------------31063722920652 @@ -321,7 +321,7 @@ Get build details .. sourcecode:: http GET /api_2/builds/106897?show_build_tasks=True HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response** @@ -407,7 +407,7 @@ Build cancellation is done be setting build state to ``cancelled``. .. sourcecode:: http PUT /api_2/builds/1 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string Content-Type: application/json @@ -441,7 +441,7 @@ Delete build .. sourcecode:: http DELETE /api_2/builds/1 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string **Response** diff --git a/frontend/docs/api_2/source/Resources/build_task.rst b/frontend/docs/api_2/source/Resources/build_task.rst index bca8d4c..80df11f 100644 --- a/frontend/docs/api_2/source/Resources/build_task.rst +++ b/frontend/docs/api_2/source/Resources/build_task.rst @@ -67,7 +67,7 @@ List build tasks .. sourcecode:: http GET /api_2/builds_tasks?build_id=106882 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response** @@ -124,7 +124,7 @@ Get build task details .. sourcecode:: http GET /api_2/build_tasks/106882/fedora-rawhide-x86_64 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response** diff --git a/frontend/docs/api_2/source/Resources/mock_chroot.rst b/frontend/docs/api_2/source/Resources/mock_chroot.rst index a1c8d9d..cee74da 100644 --- a/frontend/docs/api_2/source/Resources/mock_chroot.rst +++ b/frontend/docs/api_2/source/Resources/mock_chroot.rst @@ -44,7 +44,7 @@ List mock chroots .. sourcecode:: http GET /api_2/mock_chroots?active_only=True HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response**: @@ -95,7 +95,7 @@ Get mock chroot details .. sourcecode:: http GET /api_2/mock_chroots/fedora-rawhide-i386 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response** diff --git a/frontend/docs/api_2/source/Resources/project.rst b/frontend/docs/api_2/source/Resources/project.rst index d1f6d1c..f30c319 100644 --- a/frontend/docs/api_2/source/Resources/project.rst +++ b/frontend/docs/api_2/source/Resources/project.rst @@ -67,7 +67,7 @@ List projects .. sourcecode:: http GET /api_2/projects HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response**: @@ -124,7 +124,7 @@ Create new project .. sourcecode:: http POST /api_2/projects HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string Content-Type: application/json @@ -166,7 +166,7 @@ Get project details .. sourcecode:: http GET /api_2/projects/2482?show_chroots=True&show_builds=True HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response** @@ -258,7 +258,7 @@ Delete project .. sourcecode:: http DELETE /api_2/projects/1 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string **Response** @@ -289,7 +289,7 @@ Modify project .. sourcecode:: http PUT /api_2/projects/1 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string Content-Type: application/json diff --git a/frontend/docs/api_2/source/Resources/project_chroot.rst b/frontend/docs/api_2/source/Resources/project_chroot.rst index a35c8bf..64fbf77 100644 --- a/frontend/docs/api_2/source/Resources/project_chroot.rst +++ b/frontend/docs/api_2/source/Resources/project_chroot.rst @@ -47,7 +47,7 @@ List project chroots .. sourcecode:: http GET /api_2/projects/2482/chroots HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response** @@ -108,7 +108,7 @@ Enable chroot for project .. sourcecode:: http POST HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string Accept: application/json @@ -141,7 +141,7 @@ Get project chroot details .. sourcecode:: http GET /api_2/projects/2482/chroots/fedora-22-x86_64 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Accept: application/json **Response** @@ -192,7 +192,7 @@ Disable chroot for project .. sourcecode:: http DELETE /api_2/projects/2482/chroots/fedora-22-x86_64 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string **Response** @@ -222,7 +222,7 @@ Modify project chroot .. sourcecode:: http PUT /api_2/projects/2482/chroots/fedora-22-x86_64 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org Authorization: Basic base64=encoded=string { diff --git a/frontend/docs/api_2/source/index.rst b/frontend/docs/api_2/source/index.rst index 44c3c6c..efc2867 100644 --- a/frontend/docs/api_2/source/index.rst +++ b/frontend/docs/api_2/source/index.rst @@ -119,7 +119,7 @@ additional information would be present at key ``data``. .. sourcecode:: http GET /api_2/builds?project_id=999999999 HTTP/1.1 - Host: copr.fedoraproject.org + Host: copr.fedorainfracloud.org **Response** @@ -137,5 +137,5 @@ additional information would be present at key ``data``. .. _BasicAuth: https://en.wikipedia.org/wiki/Basic_access_authentication -.. _CoprAPI: https://copr.fedoraproject.org/api +.. _CoprAPI: https://copr.fedorainfracloud.org/api .. _HETEOAS: https://en.wikipedia.org/wiki/HATEOAS diff --git a/python/copr/README.rst b/python/copr/README.rst index 8b3f708..9046ddf 100644 --- a/python/copr/README.rst +++ b/python/copr/README.rst @@ -20,7 +20,7 @@ Usage: ------ - Create an account on copr instance -- Go to the API page: http://copr.fedoraproject.org/api +- Go to the API page: https://copr.fedorainfracloud.org/api - Retrieve your API login & token :: diff --git a/python/copr/client/client.py b/python/copr/client/client.py index 846017b..b6737a0 100644 --- a/python/copr/client/client.py +++ b/python/copr/client/client.py @@ -87,7 +87,7 @@ class CoprClient(UnicodeMixin): self.token = token self.login = login self.username = username - self.copr_url = copr_url or "http://copr.fedoraproject.org/" + self.copr_url = copr_url or "https://copr.fedorainfracloud.org/" self.no_config = no_config diff --git a/python/copr/client_v2/client.py b/python/copr/client_v2/client.py index fb1123e..4ab4547 100644 --- a/python/copr/client_v2/client.py +++ b/python/copr/client_v2/client.py @@ -90,7 +90,7 @@ class CoprClient(UnicodeMixin, HandlersProvider): """ self.nc = net_client - self.root_url = root_url or u"http://copr.fedoraproject.org" + self.root_url = root_url or u"https://copr.fedorainfracloud.org" self.no_config = no_config self._post_init_done = False @@ -165,7 +165,7 @@ class CoprClient(UnicodeMixin, HandlersProvider): def create_from_params(cls, root_url=None, login=None, token=None): """ Create client instance using the given parameters - :param str root_url: Url to the Copr service, default: "http://copr.fedoraproject.org" + :param str root_url: Url to the Copr service, default: "https://copr.fedorainfracloud.org" :param str login: api login :param str token: api token diff --git a/python/copr/test/resources/copr_cli.conf b/python/copr/test/resources/copr_cli.conf index 82d7d0e..ba6154c 100644 --- a/python/copr/test/resources/copr_cli.conf +++ b/python/copr/test/resources/copr_cli.conf @@ -2,5 +2,5 @@ login = api-login username = user_name token = api-token -copr_url = https://copr.fedoraproject.org +copr_url = https://copr.fedorainfracloud.org # expiration date: 2015-02-07 diff --git a/python/docs/client_v2/initialization.rst b/python/docs/client_v2/initialization.rst index e241dc8..54e6589 100644 --- a/python/docs/client_v2/initialization.rst +++ b/python/docs/client_v2/initialization.rst @@ -11,4 +11,4 @@ Config file should be generated by the Copr service itself (`Api info page`_). D -.. _`Api info page`: https://copr.fedoraproject.org/api/ +.. _`Api info page`: https://copr.fedorainfracloud.org/api/ diff --git a/python/docs/index.rst b/python/docs/index.rst index 8e75b14..714db3c 100644 --- a/python/docs/index.rst +++ b/python/docs/index.rst @@ -7,7 +7,7 @@ About ===== Python-copr is a python client to access the Copr build service -through its `API `_. +through its `API `_. Python-copr right now is in alpha stage, so expect lot of changes. Now it targets python 2.6+ and python3.3+. -- 2.4.3