NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.05k stars 14.1k forks source link

sshuttle won't build on Darwin #27643

Closed dredozubov closed 6 years ago

dredozubov commented 7 years ago

Issue description

sshuttle breaks during the building

source root is sshuttle-0.78.3
setting SOURCE_DATE_EPOCH to timestamp 1499555630 of file sshuttle-0.78.3/setup.cfg
patching sources
applying patch /nix/store/50mpb45s17vyfmifdfrwibvnhlkldav5-sudo.patch
patching file sshuttle/client.py
Hunk #1 succeeded at 185 (offset 27 lines).
configuring
building
running bdist_wheel
running build
running build_py
creating build
creating build/lib
creating build/lib/sshuttle
copying sshuttle/__init__.py -> build/lib/sshuttle
copying sshuttle/__main__.py -> build/lib/sshuttle
copying sshuttle/assembler.py -> build/lib/sshuttle
copying sshuttle/client.py -> build/lib/sshuttle
copying sshuttle/cmdline.py -> build/lib/sshuttle
copying sshuttle/firewall.py -> build/lib/sshuttle
copying sshuttle/helpers.py -> build/lib/sshuttle
copying sshuttle/hostwatch.py -> build/lib/sshuttle
copying sshuttle/linux.py -> build/lib/sshuttle
copying sshuttle/options.py -> build/lib/sshuttle
copying sshuttle/sdnotify.py -> build/lib/sshuttle
copying sshuttle/server.py -> build/lib/sshuttle
copying sshuttle/ssh.py -> build/lib/sshuttle
copying sshuttle/ssnet.py -> build/lib/sshuttle
copying sshuttle/ssyslog.py -> build/lib/sshuttle
copying sshuttle/stresstest.py -> build/lib/sshuttle
copying sshuttle/version.py -> build/lib/sshuttle
creating build/lib/sshuttle/methods
copying sshuttle/methods/__init__.py -> build/lib/sshuttle/methods
copying sshuttle/methods/ipfw.py -> build/lib/sshuttle/methods
copying sshuttle/methods/nat.py -> build/lib/sshuttle/methods
copying sshuttle/methods/pf.py -> build/lib/sshuttle/methods
copying sshuttle/methods/tproxy.py -> build/lib/sshuttle/methods
installing to build/bdist.macosx-10.6-x86_64/wheel
running install
running install_lib
creating build/bdist.macosx-10.6-x86_64
creating build/bdist.macosx-10.6-x86_64/wheel
creating build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/__init__.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/__main__.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/assembler.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/client.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/cmdline.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/firewall.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/helpers.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/hostwatch.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/linux.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
creating build/bdist.macosx-10.6-x86_64/wheel/sshuttle/methods
copying build/lib/sshuttle/methods/__init__.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle/methods
copying build/lib/sshuttle/methods/ipfw.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle/methods
copying build/lib/sshuttle/methods/nat.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle/methods
copying build/lib/sshuttle/methods/pf.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle/methods
copying build/lib/sshuttle/methods/tproxy.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle/methods
copying build/lib/sshuttle/options.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/sdnotify.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/server.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/ssh.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/ssnet.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/ssyslog.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/stresstest.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
copying build/lib/sshuttle/version.py -> build/bdist.macosx-10.6-x86_64/wheel/sshuttle
running install_egg_info
running egg_info
writing sshuttle.egg-info/PKG-INFO
writing dependency_links to sshuttle.egg-info/dependency_links.txt
writing entry points to sshuttle.egg-info/entry_points.txt
writing top-level names to sshuttle.egg-info/top_level.txt
reading manifest file 'sshuttle.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'docs/_build'
writing manifest file 'sshuttle.egg-info/SOURCES.txt'
Copying sshuttle.egg-info to build/bdist.macosx-10.6-x86_64/wheel/sshuttle-0.78.3-py3.6.egg-info
running install_scripts
creating build/bdist.macosx-10.6-x86_64/wheel/sshuttle-0.78.3.dist-info/WHEEL
installing
/private/var/folders/f8/2_rc4tgd1gj9vbgv7q9gbk4c0000gn/T/nix-build-sshuttle-0.78.3.drv-0/sshuttle-0.78.3/dist /private/var/folders/f8/2_rc4tgd1gj9vbgv7q9gbk4c0000gn/T/nix-build-sshuttle-0.78.3.drv-0/sshuttle-0.78.3
Processing ./sshuttle-0.78.3-py2.py3-none-any.whl
Installing collected packages: sshuttle
Successfully installed sshuttle-0.78.3
/private/var/folders/f8/2_rc4tgd1gj9vbgv7q9gbk4c0000gn/T/nix-build-sshuttle-0.78.3.drv-0/sshuttle-0.78.3
post-installation fixup
stripping (with flags -S) in /nix/store/yn1arai6j8fic83my2z9rv37j3as363j-sshuttle-0.78.3/lib  /nix/store/yn1arai6j8fic83my2z9rv37j3as363j-sshuttle-0.78.3/bin
patching script interpreter paths in /nix/store/yn1arai6j8fic83my2z9rv37j3as363j-sshuttle-0.78.3
wrapping `/nix/store/yn1arai6j8fic83my2z9rv37j3as363j-sshuttle-0.78.3/bin/.sshuttle-wrapped'...
running install tests
running pytest
running egg_info
writing sshuttle.egg-info/PKG-INFO
writing dependency_links to sshuttle.egg-info/dependency_links.txt
writing entry points to sshuttle.egg-info/entry_points.txt
writing top-level names to sshuttle.egg-info/top_level.txt
reading manifest file 'sshuttle.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'docs/_build'
writing manifest file 'sshuttle.egg-info/SOURCES.txt'
running build_ext
============================= test session starts ==============================
platform darwin -- Python 3.6.1, pytest-3.0.7, py-1.4.31, pluggy-0.4.0
rootdir: /private/var/folders/f8/2_rc4tgd1gj9vbgv7q9gbk4c0000gn/T/nix-build-sshuttle-0.78.3.drv-0/sshuttle-0.78.3, inifile:
collected 66 items

sshuttle/tests/client/test_firewall.py ..F
sshuttle/tests/client/test_helpers.py .......FF...
sshuttle/tests/client/test_methods_nat.py ........F
sshuttle/tests/client/test_methods_pf.py ..........FFF
sshuttle/tests/client/test_methods_tproxy.py ....F....F
sshuttle/tests/client/test_options.py ........
sshuttle/tests/client/test_sdnotify.py ......
sshuttle/tests/server/test_server.py .....

=================================== FAILURES ===================================
__________________________________ test_main ___________________________________

mock_get_method = <MagicMock name='get_method' id='4529715800'>
mock_setup_daemon = <MagicMock name='setup_daemon' id='4529490464'>
mock_rewrite_etc_hosts = <MagicMock name='rewrite_etc_hosts' id='4529713560'>

    @patch('sshuttle.firewall.rewrite_etc_hosts')
    @patch('sshuttle.firewall.setup_daemon')
    @patch('sshuttle.firewall.get_method')
    def test_main(mock_get_method, mock_setup_daemon, mock_rewrite_etc_hosts):
        stdin, stdout = setup_daemon()
        mock_setup_daemon.return_value = stdin, stdout

        mock_get_method("not_auto").name = "test"
        mock_get_method.reset_mock()

        sshuttle.firewall.main("not_auto", False)

        assert mock_rewrite_etc_hosts.mock_calls == [
            call({'1.2.3.3': 'existing'}, 1024),
            call({}, 1024),
        ]

        assert stdout.mock_calls == [
            call.write('READY test\n'),
            call.flush(),
            call.write('STARTED\n'),
            call.flush()
        ]
        assert mock_setup_daemon.mock_calls == [call()]
>       assert mock_get_method.mock_calls == [
            call('not_auto'),
            call().setup_firewall(
                1024, 1026,
                [(10, u'2404:6800:4004:80c::33')],
                10,
                [(10, 64, False, u'2404:6800:4004:80c::', 0, 0),
                    (10, 128, True, u'2404:6800:4004:80c::101f', 80, 80)],
                True),
            call().setup_firewall(
                1025, 1027,
                [(2, u'1.2.3.33')],
                2,
                [(2, 24, False, u'1.2.3.0', 8000, 9000),
                    (2, 32, True, u'1.2.3.66', 8080, 8080)],
                True),
            call().restore_firewall(1024, 10, True),
            call().restore_firewall(1025, 2, True),
        ]
E       AssertionError: assert [call('not_au...ET: 2>, True)] == [call('not_aut...025, 2, True)]
E         At index 1 diff: call().setup_firewall(1025, 1027, [(2, '1.2.3.33')], <AddressFamily.AF_INET: 2>, [(2, 24, False, '1.2.3.0', 8000, 9000), (2, 32, True, '1.2.3.66', 8080, 8080)], True) != call().setup_firewall(1024, 1026, [(10, '2404:6800:4004:80c::33')], 10, [(10, 64, False, '2404:6800:4004:80c::', 0, 0), (10, 128, True, '2404:6800:4004:80c::101f', 80, 80)], True)
E         Right contains more items, first extra item: call().restore_firewall(1024, 10, True)
E         Use -v to get the full diff

sshuttle/tests/client/test_firewall.py:116: AssertionError
_________________________ test_resolvconf_nameservers __________________________

mock_open = <MagicMock name='open' id='4530217984'>

    @patch('sshuttle.helpers.open', create=True)
    def test_resolvconf_nameservers(mock_open):
        mock_open.return_value = io.StringIO(u"""
    # Generated by NetworkManager
    search pri
    nameserver 192.168.1.1
    nameserver 192.168.2.1
    nameserver 192.168.3.1
    nameserver 192.168.4.1
    nameserver 2404:6800:4004:80c::1
    nameserver 2404:6800:4004:80c::2
    nameserver 2404:6800:4004:80c::3
    nameserver 2404:6800:4004:80c::4
    """)

        ns = sshuttle.helpers.resolvconf_nameservers()
>       assert ns == [
            (2, u'192.168.1.1'), (2, u'192.168.2.1'),
            (2, u'192.168.3.1'), (2, u'192.168.4.1'),
            (10, u'2404:6800:4004:80c::1'), (10, u'2404:6800:4004:80c::2'),
            (10, u'2404:6800:4004:80c::3'), (10, u'2404:6800:4004:80c::4')
        ]
E       AssertionError: assert [(<AddressFam...80c::2'), ...] == [(2, '192.168....80c::2'), ...]
E         At index 4 diff: (<AddressFamily.AF_INET6: 30>, '2404:6800:4004:80c::1') != (10, '2404:6800:4004:80c::1')
E         Use -v to get the full diff

sshuttle/tests/client/test_helpers.py:134: AssertionError
______________________ test_resolvconf_random_nameserver _______________________

mock_open = <MagicMock name='open' id='4530187848'>

    @patch('sshuttle.helpers.open', create=True)
    def test_resolvconf_random_nameserver(mock_open):
        mock_open.return_value = io.StringIO(u"""
    # Generated by NetworkManager
    search pri
    nameserver 192.168.1.1
    nameserver 192.168.2.1
    nameserver 192.168.3.1
    nameserver 192.168.4.1
    nameserver 2404:6800:4004:80c::1
    nameserver 2404:6800:4004:80c::2
    nameserver 2404:6800:4004:80c::3
    nameserver 2404:6800:4004:80c::4
    """)
        ns = sshuttle.helpers.resolvconf_random_nameserver()
>       assert ns in [
            (2, u'192.168.1.1'), (2, u'192.168.2.1'),
            (2, u'192.168.3.1'), (2, u'192.168.4.1'),
            (10, u'2404:6800:4004:80c::1'), (10, u'2404:6800:4004:80c::2'),
            (10, u'2404:6800:4004:80c::3'), (10, u'2404:6800:4004:80c::4')
        ]
E       AssertionError: assert (<AddressFamily.AF_INET6: 30>, '2404:6800:4004:80c::1') in [(2, '192.168.1.1'), (2, '192.168.2.1'), (2, '192.168.3.1'), (2, '192.168.4.1'), (10, '2404:6800:4004:80c::1'), (10, '2404:6800:4004:80c::2'), ...]

sshuttle/tests/client/test_helpers.py:157: AssertionError
_____________________________ test_setup_firewall ______________________________

mock_ipt_chain_exists = <MagicMock name='ipt_chain_exists' id='4530115640'>
mock_ipt_ttl = <MagicMock name='ipt_ttl' id='4530279928'>
mock_ipt = <MagicMock name='ipt' id='4530302032'>

    @patch('sshuttle.methods.nat.ipt')
    @patch('sshuttle.methods.nat.ipt_ttl')
    @patch('sshuttle.methods.nat.ipt_chain_exists')
    def test_setup_firewall(mock_ipt_chain_exists, mock_ipt_ttl, mock_ipt):
        mock_ipt_chain_exists.return_value = True
        method = get_method('nat')
        assert method.name == 'nat'

        with pytest.raises(Exception) as excinfo:
            method.setup_firewall(
                1024, 1026,
                [(10, u'2404:6800:4004:80c::33')],
                10,
                [(10, 64, False, u'2404:6800:4004:80c::', 0, 0),
                    (10, 128, True, u'2404:6800:4004:80c::101f', 80, 80)],
                True)
>       assert str(excinfo.value) \
            == 'Address family "AF_INET6" unsupported by nat method_name'
E       assert 'Address fami...t method_name' == 'Address famil...t method_name'
E         - Address family "10" unsupported by nat method_name
E         ?                 ^^
E         + Address family "AF_INET6" unsupported by nat method_name
E         ?                 ^^^^^^^^

sshuttle/tests/client/test_methods_nat.py:92: AssertionError
__________________________ test_setup_firewall_darwin __________________________

mock_pf_get_dev = <MagicMock name='pf_get_dev' id='4529343120'>
mock_ioctl = <MagicMock name='ioctl' id='4530028672'>
mock_pfctl = <MagicMock name='pfctl' id='4529866624'>

    @patch('sshuttle.helpers.verbose', new=3)
    @patch('sshuttle.methods.pf.pf', Darwin())
    @patch('sshuttle.methods.pf.pfctl')
    @patch('sshuttle.methods.pf.ioctl')
    @patch('sshuttle.methods.pf.pf_get_dev')
    def test_setup_firewall_darwin(mock_pf_get_dev, mock_ioctl, mock_pfctl):
        mock_pfctl.side_effect = pfctl

        method = get_method('pf')
        assert method.name == 'pf'

        # IPV6

        method.setup_firewall(
            1024, 1026,
            [(10, u'2404:6800:4004:80c::33')],
            10,
            [(10, 64, False, u'2404:6800:4004:80c::', 8000, 9000),
                (10, 128, True, u'2404:6800:4004:80c::101f', 8080, 8080)],
>           False)

sshuttle/tests/client/test_methods_pf.py:187:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sshuttle.methods.pf.Method object at 0x10df84358>, port = 1024
dnsport = 1026, nslist = [(10, '2404:6800:4004:80c::33')], family = 10
subnets = [(10, 64, False, '2404:6800:4004:80c::', 8000, 9000), (10, 128, True, '2404:6800:4004:80c::101f', 8080, 8080)]
udp = False

    def setup_firewall(self, port, dnsport, nslist, family, subnets, udp):
        tables = []
        translating_rules = []
        filtering_rules = []

        if family not in [socket.AF_INET, socket.AF_INET6]:
            raise Exception(
                'Address family "%s" unsupported by pf method_name'
>               % family_to_string(family))
E           Exception: Address family "10" unsupported by pf method_name

sshuttle/methods/pf.py:428: Exception
_________________________ test_setup_firewall_freebsd __________________________

mock_pf_get_dev = <MagicMock name='pf_get_dev' id='4530971760'>
mock_ioctl = <MagicMock name='ioctl' id='4529555384'>
mock_pfctl = <MagicMock name='pfctl' id='4529929408'>

    @patch('sshuttle.helpers.verbose', new=3)
    @patch('sshuttle.methods.pf.pf', FreeBsd())
    @patch('sshuttle.methods.pf.pfctl')
    @patch('sshuttle.methods.pf.ioctl')
    @patch('sshuttle.methods.pf.pf_get_dev')
    def test_setup_firewall_freebsd(mock_pf_get_dev, mock_ioctl, mock_pfctl):
        mock_pfctl.side_effect = pfctl

        method = get_method('pf')
        assert method.name == 'pf'

        method.setup_firewall(
            1024, 1026,
            [(10, u'2404:6800:4004:80c::33')],
            10,
            [(10, 64, False, u'2404:6800:4004:80c::', 8000, 9000),
                (10, 128, True, u'2404:6800:4004:80c::101f', 8080, 8080)],
>           False)

sshuttle/tests/client/test_methods_pf.py:293:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sshuttle.methods.pf.Method object at 0x10e112438>, port = 1024
dnsport = 1026, nslist = [(10, '2404:6800:4004:80c::33')], family = 10
subnets = [(10, 64, False, '2404:6800:4004:80c::', 8000, 9000), (10, 128, True, '2404:6800:4004:80c::101f', 8080, 8080)]
udp = False

    def setup_firewall(self, port, dnsport, nslist, family, subnets, udp):
        tables = []
        translating_rules = []
        filtering_rules = []

        if family not in [socket.AF_INET, socket.AF_INET6]:
            raise Exception(
                'Address family "%s" unsupported by pf method_name'
>               % family_to_string(family))
E           Exception: Address family "10" unsupported by pf method_name

sshuttle/methods/pf.py:428: Exception
_________________________ test_setup_firewall_openbsd __________________________

mock_pf_get_dev = <MagicMock name='pf_get_dev' id='4530508688'>
mock_ioctl = <MagicMock name='ioctl' id='4529738416'>
mock_pfctl = <MagicMock name='pfctl' id='4530218656'>

    @patch('sshuttle.helpers.verbose', new=3)
    @patch('sshuttle.methods.pf.pf', OpenBsd())
    @patch('sshuttle.methods.pf.pfctl')
    @patch('sshuttle.methods.pf.ioctl')
    @patch('sshuttle.methods.pf.pf_get_dev')
    def test_setup_firewall_openbsd(mock_pf_get_dev, mock_ioctl, mock_pfctl):
        mock_pfctl.side_effect = pfctl

        method = get_method('pf')
        assert method.name == 'pf'

        method.setup_firewall(
            1024, 1026,
            [(10, u'2404:6800:4004:80c::33')],
            10,
            [(10, 64, False, u'2404:6800:4004:80c::', 8000, 9000),
                (10, 128, True, u'2404:6800:4004:80c::101f', 8080, 8080)],
>           False)

sshuttle/tests/client/test_methods_pf.py:388:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sshuttle.methods.pf.Method object at 0x10dfa8dd8>, port = 1024
dnsport = 1026, nslist = [(10, '2404:6800:4004:80c::33')], family = 10
subnets = [(10, 64, False, '2404:6800:4004:80c::', 8000, 9000), (10, 128, True, '2404:6800:4004:80c::101f', 8080, 8080)]
udp = False

    def setup_firewall(self, port, dnsport, nslist, family, subnets, udp):
        tables = []
        translating_rules = []
        filtering_rules = []

        if family not in [socket.AF_INET, socket.AF_INET6]:
            raise Exception(
                'Address family "%s" unsupported by pf method_name'
>               % family_to_string(family))
E           Exception: Address family "10" unsupported by pf method_name

sshuttle/methods/pf.py:428: Exception
________________________________ test_send_udp _________________________________

mock_socket = <MagicMock name='socket' id='4530205136'>

    @patch("sshuttle.methods.socket.socket")
    def test_send_udp(mock_socket):
        sock = Mock()
        method = get_method('tproxy')
        method.send_udp(sock, "127.0.0.2", "127.0.0.1", "2222222")
        assert sock.mock_calls == []
>       assert mock_socket.mock_calls == [
            call(sock.family, 2),
            call().setsockopt(1, 2, 1),
            call().setsockopt(0, 19, 1),
            call().bind('127.0.0.2'),
            call().sendto("2222222", '127.0.0.1'),
            call().close()
        ]
E       assert [call(<Mock n...all().close()] == [call(<Mock na...all().close()]
E         At index 1 diff: call().setsockopt(65535, 4, 1) != call().setsockopt(1, 2, 1)
E         Use -v to get the full diff

sshuttle/tests/client/test_methods_tproxy.py:50: AssertionError
_____________________________ test_setup_firewall ______________________________

mock_ipt_chain_exists = <MagicMock name='ipt_chain_exists' id='4530117824'>
mock_ipt_ttl = <MagicMock name='ipt_ttl' id='4531133688'>
mock_ipt = <MagicMock name='ipt' id='4532278272'>

    @patch('sshuttle.methods.tproxy.ipt')
    @patch('sshuttle.methods.tproxy.ipt_ttl')
    @patch('sshuttle.methods.tproxy.ipt_chain_exists')
    def test_setup_firewall(mock_ipt_chain_exists, mock_ipt_ttl, mock_ipt):
        mock_ipt_chain_exists.return_value = True
        method = get_method('tproxy')
        assert method.name == 'tproxy'

        # IPV6

        method.setup_firewall(
            1024, 1026,
            [(10, u'2404:6800:4004:80c::33')],
            10,
            [(10, 64, False, u'2404:6800:4004:80c::', 8000, 9000),
                (10, 128, True, u'2404:6800:4004:80c::101f', 8080, 8080)],
>           True)

sshuttle/tests/client/test_methods_tproxy.py:107:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <sshuttle.methods.tproxy.Method object at 0x10e048c50>, port = 1024
dnsport = 1026, nslist = [(10, '2404:6800:4004:80c::33')], family = 10
subnets = [(10, 64, False, '2404:6800:4004:80c::', 8000, 9000), (10, 128, True, '2404:6800:4004:80c::101f', 8080, 8080)]
udp = True

    def setup_firewall(self, port, dnsport, nslist, family, subnets, udp):
        if family not in [socket.AF_INET, socket.AF_INET6]:
            raise Exception(
                'Address family "%s" unsupported by tproxy method'
>               % family_to_string(family))
E           Exception: Address family "10" unsupported by tproxy method

sshuttle/methods/tproxy.py:157: Exception
===================== 9 failed, 57 passed in 0.69 seconds ======================
builder for ‘/nix/store/zrsbn3mlqkhq60wlpvsrghsgjsr3pf4z-sshuttle-0.78.3.drv’ failed with exit code 1

Steps to reproduce

nix-env -i sshuttle

Technical details

fpletz commented 7 years ago

Do you have IPv6 disabled?

dredozubov commented 7 years ago

No, but I'm not using a trusted connection right now. @fpletz Can you reproduce the issue with the reproduction steps I've mentioned?

fpletz commented 7 years ago

I can indeed reproduce this on darwin only.

copumpkin commented 7 years ago

Seems like tests shouldn't rely on the host's network configuration, especially since that'll break when we turn the Darwin sandbox back on. I'm surprised this works on Linux, come to think of it.

globin commented 7 years ago

It looks like the darwin kernel does not support tproxy, but that probably is more of an upstream bug.

matthewbauer commented 6 years ago

Fixed in nixpkgs-unstable.