AUR install error

Hi all,
My first post so forgive me if I’m posting in the wrong place.
Attempting install from the AUR on my Manjaro box and I get the error below,
Any help, insight or both would be much apprieciated.
Thanks

Preparing…

Building python-portend…
Cloning into ‘python-portend’…
remote: Counting objects: 19, done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 19 (delta 7), reused 0 (delta 0)
Unpacking objects: 100% (19/19), done.
==> Making package: python-portend 2.1.2-3 (ma 11 sep 2017 13:33:21 CEST)
==> Checking runtime dependencies…
==> Checking buildtime dependencies…
==> Retrieving sources…
-> Downloading 2.1.2.tar.gz…
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 121 0 121 0 0 121 0 --:–:-- --:–:-- --:–:-- 181
100 6616 0 6616 0 0 6616 0 --:–:-- 0:00:01 --:–:-- 11730
==> Validating source files with md5sums…
2.1.2.tar.gz … Passed
==> Extracting sources…
-> Extracting 2.1.2.tar.gz with bsdtar
==> Starting build()…
running build
running build_py
creating build
creating build/lib
copying portend.py -> build/lib
running egg_info
creating portend.egg-info
writing portend.egg-info/PKG-INFO
writing dependency_links to portend.egg-info/dependency_links.txt
writing requirements to portend.egg-info/requires.txt
writing top-level names to portend.egg-info/top_level.txt
writing manifest file 'portend.egg-info/SOURCES.txt’
reading manifest file 'portend.egg-info/SOURCES.txt’
writing manifest file 'portend.egg-info/SOURCES.txt’
running build
running build_py
creating build
creating build/lib
copying portend.py -> build/lib
running egg_info
creating portend.egg-info
writing requirements to portend.egg-info/requires.txt
writing portend.egg-info/PKG-INFO
writing top-level names to portend.egg-info/top_level.txt
writing dependency_links to portend.egg-info/dependency_links.txt
writing manifest file 'portend.egg-info/SOURCES.txt’
reading manifest file 'portend.egg-info/SOURCES.txt’
writing manifest file ‘portend.egg-info/SOURCES.txt’
==> Starting check()…
python create: /tmp/pamac-build-user/python-portend/src/portend-2.1.2/.tox/python
python develop-inst: /tmp/pamac-build-user/python-portend/src/portend-2.1.2
python installed: -e git+https://aur.archlinux.org/python-portend.git@a3988a24247a3a8cc8bb3e59e2e57f06816a567e#egg=portend&subdirectory=src/portend-2.1.2,py==1.4.34,pytest==3.2.2,pytest-sugar==0.9.0,pytest-warnings==0.3.0,pytz==2017.2,six==1.10.0,tempora==1.9,termcolor==1.1.0
python runtests: PYTHONHASHSEED='1255721341’
python runtests: commands[0] | py.test
/tmp/pamac-build-user/python-portend/src/portend-2.1.2/.tox/python/lib/python3.6/site-packages/pytest_warnings/init.py:44: UserWarning: pytest-warnings plugin was introduced in core pytest on 3.1, please uninstall pytest-warnings
warnings.warn('pytest-warnings plugin was introduced in core pytest on 3.1, please '
Test session starts (platform: linux, Python 3.6.2, pytest 3.2.2, pytest-sugar 0.9.0)
rootdir: /tmp/pamac-build-user/python-portend/src/portend-2.1.2, inifile: pytest.ini
plugins: warnings-0.3.0, sugar-0.9.0

―――――――――――――――――――――――――――― ERROR collecting test_portend.py ――――――――――――――――――――――――――――
test_portend.py:32: in
@pytest.fixture(**build_addr_infos())
test_portend.py:27: in build_addr_infos
params = list(socket_infos())
test_portend.py:14: in socket_infos
port = portend.find_available_local_port()
portend.py:162: in find_available_local_port
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
/usr/lib64/python3.6/socket.py:144: in init
_socket.socket.init(self, family, type, proto, fileno)
E OSError: [Errno 97] Address family not supported by protocol

―――――――――――――――――――――――――――― ERROR collecting test_portend.py ――――――――――――――――――――――――――――
test_portend.py:32: in
@pytest.fixture(**build_addr_infos())
test_portend.py:27: in build_addr_infos
params = list(socket_infos())
test_portend.py:14: in socket_infos
port = portend.find_available_local_port()
portend.py:162: in find_available_local_port
sock = socket.socket(socket.AF_INET6, socket.SOCK_STREAM)
/usr/lib64/python3.6/socket.py:144: in init
_socket.socket.init(self, family, type, proto, fileno)
E OSError: [Errno 97] Address family not supported by protocol

!!! Interrupted: 2 errors during collection !!!

Results (0.28s):
ERROR: InvocationError: ‘/tmp/pamac-build-user/python-portend/src/portend-2.1.2/.tox/python/bin/py.test’
________________________________________ summary _________________________________________
ERROR: python: commands failed
==> ERROR: A failure occurred in check().
Abourting

Hi @snaggle, I work on developing tribler and use Arch, so my anwser should be close enough for your needs.

The error you are running into seems to be for a dependency. A python 3.x dependency at that, while tribler uses 2.7. So probably a split package. And it fails on init of IPv6 socket, so I’m guessing you disabled IPv6 on your kernel? Perhaps you can edit the PKGBUILD for this dependency to skip testing?

After that, the current PKGBUILD in AUR is terrible. The release tar file that they depend on does not take into account the recursive submodule init. As in, it won’t load dispersy, pymdht or any of the other stuff that’s needed. This cannot possibly work. Arguably this should actually be packaged in the release tar, but that’s another matter.

I recently built a PKGBUILD for a more minimal/headless tribler. The architecture tags make it work on my raspberry-pi also. (Dead Slow btw) And the depencencies are limited to what the core needs to download stuff.

_basename=tribler
pkgname=$_basename-server
pkgver=v7.0.0.rc2.12701.bc8991f22
pkgrel=1
pkgdesc="Core functional component of the privacy enhanced BitTorrent client with P2P content discovery."
url="https://github.com/Tribler/tribler"
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
license=('LGPL3')
depends=('libsodium' 'libtorrent-rasterbar' 'python2-apsw' 'python2-cherrypy' 'python2-cryptography' 'python2-decorator' 'python2-feedparser' 'python2-chardet' 'python2-m2crypto' 'python2-netifaces' 'python2-plyvel' 'python2-requests' 'python2-twisted' 'python2-configobj')
source=('git+https://github.com/tribler/Tribler.git#branch=next'
  'logger.conf'
  'libtribler.conf'
  'tribler-server.service')
sha512sums=('SKIP'
  'c904f09a1be873dd629c56b838c6ccb20c9a68999db7a59c425c75dc13c92eed1f334acdfe9c01a673dbddf93cc6c7e61615cb382a3e03321f8cd8049ff94e46'
  '2f67921c448223d7af629609fc45c04b154872c16775df48924074aedd46cbaf536d08d3bbff26aec29ac88764dbe9cf685f6c87b137a367458928fe1b37bb0a'
  'ca6e78a581460ecb24bfa77d0e3bff84cde34118ccaca28521b8937ff609768e0d61a813ae23cdcaffc5b285caf98f92c06eb0f35da3517a668d8d278c5140c1')  
 pkgver() {
  cd "Tribler"
  echo $(git tag | tail -1 | tr '-' '.').$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}
 prepare() {
  cd "Tribler"
  git submodule update --init --recursive
}
 package() {
  mkdir -p "$pkgdir"/{usr/{share/$pkgname,lib/systemd/system},etc/tribler}
  cp "$srcdir/tribler-server.service" "$pkgdir/usr/lib/systemd/system/tribler-server.service"
  cp "$srcdir"/{logger,libtribler}.conf "$pkgdir/etc/tribler"
  mv "$srcdir/Tribler"/{Tribler,twisted} "$pkgdir/usr/share/$pkgname/"
  rm -rf "$pkgdir/usr/share/$pkgname"/Tribler/{Core/DecentralizedTracking/pymdht/{doc,example.txt,profiler,release_tools,scripts,setup.py,ui,ut2mdht,run_pymdht_node.py},Test,Main,dispersy/{diff,docs,scripts,tests,tracker,twisted,libnacl/doc}}
  find $pkgdir -name ".git*" -print0 | xargs -0 rm -rf
}

This adds a few custom files: logger.conf, libtribler.conf and a systemd unit. These are mostly what you’d expect. but it also deletes the GUI and documentation components.

I think you can adapt this PKGBUILD to suit your needs.

1 Like

Hey Captaincoder.
Sorry for the late response and thanks for yours, I’m at work now but will look closer at this this evening.
I have disabled IPv6 on my Arch box. So that’s progress already.
I’ll update later.
Thanks again