Bug 242760

Summary: net-p2p/deluge-cli fails to start since net-p2p/libtorrent-rasterbar update to 1.2.2
Product: Ports & Packages Reporter: Wade <freebsd.bug>
Component: Individual Port(s)Assignee: Ruslan Makhmatkhanov <rm>
Status: Open ---    
Severity: Affects Many People CC: avatar4d, daniel.engberg.lists, jordy, renchap, rene, rm, t3, xasthurii
Priority: --- Keywords: regression
Version: Latest   
Hardware: amd64   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241202
Bug Depends on: 242797    
Bug Blocks:    

Description Wade 2019-12-21 09:23:17 UTC
"service deluged start" fails with the following traceback after net-p2p/libtorrent-rasterbar was updated to 1.2.2 ports r520456


[ERROR   ] 19:07:18 main:248 No module named libtorrent
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/deluge/main.py", line 241, in start_daemon
    Daemon(options, args)
  File "/usr/local/lib/python2.7/site-packages/deluge/core/daemon.py", line 144, in __init__
    from deluge.core.core import Core
  File "/usr/local/lib/python2.7/site-packages/deluge/core/core.py", line 38, in <module>
    from deluge._libtorrent import lt
  File "/usr/local/lib/python2.7/site-packages/deluge/_libtorrent.py", line 59, in <module>
    import libtorrent as lt
ImportError: No module named libtorrent
Comment 1 daniel.engberg.lists 2019-12-21 23:55:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241202

It should be marked as BROKEN until update is in tree
Comment 2 Yuri Victorovich freebsd_committer 2019-12-21 23:57:38 UTC
The maintainer promised to update Deluge ports over the weekend.
Comment 3 Wade 2019-12-22 03:52:56 UTC
The proposed fix in bug #241202 is to bump deluge to the 2.x branch, which is completely incompatible with 1.x clients used for remote management. Deluge 2.x client support for is currently severely lacking, at least compared to 1.x.

Can deluge 1.x be patched to work with libtorrent-rasterbar 1.2.x?
Is libtorrent-rasterbar 1.2.x inherently incompatible with deluge 1.x?
Is there a way to force install libtorrent-rasterbar 1.1.10 (last known working)?
Comment 4 Yuri Victorovich freebsd_committer 2019-12-22 04:13:49 UTC
Assign to the port maintainer.
Comment 5 Ruslan Makhmatkhanov freebsd_committer 2019-12-22 09:22:32 UTC
If I understand correctly, py-libtorrent-rasterbar is broken - it doesn't installs anything. Look like some plist problem. This is why deluge is not capable to find libtorrent module.

[rm@cf ~]> pkg list py37-libtorrent-rasterbar-1.2.2
/usr/local/lib/python3.7/site-packages/python_libtorrent-1.2.2-py3.7.egg-info/PKG-INFO
/usr/local/lib/python3.7/site-packages/python_libtorrent-1.2.2-py3.7.egg-info/SOURCES.txt
/usr/local/lib/python3.7/site-packages/python_libtorrent-1.2.2-py3.7.egg-info/dependency_links.txt
/usr/local/lib/python3.7/site-packages/python_libtorrent-1.2.2-py3.7.egg-info/top_level.txt
/usr/local/share/licenses/py37-libtorrent-rasterbar-1.2.2/BSD3CLAUSE
/usr/local/share/licenses/py37-libtorrent-rasterbar-1.2.2/LICENSE
/usr/local/share/licenses/py37-libtorrent-rasterbar-1.2.2/catalog.mk

It only installs a bunch of text files.
Comment 6 Rene Ladan freebsd_committer 2020-03-01 17:43:53 UTC
Note that this port expired today due to still using Python 2.7 which got unsupported this year by upstream.
Comment 7 Yuri Victorovich freebsd_committer 2020-03-08 16:30:39 UTC
Somebody who uses Deluge should re-test it now because net-p2p/py-libtorrent-rasterbar has been updated to 1.2.4
Comment 8 jordy 2020-03-08 23:32:13 UTC
Just updated my ports tree to test the last fix. Still can't start deluged:

[ERROR   ] 00:30:48 main:248 'module' object has no attribute 'session_settings'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/deluge/main.py", line 241, in start_daemon
    Daemon(options, args)
  File "/usr/local/lib/python2.7/site-packages/deluge/core/daemon.py", line 147, in __init__
    read_only_config_keys=read_only_config_keys)
  File "/usr/local/lib/python2.7/site-packages/deluge/core/core.py", line 106, in __init__
    self.settings = lt.session_settings()
AttributeError: 'module' object has no attribute 'session_settings'
Comment 9 Yuri Victorovich freebsd_committer 2020-03-08 23:48:01 UTC
(In reply to jordy from comment #8)

> Just updated my ports tree to test the last fix. Still can't start deluged:

You need to take this up with https://github.com/arvidn/libtorrent


Yuri
Comment 10 jordy 2020-03-08 23:49:30 UTC
Apparently deluge 1.x isn't compatible with libtorrent 1.2.x.
The only solution is to upgrade to 2.x
Comment 11 daniel.engberg.lists 2020-03-09 07:10:30 UTC
1.2-branch also doesn't support Python 3 so it's going to be axed anyway.
Comment 12 Kubilay Kocak freebsd_committer freebsd_triage 2020-03-17 22:43:46 UTC
*** Bug 244854 has been marked as a duplicate of this bug. ***
Comment 13 Kubilay Kocak freebsd_committer freebsd_triage 2020-03-17 22:44:34 UTC
Is there an open upstream issue (or discussion, PR, commit) for this?
Comment 14 daniel.engberg.lists 2020-03-18 09:44:13 UTC
Deluge (and cli port) simply needs to be updated to 2.0-branch, there's no PR and upstream doesn't intend to backport this as 2.0 was released to fix compatibility with libtorrent 1.2-branch. Source: https://deluge.readthedocs.io/en/latest/releases/2.0.html

As I suggested here ( https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242760#c1 ) these ports should be marked as broken until update is in tree.
Comment 15 Ruslan Makhmatkhanov freebsd_committer 2020-03-18 10:02:34 UTC
Hello, I'm now testing deluge 2.0.3 update and going to update it in the ports tree this week. Upstream switched to client/server model, so rc-scripts also should be adjusted accordingly to get it working. Please hold on.
Comment 16 Sam H 2020-04-03 19:47:35 UTC
Where is the promised update to Deluge 2?