public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <awilliam@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/bodhi-server] f45: Backport PR #6136 to fix tests with F45+
Date: Tue, 18 Aug 2026 21:43:03 GMT	[thread overview]
Message-ID: <178708938366.1.15103674039392882048.rpms-bodhi-server-68c30ef44909@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/bodhi-server
Branch : f45
Commit : 68c30ef44909a7efaa3480fc2779a9908e2bc1f6
Author : Adam Williamson <awilliam@redhat.com>
Date   : 2026-08-18T14:42:37-07:00
Stats  : +149/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/bodhi-server/c/68c30ef44909a7efaa3480fc2779a9908e2bc1f6?branch=f45

Log:
Backport PR #6136 to fix tests with F45+

---
diff --git a/0001-createrepo_c-has-no-more-deltas-option.patch b/0001-createrepo_c-has-no-more-deltas-option.patch
new file mode 100644
index 0000000..23bb4a4
--- /dev/null
+++ b/0001-createrepo_c-has-no-more-deltas-option.patch
@@ -0,0 +1,145 @@
+From fa2e7ae323037b2eaac42d2de9e077022e713b62 Mon Sep 17 00:00:00 2001
+From: Mattia Verga <mattia.verga@tiscali.it>
+Date: Sun, 12 Jul 2026 11:36:42 +0200
+Subject: [PATCH] createrepo_c has no more --deltas option
+
+Signed-off-by: Mattia Verga <mattia.verga@tiscali.it>
+---
+ bodhi-server/tests/base.py      |  2 +-
+ bodhi-server/tests/test_util.py | 26 +++++++++++++-------------
+ 2 files changed, 14 insertions(+), 14 deletions(-)
+
+diff --git a/bodhi-server/tests/base.py b/bodhi-server/tests/base.py
+index 57bdd5122..4f753d68e 100644
+--- a/bodhi-server/tests/base.py
++++ b/bodhi-server/tests/base.py
+@@ -538,7 +538,7 @@ def mkmetadatadir(path, updateinfo=None, comps=None, source=False, compress_type
+         createrepo_command.insert(1, f'--compress-type={compress_type}')
+ 
+     if not source:
+-        for arg in ('--deltas', 'comps.xml', '--groupfile'):
++        for arg in ('comps.xml', '--groupfile'):
+             createrepo_command.insert(1, arg)
+ 
+     subprocess.check_call(createrepo_command)
+diff --git a/bodhi-server/tests/test_util.py b/bodhi-server/tests/test_util.py
+index e94fb77f1..cd902a529 100644
+--- a/bodhi-server/tests/test_util.py
++++ b/bodhi-server/tests/test_util.py
+@@ -406,7 +406,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         base.mkmetadatadir(self.tempdir, compress_type='xz')
+ 
+         # No exception should be raised here.
+-        util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=True)
++        util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=False)
+ 
+     @mock.patch('bodhi.server.util.load_repo_libdnf5', side_effect=Exception("Exception message"))
+     def test_invalid_repo_exception(self, *args):
+@@ -416,7 +416,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         base.mkmetadatadir(self.tempdir, compress_type='xz')
+ 
+         with pytest.raises(util.RepodataException) as exc:
+-            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=True)
++            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=False)
+         assert str(exc.value) == "Error loading the repository: Exception message"
+ 
+     def test_correct_yum_repo_with_gz_compress(self):
+@@ -427,7 +427,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         base.mkmetadatadir(self.tempdir, compress_type='gz')
+ 
+         # No exception should be raised here.
+-        util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=True)
++        util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=False)
+ 
+     def test_correct_yum_repo_with_bz2_compress(self):
+         """No Exception should be raised if the repo is normal.
+@@ -437,7 +437,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         base.mkmetadatadir(self.tempdir, compress_type='bz2')
+ 
+         # No exception should be raised here.
+-        util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=True)
++        util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=False)
+ 
+     @pytest.mark.skipif(
+         packaging.version.parse(createrepo_c.VERSION) < packaging.version.parse('1.0.0'),
+@@ -451,12 +451,12 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         base.mkmetadatadir(self.tempdir, compress_type='zstd')
+ 
+         # No exception should be raised here.
+-        util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=True)
++        util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=False)
+ 
+     def test_invalid_repo_type(self):
+         """A ValueError should be raised with invalid repo type."""
+         with pytest.raises(ValueError) as excinfo:
+-            util.sanity_check_repodata("so", "wrong", drpms=True)
++            util.sanity_check_repodata("so", "wrong", drpms=False)
+         assert str(excinfo.value) == 'repo_type must be one of module, source, or yum.'
+ 
+     @mock.patch('bodhi.server.util.librepo')
+@@ -468,7 +468,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         librepo.Handle.return_value.perform.side_effect = MockException(-1, 'msg', 'general_msg')
+ 
+         with pytest.raises(RepodataException) as excinfo:
+-            util.sanity_check_repodata('/tmp/', 'yum', drpms=True)
++            util.sanity_check_repodata('/tmp/', 'yum', drpms=False)
+         assert str(excinfo.value) == 'msg'
+ 
+     def _mkmetadatadir_w_modules(self):
+@@ -498,7 +498,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         """No Exception should be raised if the repo is a normal module repo."""
+         self._mkmetadatadir_w_modules()
+         # No exception should be raised here.
+-        util.sanity_check_repodata(self.tempdir, repo_type='module', drpms=True)
++        util.sanity_check_repodata(self.tempdir, repo_type='module', drpms=False)
+ 
+     @pytest.mark.skipif(
+         "libdnf5" in sys.modules,
+@@ -510,7 +510,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         self._mkmetadatadir_w_modules()
+ 
+         with pytest.raises(util.RepodataException) as exc:
+-            util.sanity_check_repodata(self.tempdir, repo_type='module', drpms=True)
++            util.sanity_check_repodata(self.tempdir, repo_type='module', drpms=False)
+         assert str(exc.value) == \
+             ("DNF did not return expected output when running test!"
+              " Test: ['module', 'list'], expected: .*, output: ")
+@@ -523,7 +523,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         base.mkmetadatadir(self.tempdir, updateinfo=updateinfo)
+ 
+         with pytest.raises(util.RepodataException) as exc:
+-            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=True)
++            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=False)
+         assert str(exc.value) == 'updateinfo.xml.gz contains empty ID tags'
+ 
+     def test_comps_invalid_notxml(self):
+@@ -534,7 +534,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         base.mkmetadatadir(self.tempdir, comps=comps)
+ 
+         with pytest.raises(util.RepodataException) as exc:
+-            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=True)
++            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=False)
+         assert str(exc.value) == 'Comps file unable to be parsed'
+ 
+     def test_comps_invalid_nonsense(self):
+@@ -545,7 +545,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         base.mkmetadatadir(self.tempdir, comps=comps)
+ 
+         with pytest.raises(util.RepodataException) as exc:
+-            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=True)
++            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=False)
+         assert str(exc.value) == 'Comps file empty'
+ 
+     def test_repomd_missing_updateinfo(self):
+@@ -562,7 +562,7 @@ class TestSanityCheckRepodata(base.BasePyTestCase):
+         repomd.write(repomd_path, encoding='UTF-8', xml_declaration=True)
+ 
+         with pytest.raises(util.RepodataException) as exc:
+-            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=True)
++            util.sanity_check_repodata(self.tempdir, repo_type='yum', drpms=False)
+         assert str(exc.value) == 'Required parts not in repomd.xml: updateinfo'
+ 
+     def test_repomd_missing_prestodelta(self):
+-- 
+2.55.0
+

diff --git a/bodhi-server.spec b/bodhi-server.spec
index d5d458e..46236a3 100644
--- a/bodhi-server.spec
+++ b/bodhi-server.spec
@@ -10,6 +10,9 @@ Summary:        Bodhi server
 License:        GPL-2.0-or-later
 URL:            https://github.com/fedora-infra/bodhi
 Source:         %{pypi_source bodhi_server}
+# https://github.com/fedora-infra/bodhi/pull/6136
+# Drop use of createrepo_c --deltas arg, it is gone in F45+
+Patch:          0001-createrepo_c-has-no-more-deltas-option.patch
 
 BuildArch:      noarch
 
@@ -75,7 +78,7 @@ repositories.
 
 
 %prep
-%autosetup -p1 -n %{src_name}-%{pypi_version}
+%autosetup -p2 -n %{src_name}-%{pypi_version}
 # Remove bundled egg-info
 rm -rf %{pypi_name}.egg-info
 

             reply	other threads:[~2026-08-18 21:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 21:43 Adam Williamson [this message]
2026-08-19  1:18 [rpms/bodhi-server] f45: Backport PR #6136 to fix tests with F45+ Adam Williamson

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=178708938366.1.15103674039392882048.rpms-bodhi-server-68c30ef44909@fedoraproject.org \
    --to=awilliam@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