[copr/copr] branch master updated (db27873 -> 2cf5f03)
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 db27873 rpmbuild: invent /etc/copr-rpmbuild/mock-config-overrides
add 2cf5f03 backend: refactor action handlers to their separate classes
No new revisions were added by this update.
Summary of changes:
backend/backend/actions.py | 254 ++++++++++++++++----------------
backend/run/copr-backend-process-action | 7 +-
backend/tests/test_action.py | 58 ++++----
3 files changed, 163 insertions(+), 156 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years
[copr/copr] branch master updated (541ed19 -> db27873)
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 541ed19 Automatic commit of package [copr-cli] release [1.86-1].
new 5ef004e rpmbuild: restore /etc/mock/**.rpmnew files automatically
new db27873 rpmbuild: invent /etc/copr-rpmbuild/mock-config-overrides
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
rpmbuild/copr-rpmbuild.spec | 41 +++++++++++++++++++++++++++++++++++++++--
1 file changed, 39 insertions(+), 2 deletions(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years
[copr/copr] annotated tag copr-cli-1.86-1 created (now 0c28ca0)
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
praiskup pushed a change to annotated tag copr-cli-1.86-1
in repository copr/copr.
at 0c28ca0 (tag)
tagging 541ed191a3078e2175241e3100c353a17058c831 (commit)
replaces copr-frontend-1.164-1
by Pavel Raiskup
on Wed Mar 18 10:38:39 2020 +0100
- Log -----------------------------------------------------------------
Tagging package [copr-cli] version [copr-cli-1.86-1] in directory [cli/].
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new 541ed19 Automatic commit of package [copr-cli] release [1.86-1].
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years
[copr/copr] branch master updated: Automatic commit of package
[copr-cli] release [1.86-1].
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 541ed19 Automatic commit of package [copr-cli] release [1.86-1].
541ed19 is described below
commit 541ed191a3078e2175241e3100c353a17058c831
Author: Pavel Raiskup <praiskup(a)redhat.com>
AuthorDate: Wed Mar 18 10:38:39 2020 +0100
Automatic commit of package [copr-cli] release [1.86-1].
Created by command:
/usr/bin/tito tag
---
.tito/packages/copr-cli | 2 +-
cli/copr-cli.spec | 6 +++++-
cli/setup.py | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/.tito/packages/copr-cli b/.tito/packages/copr-cli
index 9d1cb29..9dc1e9c 100644
--- a/.tito/packages/copr-cli
+++ b/.tito/packages/copr-cli
@@ -1 +1 @@
-1.85-1 cli/
+1.86-1 cli/
diff --git a/cli/copr-cli.spec b/cli/copr-cli.spec
index a18cd9a..61cd0b0 100644
--- a/cli/copr-cli.spec
+++ b/cli/copr-cli.spec
@@ -7,7 +7,7 @@
%endif
Name: copr-cli
-Version: 1.85
+Version: 1.86
Release: 1%{?dist}
Summary: Command line interface for COPR
@@ -123,6 +123,10 @@ install -m 755 copr_cli/package_build_order.py %{buildroot}/%{_bindir}/package-b
%changelog
+* Wed Mar 18 2020 Pavel Raiskup <praiskup(a)redhat.com> 1.86-1
+- add script to list package build order in copr or koji
+- fix `copr mock-config` to use `dnf.conf/yum.conf` automatically
+
* Wed Feb 05 2020 Pavel Raiskup <praiskup(a)redhat.com> 1.85-1
- new 'copr-cli build-module --distgit DISTGIT' option
- make build-package honor the --background flag
diff --git a/cli/setup.py b/cli/setup.py
index 1b8153f..40486ef 100644
--- a/cli/setup.py
+++ b/cli/setup.py
@@ -29,7 +29,7 @@ __url__ = "https://pagure.io/copr/copr"
setup(
name=__name__,
- version="1.85",
+ version="1.86",
description=__description__,
long_description=long_description,
author=__author__,
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years
[copr/copr] branch master updated: cli: add script to list package
build order in copr or koji
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 6851f23 cli: add script to list package build order in copr or koji
6851f23 is described below
commit 6851f23de150e4ff8e5a1e11dd94b99136ed2e75
Author: Dominik Turecek <dturecek(a)redhat.com>
AuthorDate: Tue Mar 17 12:48:35 2020 +0100
cli: add script to list package build order in copr or koji
Merges: #1291
---
cli/copr-cli.spec | 3 +
cli/copr_cli/package_build_order.py | 142 ++++++++++++++++++++++++++++++++++++
2 files changed, 145 insertions(+)
diff --git a/cli/copr-cli.spec b/cli/copr-cli.spec
index c3a9480..a18cd9a 100644
--- a/cli/copr-cli.spec
+++ b/cli/copr-cli.spec
@@ -32,6 +32,7 @@ Requires: python3-copr >= 1.89
Requires: python3-jinja2
Requires: python3-simplejson
Requires: python3-humanize
+Requires: python3-koji
Recommends: python3-progress
@@ -99,6 +100,7 @@ install -p man/copr.1 %{buildroot}/%{_mandir}/man1/
install -d %{buildroot}%{_datadir}/cheat
cp -a man/copr-cli.cheat %{buildroot}%{_datadir}/cheat/copr-cli
ln -s %{_datadir}/cheat/copr-cli %{buildroot}%{_datadir}/cheat/copr
+install -m 755 copr_cli/package_build_order.py %{buildroot}/%{_bindir}/package-build-order
%check
@@ -117,6 +119,7 @@ ln -s %{_datadir}/cheat/copr-cli %{buildroot}%{_datadir}/cheat/copr
%{_datadir}/cheat/copr-cli
%{_datadir}/cheat/copr
%{python_sitelib}/*
+%{_bindir}/package-build-order
%changelog
diff --git a/cli/copr_cli/package_build_order.py b/cli/copr_cli/package_build_order.py
new file mode 100755
index 0000000..38da2d0
--- /dev/null
+++ b/cli/copr_cli/package_build_order.py
@@ -0,0 +1,142 @@
+#!/usr/bin/python3
+"""List packages of a given copr project in the order in which they were built."""
+
+import os
+import sys
+import argparse
+from configparser import ConfigParser
+
+from copr.v3 import BuildProxy, BuildChrootProxy, config_from_file
+from copr.v3.exceptions import CoprNoConfigException, CoprNoResultException, CoprRequestException
+
+from koji import ClientSession, GenericError, BUILD_STATES
+
+
+def package_order_from_copr(args):
+ """List package build order from Copr"""
+ if not args.project:
+ print("You need to specify Copr project to list package build order.")
+ sys.exit(1)
+
+ if not args.config:
+ args.config = "~/.config/copr"
+
+ try:
+ config_file = config_from_file(args.config)
+ except CoprNoConfigException:
+ print("Couldn't find copr config file at {0}.".format(args.config))
+ sys.exit(1)
+
+ try:
+ build_proxy = BuildProxy(config_file)
+ build_chroot_proxy = BuildChrootProxy(config_file)
+ project = args.project.split("/")
+ username = project[0]
+ projectname = project[1]
+ build_list = build_proxy.get_list(username, projectname)
+ except CoprNoResultException:
+ print("No copr project {0}/{1}.".format(username, projectname))
+ sys.exit(1)
+ except CoprRequestException:
+ print("Failed to get information from Copr.")
+ sys.exit(1)
+
+ build_list.reverse()
+ processed_packages = []
+ for build in build_list:
+ if args.chroot and args.chroot not in build["chroots"]:
+ continue
+ if build["state"] != "succeeded":
+ if not args.chroot:
+ continue
+ if len(build["chroots"]) == 1:
+ continue
+ build_chroot = build_chroot_proxy.get(build["id"], args.chroot)
+ if build_chroot.state != "succeeded":
+ continue
+
+ package = "{0}-{1}".format(build["source_package"]["name"], build["source_package"]["version"])
+ if not package:
+ continue
+ if not args.list_each:
+ if package in processed_packages:
+ continue
+ processed_packages.append(package)
+
+ print(package)
+
+
+def package_order_from_koji(args):
+ """List package build order from Koji"""
+ if not args.username and not args.tag:
+ print("You need to specify either username or tag to list build order in Koji.")
+ sys.exit(1)
+
+ for path in [args.config, "~/.config/koji", "/etc/koji.conf"]:
+ if path and os.path.exists(path):
+ args.config = path
+
+ if not args.config:
+ print("Couldn't find koji config file.")
+
+ config_file = ConfigParser()
+ config_file.read(args.config)
+
+ koji_url = config_file.get("koji", "server")
+ session = ClientSession(koji_url)
+
+ if args.tag:
+ try:
+ builds = session.listTagged(tag=args.tag, owner=args.username)
+ except GenericError:
+ print("No tag {0}.".format(args.tag))
+ sys.exit(1)
+
+ elif args.username:
+ user = session.getUser(args.username)
+ if not user:
+ print("No user {0}.".format(args.username))
+ sys.exit(1)
+
+ user_id = user["id"]
+ builds = session.listBuilds(userID=user_id)
+
+ processed_packages = []
+ for build in sorted(builds, key=lambda i: i["completion_time"]):
+ if build["state"] != BUILD_STATES["COMPLETE"]:
+ continue
+ package = build["nvr"]
+ if not package:
+ continue
+ if not args.list_each:
+ if package in processed_packages:
+ continue
+ processed_packages.append(package)
+
+ print(package)
+
+
+if __name__ == "__main__":
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--config", type=str, help="Path to copr/koji config")
+ parser.add_argument("--list-each", "-e", action="store_true", default=False,
+ help="List each occurence of every package in the project")
+
+ subparsers = parser.add_subparsers(title="commands")
+
+ parser_copr = subparsers.add_parser("copr", help="List package build order in Copr")
+ parser_copr.add_argument("--project", "-p", type=str, help="Copr project in `owner/project` format")
+ parser_copr.add_argument("--chroot", "-c", type=str, help="List this chroot only")
+ parser_copr.set_defaults(func=package_order_from_copr)
+
+ parser_koji = subparsers.add_parser("koji", help="List package build order in Koji")
+ parser_koji.add_argument("--username", "-u", type=str, help="Koji username")
+ parser_koji.add_argument("--tag", "-t", type=str, help="Koji tag")
+ parser_koji.set_defaults(func=package_order_from_koji)
+
+ args = parser.parse_args()
+ try:
+ args.func(args)
+ except AttributeError:
+ parser.print_help()
+ sys.exit(0)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years
[copr/copr] branch master updated (4aa97e3 -> a0b1464)
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 4aa97e3 docker: create hostname alias for redis container
add a0b1464 releng: fedora-default-assignee script
No new revisions were added by this update.
Summary of changes:
releng/fedora-default-assignee | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100755 releng/fedora-default-assignee
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years
[copr/copr] branch master updated (eb48665 -> 4aa97e3)
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 eb48665 frontend: provide status information for build chroots in APIv3
add 4aa97e3 docker: create hostname alias for redis container
No new revisions were added by this update.
Summary of changes:
docker-compose.yaml | 4 ++++
docker/frontend/Dockerfile | 4 ++++
2 files changed, 8 insertions(+)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years
[copr/copr] branch master updated (9d103ad -> eb48665)
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 9d103ad frontend: fix application context error for add-user command
add eb48665 frontend: provide status information for build chroots in APIv3
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/coprs/views/apiv3_ns/apiv3_build_chroots.py | 1 +
1 file changed, 1 insertion(+)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years
[copr/copr] branch master updated (731a4c4 -> 9d103ad)
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 731a4c4 frontend: fix multiple same packages in rebuild_all view
add 9d103ad frontend: fix application context error for add-user command
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/commands/add_user.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years
[copr/copr] branch master updated (23a4402 -> 731a4c4)
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 23a4402 frontend: move constants to copr.conf
add 731a4c4 frontend: fix multiple same packages in rebuild_all view
No new revisions were added by this update.
Summary of changes:
frontend/coprs_frontend/coprs/views/coprs_ns/coprs_packages.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
4 years