FS#50895 - [sshuttle] Command line in systemd service file generates error

Attached to Project: Community Packages
Opened by desbma (desbma) - Monday, 26 September 2016, 10:20 GMT
Last edited by Doug Newgard (Scimmia) - Sunday, 22 October 2017, 15:22 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi,

The systemd service file included in this package seems to contain an invalid command line.

I get this error when running `systemctl start sshuttle`:

Traceback (most recent call last):
File "/usr/bin/sshuttle", line 9, in <module>
load_entry_point('sshuttle==0.78.1', 'console_scripts', 'sshuttle')()
File "/usr/lib/python3.5/site-packages/sshuttle/cmdline.py", line 12, in main
opt = parser.parse_args()
File "/usr/lib/python3.5/argparse.py", line 1726, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/lib/python3.5/argparse.py", line 1758, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/lib/python3.5/argparse.py", line 1964, in _parse_known_args
start_index = consume_optional(start_index)
File "/usr/lib/python3.5/argparse.py", line 1904, in consume_optional
take_action(action, args, option_string)
File "/usr/lib/python3.5/argparse.py", line 1832, in take_action
action(self, namespace, argument_values, option_string)
File "/usr/lib/python3.5/site-packages/sshuttle/options.py", line 110, in __call__
setattr(namespace, self.dest, curr_value + values)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'list'

I first reported this upstream (https://github.com/sshuttle/sshuttle/issues/116), but it seems it is only caused by the command line in the service file.
The subnet positional parameter is mandatory (even when using the subnet file parameter) and is missing in this case.

If that helps, my /etc/sshuttle/prefixes.conf has the following content:

# Output prefixes here, one per line. Prefix is in:
# prefix/netmask format
# Like this:
# 192.168.0.0/16
# 192.0.43.10/32
0/0
This task depends upon

Closed by  Doug Newgard (Scimmia)
Sunday, 22 October 2017, 15:22 GMT
Reason for closing:  Fixed
Additional comments about closing:  sshuttle 0.78.3-1
Comment by desbma (desbma) - Monday, 26 September 2016, 10:38 GMT
Stand by, it seems upstream have accepted this as a bug...
Comment by desbma (desbma) - Monday, 07 November 2016, 21:19 GMT
Since:
* this bug has been fixed upstream 6 weeks ago
* the fix is not yet in a tagged release (only on git master branch)
* the systemd service file included in this package is useless without the fix
* the fix is trivial, see https://github.com/sshuttle/sshuttle/pull/117

Maybe the fix should be included as a patch on top of 0.78.1 and included in this package?

Also it is worth noting they have documented how to build a service file which notifies systemd when sshuttle is ready. See here: https://github.com/sshuttle/sshuttle/commit/6d5d0d766f85eea41654dc0ec6130640c09078f4.
Comment by desbma (desbma) - Sunday, 22 October 2017, 12:02 GMT
Fixed in 0.78.3-1

Loading...