Source: async-upnp-client Version: 0.40.0-1 Severity: serious Tags: ftbfs Justification: FTBFS
Dear maintainer, During a test rebuild, async-upnp-client failed to rebuild. Judging from the test, this may be specifically because of the unshare build backend? They pass for me under Incus. Probably these ENODEV errors could be caught and turned into test skips. ------------------------------------------------------------------------------- [...] type=socket.SOCK_DGRAM, proto=socket.IPPROTO_UDP, )[0] source_ip, source_port = ip_port_from_address_tuple(source) source_info = socket.getaddrinfo( str(source_ip), source_port, type=socket.SOCK_DGRAM, proto=socket.IPPROTO_UDP )[0] _LOGGER.debug("Creating socket, source: %s, target: %s", source_info, target_info) # create socket sock = socket.socket(source_info[0], source_info[1]) # set options sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) try: sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) except AttributeError: pass sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) # multicast if target_ip.is_multicast: if source_info[0] == socket.AF_INET6: sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_HOPS, 2) addr = cast(AddressTupleV6Type, source_info[4]) if addr[3]: mreq = target_ip.packed + addr[3].to_bytes(4, sys.byteorder) sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq) sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_IF, addr[3]) else: _LOGGER.debug("Skipping setting multicast interface") else: sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, source_ip.packed) sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2) > sock.setsockopt( socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, target_ip.packed + source_ip.packed, ) E OSError: [Errno 19] No such device async_upnp_client/ssdp.py:491: OSError _____________________ test_see_search_device_ipv4_and_ipv6 _____________________ @pytest.mark.asyncio async def test_see_search_device_ipv4_and_ipv6() -> None: """Test seeing the same device via IPv4, then via IPv6.""" # pylint: disable=protected-access async_callback = AsyncMock() listener = SsdpListener(async_callback=async_callback) > await listener.async_start() tests/test_ssdp_listener.py:686: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ async_upnp_client/ssdp_listener.py:520: in async_start await self._advertisement_listener.async_start() async_upnp_client/advertisement.py:118: in async_start sock, _source, _target = get_ssdp_socket(self.source, self.target) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ source = ('0.0.0.0', 0), target = ('239.255.255.250', 1900) def get_ssdp_socket( source: AddressTupleVXType, target: AddressTupleVXType, ) -> Tuple[socket.socket, AddressTupleVXType, AddressTupleVXType]: """Create a socket to listen on.""" # Ensure a proper IPv6 source/target. if is_ipv6_address(source): source = cast(AddressTupleV6Type, source) if not source[3]: raise UpnpError(f"Source missing scope_id, source: {source}") if is_ipv6_address(target): target = cast(AddressTupleV6Type, target) if not target[3]: raise UpnpError(f"Target missing scope_id, target: {target}") target_ip, target_port = ip_port_from_address_tuple(target) target_info = socket.getaddrinfo( str(target_ip), target_port, type=socket.SOCK_DGRAM, proto=socket.IPPROTO_UDP, )[0] source_ip, source_port = ip_port_from_address_tuple(source) source_info = socket.getaddrinfo( str(source_ip), source_port, type=socket.SOCK_DGRAM, proto=socket.IPPROTO_UDP )[0] _LOGGER.debug("Creating socket, source: %s, target: %s", source_info, target_info) # create socket sock = socket.socket(source_info[0], source_info[1]) # set options sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) try: sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1) except AttributeError: pass sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) # multicast if target_ip.is_multicast: if source_info[0] == socket.AF_INET6: sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_HOPS, 2) addr = cast(AddressTupleV6Type, source_info[4]) if addr[3]: mreq = target_ip.packed + addr[3].to_bytes(4, sys.byteorder) sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_JOIN_GROUP, mreq) sock.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_IF, addr[3]) else: _LOGGER.debug("Skipping setting multicast interface") else: sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_IF, source_ip.packed) sock.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, 2) > sock.setsockopt( socket.IPPROTO_IP, socket.IP_ADD_MEMBERSHIP, target_ip.packed + source_ip.packed, ) E OSError: [Errno 19] No such device async_upnp_client/ssdp.py:491: OSError =============================== warnings summary =============================== .pybuild/cpython3_3.12_async-upnp-client/build/tests/test_server.py::test_init .pybuild/cpython3_3.12_async-upnp-client/build/tests/test_server.py::test_action .pybuild/cpython3_3.12_async-upnp-client/build/tests/test_server.py::test_subscribe /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_async-upnp-client/build/async_upnp_client/server.py:291: DeprecationWarning: Testing an element's truth value will always return True in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. if not thing or not hasattr(thing, "__upnp_action__"): .pybuild/cpython3_3.12_async-upnp-client/build/tests/test_server.py::test_action /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_async-upnp-client/build/async_upnp_client/server.py:1081: DeprecationWarning: Testing an element's truth value will always return True in future versions. Use specific 'len(elem)' or 'elem is not None' test instead. assert body_el -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html =========================== short test summary info ============================ FAILED tests/test_ssdp_listener.py::test_see_advertisement_alive - OSError: [... FAILED tests/test_ssdp_listener.py::test_see_advertisement_byebye - OSError: ... FAILED tests/test_ssdp_listener.py::test_see_advertisement_update - OSError: ... FAILED tests/test_ssdp_listener.py::test_see_search - OSError: [Errno 19] No ... FAILED tests/test_ssdp_listener.py::test_see_search_sync - OSError: [Errno 19... FAILED tests/test_ssdp_listener.py::test_see_search_then_alive - OSError: [Er... FAILED tests/test_ssdp_listener.py::test_see_search_then_update - OSError: [E... FAILED tests/test_ssdp_listener.py::test_see_search_then_byebye - OSError: [E... FAILED tests/test_ssdp_listener.py::test_see_search_then_byebye_then_alive - ... FAILED tests/test_ssdp_listener.py::test_purge_devices - OSError: [Errno 19] ... FAILED tests/test_ssdp_listener.py::test_purge_devices_2 - OSError: [Errno 19... FAILED tests/test_ssdp_listener.py::test_see_search_invalid_usn - OSError: [E... FAILED tests/test_ssdp_listener.py::test_see_search_invalid_location - OSErro... FAILED tests/test_ssdp_listener.py::test_see_search_localhost_location[http:/127.0.0.1:1234/device.xml] FAILED tests/test_ssdp_listener.py::test_see_search_localhost_location[http:/[::1]:1234/device.xml] FAILED tests/test_ssdp_listener.py::test_see_search_localhost_location[http:/169.254.12.1:1234/device.xml] FAILED tests/test_ssdp_listener.py::test_combined_headers - OSError: [Errno 1... FAILED tests/test_ssdp_listener.py::test_see_search_device_ipv4_and_ipv6 - OS... ========== 18 failed, 124 passed, 14 deselected, 4 warnings in 11.08s ========== E: pybuild pybuild:389: test: plugin distutils failed with: exit code=1: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.12_async-upnp-client/build; python3.12 -m pytest -k "not test_get_local_ip and not test_async_get_local_ip" dh_auto_test: error: pybuild --test --test-pytest -i python{version} -p 3.12 returned exit code 13 make: *** [debian/rules:8: binary] Error 25 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 -------------------------------------------------------------------------------- Build finished at 2024-09-07T14:13:33Z ------------------------------------------------------------------------------- The above is just how the build ends and not necessarily the most relevant part. If required, the full build log is available here (for the next 30 days): https://debusine.debian.net/artifact/609977/ About the archive rebuild: The build was made on debusine.debian.net, on arm64 using sbuild. You can find the build task here: https://debusine.debian.net/work-request/20346/ If this is really a bug in one of the build-depends, please use reassign and affects, so that this is still visible in the BTS web page for this package. Thanks, Stefano