FS#50877 - [tor] add multi-instance service unit file

Attached to Project: Community Packages
Opened by nusenu (nusenu) - Friday, 23 September 2016, 21:00 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:07 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Lukas Fleischer (lfleischer)
Levente Polyak (anthraxx)
kpcyrd (kpcyrd)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 6
Private No

Details

Description:
Unlike other distributions (Fedora/CentOS, Debian/Ubuntu), Arch Linux does not ship a multi-instance service file with it's tor package, which would allow easy setups of multiple concurrent tor instances. Something that is required by many relay operators to make use of all CPU cores.

I'd like to add Arch Linux support to this ansible role, the only blocker is the missing multi-instance support in Arch Linux's tor package.
https://github.com/nusenu/ansible-relayor

You could simply copy Fedora's service files, that can be found here:
http://pkgs.fedoraproject.org/cgit/rpms/tor.git/tree/tor@.service
http://pkgs.fedoraproject.org/cgit/rpms/tor.git/tree/tor-master.service

To integrate with logrotate (all instances should get a HUP signal) the logrotate file would need to restart the tor-master service, like:
http://pkgs.fedoraproject.org/cgit/rpms/tor.git/tree/tor.logrotate

The exiting service file (/usr/lib/systemd/system/tor.service) would mainly remain unchanged with a minor addition of:
PartOf=tor-master.service
ReloadPropagatedFrom=tor-master.service
like:
http://pkgs.fedoraproject.org/cgit/rpms/tor.git/tree/tor.service

More background on systemd multi-instance support:
http://0pointer.de/blog/projects/instances.html

What do you think?
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:07 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/tor/issues/1
Comment by nusenu (nusenu) - Tuesday, 11 October 2016, 08:30 GMT
Would you accept patches for this?
Comment by Eli Schwartz (eschwartz) - Monday, 12 March 2018, 02:17 GMT
Why should we maintain another downstream service file when we already have enough problems with the one we do ship?

See e.g.  FS#55989 

Maybe upstream should add a multi-instance service file.
Comment by Christian Pfeiffer (ChrisTX) - Tuesday, 09 March 2021, 10:49 GMT
Tor just removed their service file as all other major distros have their own services downstream, usually instantiated.

Removal MR: https://gitlab.torproject.org/tpo/core/tor/-/merge_requests/87

Fedora and Debian both handle it this way:
https://gitweb.torproject.org/debian/tor.git/tree/debian/systemd
https://src.fedoraproject.org/rpms/tor/tree/rawhide

From what I understand they won't handle this upstream again.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.

Loading...