public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Chenxiong Qi <cqi@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpkg] 1.70-1: New release 1.51
Date: Mon, 10 Aug 2026 21:43:48 GMT [thread overview]
Message-ID: <178639822807.1.16805217057913690467.rpms-rpkg-bb111f0d2ce2@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpkg
Branch : 1.70-1
Commit : bb111f0d2ce27aecf8081f3427cca87f0559345a
Author : Chenxiong Qi <cqi@redhat.com>
Date : 2017-10-20T22:32:52+08:00
Stats : +74/-323 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/rpkg/c/bb111f0d2ce27aecf8081f3427cca87f0559345a?branch=1.70-1
Log:
New release 1.51
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
---
diff --git a/0001-Fix-encoding-in-new-command.patch b/0001-Fix-encoding-in-new-command.patch
deleted file mode 100644
index 566e371..0000000
--- a/0001-Fix-encoding-in-new-command.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 983aceeb9c03a02dd22d7ab5cb14246a1d4813dc Mon Sep 17 00:00:00 2001
-From: Chenxiong Qi <cqi@redhat.com>
-Date: Thu, 17 Aug 2017 12:35:44 +0800
-Subject: [PATCH] Fix encoding in new command
-
-In previous commit, new_diff returned from GitPython API is unicode
-string and has to be encoded in encoding UTF-8. That works well with
-GitPython>=1.0, but not with version GitPython<1.0 which returns string
-in basestring type. This failure case happens in EL6 with
-0.3.2-0.6.RC1.el6.
-
-Signed-off-by: Chenxiong Qi <cqi@redhat.com>
----
- pyrpkg/cli.py | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py
-index ac6c841..69cc931 100644
---- a/pyrpkg/cli.py
-+++ b/pyrpkg/cli.py
-@@ -23,6 +23,7 @@ import time
-
- import koji
- import pyrpkg.utils as utils
-+import six
-
- from pyrpkg import rpkgError, log as rpkgLogger
- from six.moves import xmlrpc_client, configparser
-@@ -1315,7 +1316,12 @@ see API KEY section of copr-cli(1) man page.
-
- def new(self):
- new_diff = self.cmd.new()
-- print(new_diff.encode('utf-8'))
-+ # When running rpkg with old version GitPython<1.0 which returns string
-+ # in type basestring, no need to encode.
-+ if isinstance(new_diff, six.string_types):
-+ print(new_diff)
-+ else:
-+ print(new_diff.encode('utf-8'))
-
- def new_sources(self):
- # Check to see if the files passed exist
---
-2.9.4
-
diff --git a/0001-Fix-kojiprofile-selection-in-cliClient.container_bui.patch b/0001-Fix-kojiprofile-selection-in-cliClient.container_bui.patch
deleted file mode 100644
index ba46516..0000000
--- a/0001-Fix-kojiprofile-selection-in-cliClient.container_bui.patch
+++ /dev/null
@@ -1,251 +0,0 @@
-From 7f8731a89c3154abe845700e900f139eec381e04 Mon Sep 17 00:00:00 2001
-From: Chenxiong Qi <cqi@redhat.com>
-Date: Thu, 24 Aug 2017 22:12:14 +0800
-Subject: [PATCH] Fix kojiprofile selection in cliClient.container_build_koji
-
-kojiprofile or deprecated kojiconfig should be selected according to
-whether current client is compatible with kojiconfig or not. Tests are
-added for command container-build with koji.
-
-Also fix the default value of koji_config_type and add tests to ensure
-_compat_kojiconfig is set correctly.
-
-Signed-off-by: Chenxiong Qi <cqi@redhat.com>
----
- pyrpkg/__init__.py | 2 +-
- pyrpkg/cli.py | 27 ++---
- tests/fixtures/rpkg-deprecated-kojiconfig.conf | 11 ++
- tests/test_cli.py | 139 +++++++++++++++++++++++++
- 4 files changed, 165 insertions(+), 14 deletions(-)
- create mode 100644 tests/fixtures/rpkg-deprecated-kojiconfig.conf
-
-diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
-index 1c80d2e..d5f04ba 100644
---- a/pyrpkg/__init__.py
-+++ b/pyrpkg/__init__.py
-@@ -66,7 +66,7 @@ class Commands(object):
- def __init__(self, path, lookaside, lookasidehash, lookaside_cgi,
- gitbaseurl, anongiturl, branchre, kojiconfig,
- build_client,
-- koji_config_type='kojiconfig', user=None,
-+ koji_config_type='config', user=None,
- dist=None, target=None, quiet=False,
- distgit_namespaced=False, realms=None, lookaside_namespaced=False):
- """Init the object and some configuration details."""
-diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py
-index 35d9878..90874fc 100644
---- a/pyrpkg/cli.py
-+++ b/pyrpkg/cli.py
-@@ -1198,21 +1198,22 @@ see API KEY section of copr-cli(1) man page.
- "Using %(option)s from [%(root.section)s]"
- err_args = {"plugin.section": section_name, "root.section": self.name}
-
-- if self.config.has_option(section_name, "kojiconfig"):
-- kojiconfig = self.config.get(section_name, "kojiconfig")
-- kojiprofile = None
-- else:
-- err_args["option"] = "kojiconfig"
-- self.log.debug(err_msg % err_args)
-- kojiprofile = self.config.get(self.name, "kojiconfig")
-+ kojiconfig = kojiprofile = None
-
-- if self.config.has_option(section_name, "kojiprofile"):
-- kojiconfig = None
-- kojiprofile = self.config.get(section_name, "kojiprofile")
-+ if self.cmd._compat_kojiconfig:
-+ if self.config.has_option(section_name, "kojiconfig"):
-+ kojiconfig = self.config.get(section_name, "kojiconfig")
-+ else:
-+ err_args["option"] = "kojiconfig"
-+ self.log.debug(err_msg % err_args)
-+ kojiconfig = self.config.get(self.name, "kojiconfig")
- else:
-- err_args["option"] = "kojiprofile"
-- self.log.debug(err_msg % err_args)
-- kojiprofile = self.config.get(self.name, "kojiprofile")
-+ if self.config.has_option(section_name, "kojiprofile"):
-+ kojiprofile = self.config.get(section_name, "kojiprofile")
-+ else:
-+ err_args["option"] = "kojiprofile"
-+ self.log.debug(err_msg % err_args)
-+ kojiprofile = self.config.get(self.name, "kojiprofile")
-
- if self.config.has_option(section_name, "build_client"):
- build_client = self.config.get(section_name, "build_client")
-diff --git a/tests/fixtures/rpkg-deprecated-kojiconfig.conf b/tests/fixtures/rpkg-deprecated-kojiconfig.conf
-new file mode 100644
-index 0000000..adcd1da
---- /dev/null
-+++ b/tests/fixtures/rpkg-deprecated-kojiconfig.conf
-@@ -0,0 +1,11 @@
-+[rpkg]
-+lookaside = http://localhost/repo/pkgs
-+lookasidehash = md5
-+lookaside_cgi = https://localhost/repo/pkgs/upload.cgi
-+gitbaseurl = ssh://%(user)s@localhost/%(module)s
-+anongiturl = git://localhost/%(module)s
-+branchre = f\d$|f\d\d$|el\d$|olpc\d$|master$
-+kojiconfig = /path/to/koji.conf
-+build_client = koji
-+clone_config =
-+ bz.default-component %(module)s
-diff --git a/tests/test_cli.py b/tests/test_cli.py
-index f4b44ec..1372411 100644
---- a/tests/test_cli.py
-+++ b/tests/test_cli.py
-@@ -16,6 +16,7 @@ from six.moves import StringIO
- import git
- import pyrpkg.cli
-
-+import utils
- from mock import patch
- from utils import CommandTestCase
- from pyrpkg import rpkgError
-@@ -111,6 +112,144 @@ class TestModuleNameOption(CliTestCase):
- self.assertEqual(cmd.ns_module_name, 'user/project/foo')
-
-
-+class TestKojiConfigBackwardCompatibility(CliTestCase):
-+ """Test backward compatibility of kojiconfig and kojiprofile
-+
-+ Remove this test case after deprecated kojiconfig is removed eventually.
-+ """
-+
-+ @patch('pyrpkg.Commands._deprecated_read_koji_config')
-+ @patch('pyrpkg.koji.read_config')
-+ def test_use_deprecated_kojiconfig(self,
-+ read_config,
-+ _deprecated_read_koji_config):
-+ cli_cmd = ['rpkg', '--path', self.cloned_repo_path, 'build']
-+
-+ cfg_file = os.path.join(os.path.dirname(__file__),
-+ 'fixtures',
-+ 'rpkg-deprecated-kojiconfig.conf')
-+
-+ with patch('sys.argv', new=cli_cmd):
-+ cli = self.new_cli(cfg_file)
-+
-+ cli.cmd.read_koji_config()
-+
-+ self.assertFalse(hasattr(cli.cmd, 'kojiprofile'))
-+ self.assertEqual(utils.kojiconfig, cli.cmd.kojiconfig)
-+ self.assertTrue(cli.cmd._compat_kojiconfig)
-+
-+ read_config.assert_not_called()
-+ _deprecated_read_koji_config.assert_called_once()
-+
-+ @patch('pyrpkg.Commands._deprecated_read_koji_config')
-+ @patch('pyrpkg.koji.read_config')
-+ def test_use_kojiprofile(self, read_config, _deprecated_read_koji_config):
-+ cli_cmd = ['rpkg', '--path', self.cloned_repo_path, 'build']
-+
-+ with patch('sys.argv', new=cli_cmd):
-+ cli = self.new_cli()
-+
-+ cli.cmd.read_koji_config()
-+
-+ self.assertFalse(hasattr(cli.cmd, 'kojiconfig'))
-+ self.assertEqual(utils.kojiprofile, cli.cmd.kojiprofile)
-+ self.assertFalse(cli.cmd._compat_kojiconfig)
-+
-+ read_config.assert_called_once_with(utils.kojiprofile)
-+ _deprecated_read_koji_config.assert_not_called()
-+
-+
-+class TestContainerBuildWithKoji(CliTestCase):
-+ """Test container_build with koji"""
-+
-+ def setUp(self):
-+ super(TestContainerBuildWithKoji, self).setUp()
-+ self.checkout_branch(git.Repo(self.cloned_repo_path), 'eng-rhel-7')
-+
-+ @patch('pyrpkg.Commands.container_build_koji')
-+ def test_using_kojiprofile(self, container_build_koji):
-+ cli_cmd = ['rpkg', '--path', self.cloned_repo_path,
-+ 'container-build', '--build-with', 'koji']
-+
-+ with patch('sys.argv', new=cli_cmd):
-+ cli = self.new_cli()
-+ cli.container_build()
-+
-+ container_build_koji.assert_called_once_with(
-+ False,
-+ opts={
-+ 'scratch': False,
-+ 'quiet': False,
-+ 'yum_repourls': None,
-+ 'git_branch': 'eng-rhel-7',
-+ },
-+ kojiconfig=None,
-+ kojiprofile='koji',
-+ build_client=utils.build_client,
-+ koji_task_watcher=cli._watch_koji_tasks,
-+ nowait=False
-+ )
-+
-+ @patch('pyrpkg.Commands.container_build_koji')
-+ def test_override_target(self, container_build_koji):
-+ cli_cmd = ['rpkg', '--path', self.cloned_repo_path, 'container-build',
-+ '--target', 'f25-docker-candidate', '--build-with', 'koji']
-+
-+ with patch('sys.argv', new=cli_cmd):
-+ cli = self.new_cli()
-+ cli.container_build()
-+
-+ self.assertEqual('f25-docker-candidate', cli.cmd._target)
-+ container_build_koji.assert_called_once_with(
-+ True,
-+ opts={
-+ 'scratch': False,
-+ 'quiet': False,
-+ 'yum_repourls': None,
-+ 'git_branch': 'eng-rhel-7',
-+ },
-+ kojiconfig=None,
-+ kojiprofile='koji',
-+ build_client=utils.build_client,
-+ koji_task_watcher=cli._watch_koji_tasks,
-+ nowait=False
-+ )
-+
-+ @patch('pyrpkg.Commands.container_build_koji')
-+ def test_using_deprecated_kojiconfig(self, container_build_koji):
-+ """test_build_using_deprecated_kojiconfig
-+
-+ This is for ensuring container_build works with deprecated kojiconfig.
-+ This test can be delete after kojiconfig is removed eventually.
-+ """
-+ cli_cmd = ['rpkg', '--path', self.cloned_repo_path,
-+ '--module-name', 'mycontainer',
-+ 'container-build', '--build-with', 'koji']
-+
-+ cfg_file = os.path.join(os.path.dirname(__file__),
-+ 'fixtures',
-+ 'rpkg-deprecated-kojiconfig.conf')
-+
-+ with patch('sys.argv', new=cli_cmd):
-+ cli = self.new_cli(cfg_file)
-+ cli.container_build()
-+
-+ container_build_koji.assert_called_once_with(
-+ False,
-+ opts={
-+ 'scratch': False,
-+ 'quiet': False,
-+ 'yum_repourls': None,
-+ 'git_branch': 'eng-rhel-7',
-+ },
-+ kojiconfig='/path/to/koji.conf',
-+ kojiprofile=None,
-+ build_client=utils.build_client,
-+ koji_task_watcher=cli._watch_koji_tasks,
-+ nowait=False
-+ )
-+
-+
- class TestClog(CliTestCase):
-
- def setUp(self):
---
-2.9.5
-
diff --git a/rpkg.spec b/rpkg.spec
index 6b06491..c8a5b15 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -2,16 +2,14 @@
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Name: rpkg
-Version: 1.50
-Release: 2%{?dist}
+Version: 1.51
+Release: 1%{?dist}
Summary: Python library for interacting with rpm+git
License: GPLv2+ and LGPLv2
URL: https://pagure.io/rpkg
Source0: https://pagure.io/releases/rpkg/%{name}-%{version}.tar.gz
BuildArch: noarch
-Patch0: 0001-Fix-encoding-in-new-command.patch
-Patch1: 0001-Fix-kojiprofile-selection-in-cliClient.container_bui.patch
%description
@@ -21,46 +19,61 @@ Python library for interacting with rpm+git
%package -n python2-%{name}
Summary: Python library for interacting with rpm+git
-BuildRequires: python-devel, python-setuptools
+BuildRequires: python2-devel
# We br these things for man page generation due to imports
BuildRequires: GitPython
BuildRequires: python2-koji
BuildRequires: python2-cccolutils
-BuildRequires: python-kitchen
+BuildRequires: python2-openidc-client
+BuildRequires: python2-mock
+
+%if 0%{?rhel}
BuildRequires: python-pycurl
BuildRequires: python-rpmfluff
BuildRequires: python-six >= 1.9.0
-BuildRequires: python2-openidc-client
-
-BuildRequires: python-nose
-BuildRequires: python-mock
-
-BuildRequires: rpmlint
+BuildRequires: python-requests
+%else
+BuildRequires: python2-pycurl
+BuildRequires: python2-rpmfluff
+BuildRequires: python2-six >= 1.9.0
+BuildRequires: python2-requests
+%endif
%if 0%{?rhel} && 0%{?rhel} < 7
+BuildRequires: python-setuptools
BuildRequires: python-argparse
-BuildRequires: python-requests
+BuildRequires: python-nose
+BuildRequires: python-unittest2
%else
-BuildRequires: python2-requests
+BuildRequires: python2-setuptools
+BuildRequires: python2-nose
%endif
+BuildRequires: rpmlint
+
Requires: mock
Requires: redhat-rpm-config
Requires: rpm-build
-Requires: rpm-python
Requires: rpmlint
Requires: GitPython >= 0.2.0
-Requires: python-kitchen
-Requires: python-pycurl
-Requires: python-six >= 1.9.0
Requires: python2-cccolutils
Requires: python2-koji
-%if 0%{?rhel} && 0%{?rhel} < 7
-Requires: python-requests
+
+%if 0%{?rhel}
+Requires: rpm-python
+Requires: python-pycurl
+Requires: python-six >= 1.9.0
+Requires: python-requests
%else
-Requires: python2-requests
+Requires: python2-rpm
+Requires: python2-pycurl
+Requires: python2-six >= 1.9.0
+%endif
+
+%if 0%{?rhel} && 0%{?rhel} < 7
+Requires: python-argparse
%endif
@@ -78,8 +91,6 @@ A python library for managing RPM package sources in a git repository.
%prep
%setup -q
-%patch0 -p1
-%patch1 -p1
%build
@@ -91,18 +102,25 @@ A python library for managing RPM package sources in a git repository.
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+# Create configuration directory to holding downstream clients config files
+# that are built on top of rpkg
+%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/rpkg
+
example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
%{__install} -d $example_cli_dir
# Install example CLI to rpkg own data directory
%{__install} -d ${example_cli_dir}%{_bindir}
-%{__install} -p -m 0644 $RPM_BUILD_ROOT%{_bindir}/rpkg ${example_cli_dir}%{_bindir}
-rm -rf $RPM_BUILD_ROOT%{_bindir}
+%{__install} -d ${example_cli_dir}%{_sysconfdir}/bash_completion.d
+%{__install} -d ${example_cli_dir}%{_sysconfdir}/rpkg
+
+%{__install} -p -m 0644 bin/rpkg ${example_cli_dir}%{_bindir}
+%{__install} -p -m 0644 etc/bash_completion.d/rpkg.bash ${example_cli_dir}%{_sysconfdir}/bash_completion.d
+%{__install} -p -m 0644 etc/rpkg/rpkg.conf ${example_cli_dir}%{_sysconfdir}/rpkg
%{__install} -d ${example_cli_dir}%{_mandir}/man1
%{__install} -p -m 0644 rpkg.1 ${example_cli_dir}%{_mandir}/man1
-mv $RPM_BUILD_ROOT%{_sysconfdir} ${example_cli_dir}
%check
nosetests tests
@@ -116,11 +134,40 @@ rm -rf $RPM_BUILD_ROOT
%license COPYING COPYING-koji LGPL
# For noarch packages: sitelib
%{python_sitelib}/pyrpkg
-%{python_sitelib}/%{name}-%{version}-py?.?.egg-info
+%{python_sitelib}/%{name}-%{version}-py*.egg-info
%{_datadir}/%{name}
+%{_sysconfdir}/rpkg
%changelog
+* Fri Oct 20 2017 Chenxiong Qi <cqi@redhat.com> - 1.51-1
+- Ignore TestModulesCli if openidc-client is unavailable (cqi)
+- Port mbs-build to rpkg (mprahl)
+- Add .vscode to .gitignore (mprahl)
+- Fix TestPatch.test_rediff in order to run with old version of mock (cqi)
+- Allow to specify alternative Copr config file - #184 (cqi)
+- Tests for patch command (cqi)
+- More Tests for mockbuild command (cqi)
+- More tests for getting spec file (cqi)
+- Tests for container-build-setup command (cqi)
+- Test for container-build to use custom config (cqi)
+- Suppress output from git command within setUp (cqi)
+- Skip test if rpmfluff is not available (lsedlar)
+- Allow to override build URL (cqi)
+- Test for mock-config command (cqi)
+- Tests for copr-build command (cqi)
+- Fix arch-override for container-build (lucarval)
+- Remove unsupported osbs for container-build (lucarval)
+- cli: add --arches support for koji_cointainerbuild (mlangsdo)
+- Strip refs/heads/ from branch only once (lsedlar)
+- Don't install bin and config files (cqi)
+- Fix kojiprofile selection in cliClient.container_build_koji (cqi)
+- Avoid branch detection for 'rpkg sources' (praiskup)
+- Fix encoding in new command (cqi)
+- Minor wording improvement in help (pgier)
+- Fix indentation (pviktori)
+- Add --with and --without options to mockbuild (pviktori)
+
* Thu Aug 31 2017 Chenxiong Qi <cqi@redhat.com> - 1.50-2
- Backport: Fix kojiprofile selection in cliClient.container_build_koji (cqi)
reply other threads:[~2026-08-10 21:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178639822807.1.16805217057913690467.rpms-rpkg-bb111f0d2ce2@fedoraproject.org \
--to=cqi@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox