Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 564672 - net-nntp/sabnzbd lacks sabnzbd.service file to run as systemd service
Summary: net-nntp/sabnzbd lacks sabnzbd.service file to run as systemd service
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Justin Bronder (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: install-systemd-unit
  Show dependency tree
 
Reported: 2015-11-02 01:20 UTC by M. B.
Modified: 2015-11-12 05:52 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description M. B. 2015-11-02 01:20:53 UTC
As the topic already describes: sabnzbd lacks a .service file to run sabnzbd as a systemd service.

Reproducible: Always
Comment 1 Justin Bronder (RETIRED) gentoo-dev 2015-11-10 16:12:56 UTC
@systemd team

I'm happy to add a service file to the ebuild but I don't run systemd so I'll need you guys to support it.

@M.B.

User contributions/support are also welcome of course.
Comment 2 Denis Romanchuk 2015-11-11 07:11:51 UTC
I wrote basic sabnzbd@.service file by means of which sabnzbd successfully activates despite the connection refused error during activation, which is because nothing listening on 23053 gntp port. After installing growl-for-linux and running it manually (by default it's sitting on 23053 port) sabnzbd growler was able to successfully register and send notification, so I think we should add growl-for-linux to dependency and also provide systemd service files and socket activation for it. I will test it and put on review asap if you don't mind :)

# To start SABNzbd once for USER use:
#   systemctl start sabnzbd@USER.service
#
# To start SABNzbd on boot for USER use:
#   systemctl enable sabnzbd@USER.service
#
# Config will be placed in ~USER/.sabnzbd/

[Unit]
Description=SABnzbd binary newsreader

[Service]
ExecStart=/usr/bin/sabnzbd -f /home/%I/.sabnzbd/sabnzbd.ini --logging 1 --browser 0
User=%I
Group=%I

[Install]
WantedBy=multi-user.target
Comment 3 Justin Bronder (RETIRED) gentoo-dev 2015-11-11 14:19:41 UTC
(In reply to Denis Romanchuk from comment #2)
> I wrote basic sabnzbd@.service file by means of which sabnzbd successfully
> activates despite the connection refused error during activation, which is
> because nothing listening on 23053 gntp port. After installing
> growl-for-linux and running it manually (by default it's sitting on 23053
> port) sabnzbd growler was able to successfully register and send
> notification, so I think we should add growl-for-linux to dependency and
> also provide systemd service files and socket activation for it. I will test
> it and put on review asap if you don't mind :)

Is growl-for-linux an alternative to gntp?  I'm using sabnzbd on a headless server so I don't really use the gntp stuff at all.  I can see adding it as a dependency if a use flag is selected.

> 
> [Unit]
> Description=SABnzbd binary newsreader
> 
> [Service]
> ExecStart=/usr/bin/sabnzbd -f /home/%I/.sabnzbd/sabnzbd.ini --logging 1
> --browser 0
> User=%I
> Group=%I
> 
> [Install]
> WantedBy=multi-user.target

Looks good to me, @systemd, any comment?
Comment 4 Denis Romanchuk 2015-11-12 04:43:32 UTC
gntp is a protocol to allow two-way communication between applications and centralized notification systems, so growl-for-linux is just one of the notification server like e.g notify-osd or knotify on kde. As I understand growl basically running on mac os and it's assumed that on well-known 23053 gntp port growl will listen to the notifications. On gentoo there are variety of such apps and that's why I've got connection refused error from gntp notifier with my gnome-shell.

2015-11-12 00:03:12,021::DEBUG::[growler:205] Unknown Growl registration error
2015-11-12 00:03:12,021::INFO::[growler:206] Traceback: 
Traceback (most recent call last):
  File "/usr/share/sabnzbd/sabnzbd/growler.py", line 189, in register_growl
    ret = growler.register()
  File "/usr/lib64/python2.7/site-packages/gntp/notifier.py", line 94, in register
    return self._send('register', register)
  File "/usr/lib64/python2.7/site-packages/gntp/notifier.py", line 201, in _send
    raise errors.NetworkError(exc)
NetworkError: [Errno 111] Connection refused

We can disable notifications in default sabnzbd config, so everything goes quiet without growl.

https://github.com/gentoo/gentoo/pull/355/files
Comment 5 Justin Bronder (RETIRED) gentoo-dev 2015-11-12 05:52:37 UTC
Committed, thanks for the help!

    net-nntp/sabnzbd: systemd support

    https://bugs.gentoo.org/show_bug.cgi?id=564672
    Thanks to Denis Romanchuk for the patches.

    Package-Manager: portage-2.2.20.1