diff --git a/python-pygit2-network-tests.patch b/python-pygit2-network-tests.patch new file mode 100644 index 0000000..623c233 --- /dev/null +++ b/python-pygit2-network-tests.patch @@ -0,0 +1,12 @@ +diff -up ./test/utils.py.orig ./test/utils.py +--- ./test/utils.py.orig 2024-02-12 12:22:29.272147056 -0500 ++++ ./test/utils.py 2024-02-12 12:23:45.876659120 -0500 +@@ -50,7 +50,7 @@ except socket.gaierror: + has_network = False + + requires_network = pytest.mark.skipif( +- not has_network, ++ True, + reason='Requires network') + + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: diff --git a/python-pygit2.spec b/python-pygit2.spec index 01f38d7..8731e86 100644 --- a/python-pygit2.spec +++ b/python-pygit2.spec @@ -13,6 +13,10 @@ Patch0: python-pygit2-transfer-size.patch # higher contain the patches needed for Python >= 3.12. # Remove when cffi >= 1.16.0 is available on all releases with Python 3.12. Patch: python-pygit2-cffiver.patch +# mock (by default) and koji builds never have network access, but testing +# that capability through a DNS resolution is not always accurate. +# Forcefully disable all network tests to avoid unnecessary build failures. +Patch: python-pygit2-network-tests.patch BuildRequires: make BuildRequires: gcc