public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/fedpkg] 1.48-1: Fix tests on python 2.6
Date: Mon, 10 Aug 2026 21:45:14 GMT [thread overview]
Message-ID: <178639831403.1.4706821746558389532.rpms-fedpkg-6ef6c5dd324a@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/fedpkg
Branch : 1.48-1
Commit : 6ef6c5dd324a9eb79a23a0091138d59e6256d5e2
Author : Lubomír Sedlář <lsedlar@redhat.com>
Date : 2016-04-07T11:13:25+02:00
Stats : +69/-2 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/fedpkg/c/6ef6c5dd324a9eb79a23a0091138d59e6256d5e2?branch=1.48-1
Log:
Fix tests on python 2.6
This is a backported patch from upstream repo. It should be dropped in
next upstream release.
---
diff --git a/0001-Fix-tests-on-Python-2.6.patch b/0001-Fix-tests-on-Python-2.6.patch
new file mode 100644
index 0000000..9b22417
--- /dev/null
+++ b/0001-Fix-tests-on-Python-2.6.patch
@@ -0,0 +1,32 @@
+From 49433ad7f88ee201999577eca5cb2a031be5a431 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
+Date: Thu, 31 Mar 2016 14:35:03 +0200
+Subject: [PATCH 1/2] Fix tests on Python 2.6
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+check_output was only added to subprocess in 2.7
+
+Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
+
+diff --git a/test/test_retire.py b/test/test_retire.py
+index e824428..af48ece 100644
+--- a/test/test_retire.py
++++ b/test/test_retire.py
+@@ -40,8 +40,10 @@ class RetireTestCase(unittest.TestCase):
+ cwd=self.tmpdir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+
+ def _get_latest_commit(self):
+- return subprocess.check_output(
+- ['git', 'log', '-n', '1', '--pretty=%s'], cwd=self.tmpdir).strip()
++ proc = subprocess.Popen(['git', 'log', '-n', '1', '--pretty=%s'],
++ cwd=self.tmpdir, stdout=subprocess.PIPE)
++ out, err = proc.communicate()
++ return out.strip()
+
+ def _fake_client(self, args):
+ config = ConfigParser.SafeConfigParser()
+--
+2.5.5
+
diff --git a/0002-Configure-git-user-for-tests.patch b/0002-Configure-git-user-for-tests.patch
new file mode 100644
index 0000000..5848b77
--- /dev/null
+++ b/0002-Configure-git-user-for-tests.patch
@@ -0,0 +1,33 @@
+From 4875cdfbc6160fca81f6ebefaf300d5921aca32f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
+Date: Thu, 7 Apr 2016 09:32:55 +0200
+Subject: [PATCH 2/2] Configure git user for tests
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes a problem when running the tests in unconfigured environment,
+such as Koji.
+
+Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
+
+diff --git a/test/test_retire.py b/test/test_retire.py
+index af48ece..e80b94e 100644
+--- a/test/test_retire.py
++++ b/test/test_retire.py
+@@ -27,6 +27,12 @@ class RetireTestCase(unittest.TestCase):
+ ['git', 'init'],
+ cwd=self.tmpdir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ subprocess.check_call(
++ ['git', 'config', 'user.name', 'John Doe'],
++ cwd=self.tmpdir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
++ subprocess.check_call(
++ ['git', 'config', 'user.email', 'jdoe@example.com'],
++ cwd=self.tmpdir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
++ subprocess.check_call(
+ ['git', 'remote', 'add', 'origin', origin],
+ cwd=self.tmpdir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+ subprocess.check_call(
+--
+2.5.5
+
diff --git a/fedpkg.spec b/fedpkg.spec
index b990ddb..7dfe833 100644
--- a/fedpkg.spec
+++ b/fedpkg.spec
@@ -15,6 +15,8 @@ Group: Applications/System
License: GPLv2+
URL: http://pagure.io/fedpkg
Source0: http://pagure.io/releases/fedpkg/fedpkg-%{version}.tar.bz2
+Patch0: 0001-Fix-tests-on-Python-2.6.patch
+Patch1: 0002-Configure-git-user-for-tests.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: pyrpkg >= 1.43, redhat-rpm-config
@@ -41,6 +43,8 @@ Provides the fedpkg command for working with dist-git
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
%build
%{__python} setup.py build
@@ -54,8 +58,6 @@ Provides the fedpkg command for working with dist-git
%check
-git config --global user.email "test@example.com"
-git config --global user.name "A Packager"
nosetests
reply other threads:[~2026-08-10 21:45 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=178639831403.1.4706821746558389532.rpms-fedpkg-6ef6c5dd324a@fedoraproject.org \
--to=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