Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 950321 - sys-block/targetcli-fb must be updated to v3.0.1 work with the recent dev-python/rtslib-fb-2.2.2 update
Summary: sys-block/targetcli-fb must be updated to v3.0.1 work with the recent dev-pyt...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2025-02-26 21:31 UTC by krz0ut75
Modified: 2025-04-01 03:01 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild file for targetcli-fb-3.0.1 (targetcli-fb-3.0.1.ebuild,945 bytes, application/vnd.gentoo.ebuild)
2025-03-09 00:02 UTC, Chris Paras
Details
Modified rtslib-fb-2.1.76 ebuild (rtslib-fb-2.1.76.ebuild,687 bytes, text/plain)
2025-03-09 14:02 UTC, Krzysztof
Details

Note You need to log in before you can comment on or make changes to this bug.
Description krz0ut75 2025-02-26 21:31:01 UTC
In short: targetcli-fb needs to be updated to v3.0.1 to not fail at startup.

In more detail:

The problem is that this github issue:
https://github.com/open-iscsi/rtslib-fb/issues/207

Which manifests on gentoo right now, as:

# rc-service targetcli-fb start
 * Starting targetcli-fb ...
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.12/targetcli", line 24, in <module>
    from targetcli import UIRoot
  File "/usr/lib/python3.12/site-packages/targetcli/__init__.py", line 18, in <module>
    from .ui_root import UIRoot
  File "/usr/lib/python3.12/site-packages/targetcli/ui_root.py", line 31, in <module>
    from rtslib_fb.utils import ignored
ModuleNotFoundError: No module named 'rtslib_fb.utils'; 'rtslib_fb' is not a package           


Requires this specific targetcli-fb release to be fixed:
https://github.com/open-iscsi/targetcli-fb/releases/tag/v3.0.1

The changes for v3.0.1 state that they "Drop the _fb suffix from rtslib and configshell module names", which should fix the above problem.
Comment 1 krz0ut75 2025-02-26 21:32:26 UTC
Adding Sam James to CC, since he most recently updated targetcli-fb.
Comment 2 Chris Paras 2025-03-05 23:43:24 UTC
I can confirm this. As a workaround, downgrading to dev-python/rtslib-fb-2.1.76 helped.
Comment 3 Chris Paras 2025-03-09 00:02:47 UTC
Created attachment 920381 [details]
ebuild file for targetcli-fb-3.0.1

ebuild file for targetcli-fb-3.0.1

targetcli-fb-3.0.1 changed from setuptools to hatchling, i had to modify the ebuild to make it work:

DISTUTILS_USE_PEP517=hatchling
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}

Please consider this ebuild file as experimental.
Comment 4 Chris Paras 2025-03-09 00:04:35 UTC
Just discovered another problem related to rtslib-fb-2.2.2:

rtslib-fb is missing the /usr/bin/targetctl script, i opened a bug report:

https://bugs.gentoo.org/950964
Comment 5 Krzysztof 2025-03-09 14:02:58 UTC
Created attachment 920430 [details]
Modified rtslib-fb-2.1.76 ebuild

added Python 12
Comment 6 Krzysztof 2025-03-09 14:03:51 UTC
For me, building attached targetcli-fb-3.0.1 with rtslib-fb-2.2.2 still results in an error while restoring config:

targetcli shell version 3.0.1                                                                                                  
Copyright 2011-2013 by Datera, Inc and others.                                                                                 
For help on commands, type 'help'.                                                                                             
                                                                                                                               
/> restoreconfig /etc/target/saveconfig.json                                                                                   
Traceback (most recent call last):                                                                                             
  File "/usr/lib/python-exec/python3.12/targetcli", line 8, in <module>                                                        
    sys.exit(main())                                                                                                           
             ^^^^^^                                                                                                            
  File "/usr/lib/python3.12/site-packages/targetcli/targetcli_shell.py", line 313, in main                                     
    shell.run_interactive()                                                                                                    
  File "/usr/lib/python3.12/site-packages/configshell/shell.py", line 886, in run_interactive                                  
    self._cli_loop()                                                                                                           
  File "/usr/lib/python3.12/site-packages/configshell/shell.py", line 719, in _cli_loop                                        
    self.run_cmdline(cmdline)                                                                                                  
  File "/usr/lib/python3.12/site-packages/configshell/shell.py", line 831, in run_cmdline                                      
    self._execute_command(path, command, pparams, kparams)                                                                     
  File "/usr/lib/python3.12/site-packages/configshell/shell.py", line 806, in _execute_command                                 
    result = target.execute_command(command, pparams, kparams)                                                                 
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                 
  File "/usr/lib/python3.12/site-packages/configshell/node.py", line 1394, in execute_command                                  
    return method(*pparams, **kparams)                                                                                         
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                         
  File "/usr/lib/python3.12/site-packages/targetcli/ui_root.py", line 208, in ui_command_restoreconfig                         
    errors = self.rtsroot.restore_from_file(savefile, clear_existing,                                                          
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                          
  File "/usr/lib/python3.12/site-packages/rtslib/root.py", line 490, in restore_from_file                                      
    with Path(restore_file).open as f:                                                                                         
         ^^^^^^^^^^^^^^^^^^^^^^^                                                                                               
TypeError: 'method' object does not support the context manager protocol

So the only viable option is to return to targetcli-fb-2.1.58 and rtslib-fb-2.1.76, but the later is not in repo anymore :) It's scary to update anything lately...

You can use attached file at your own risk (rtslib-fb-2.1.76) as local build temp solution.
Comment 7 Larry the Git Cow gentoo-dev 2025-03-10 07:19:48 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcc8ba7ca1d9ce1872fcbea7c1b3552ae0b17ed0

commit bcc8ba7ca1d9ce1872fcbea7c1b3552ae0b17ed0
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2025-03-10 07:06:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-03-10 07:19:02 +0000

    sys-block/targetcli-fb: add upperbound for rtslib-fb
    
    Bug: https://bugs.gentoo.org/950321
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/40990
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{targetcli-fb-2.1.58.ebuild => targetcli-fb-2.1.58-r1.ebuild}     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4fd9d781b9222a444da7ecba34574ebebfa2dead

commit 4fd9d781b9222a444da7ecba34574ebebfa2dead
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2025-03-10 07:02:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-03-10 07:19:01 +0000

    dev-python/rtslib-fb: restore 2.1.76
    
    Bug: https://bugs.gentoo.org/950321
    Bug: https://bugs.gentoo.org/950964
    Reverts: e29d210541b6232a1ce68914d2de913b00718ab4
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-python/rtslib-fb/Manifest                |  1 +
 dev-python/rtslib-fb/rtslib-fb-2.1.76.ebuild | 37 ++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+)