Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#56761 - [go-ipfs] provide non-user unit

Attached to Project: Community Packages
Opened by kpcyrd (kpcyrd) - Monday, 18 December 2017, 01:17 GMT
Last edited by Johannes Löthberg (demize) - Saturday, 06 January 2018, 22:24 GMT
Task Type Feature Request
Category Packages
Status Closed
Assigned To Johannes Löthberg (demize)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

go-ipfs currently does not ship systemd units upstream, so those are managed by archlinux. There's currently only a user unit that is somewhat complicated to setup, so I would like to suggest adding a non-user unit. This unit would be installed to:

/usr/lib/systemd/system/ipfs@.service

After that, I can start ipfs with a specific user like this: `systemctl enable --now ipfs@kpcyrd`. This does not replace but supplement the existing user unit.

--- >8 ---

[Unit]
Description=InterPlanetary File System (IPFS) daemon

[Service]
User=%i
ExecStart=/usr/bin/ipfs daemon
Restart=on-failure

[Install]
WantedBy=default.target

--- 8< ---
This task depends upon

Closed by  Johannes Löthberg (demize)
Saturday, 06 January 2018, 22:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.4.13-2
Comment by Doug Newgard (Scimmia) - Monday, 18 December 2017, 04:19 GMT
Why is it complicated to set up? Seems pretty straight forward to me.
Comment by kpcyrd (kpcyrd) - Tuesday, 19 December 2017, 03:09 GMT
Maybe complicated was the wrong word. This section[0] in the wiki could be shortened to a single command. The syncthing package does the same, one unit for a user service, one unit for a system service that takes a parameter for a user.

ls /usr/lib/systemd/{system,user}/syncthing*.service

I wrote that unit that is currently shipped in the go-ipfs package back when it was in the AUR and after using the package for a while I noticed that I should've added both after I learned that other units go this approach to specify the user. :)

[0]: https://wiki.archlinux.org/index.php/IPFS#Using_a_service_to_start_the_daemon
Comment by Doug Newgard (Scimmia) - Tuesday, 19 December 2017, 16:02 GMT
The section of the wiki would already be shortened to a single command, with an optional second one. There's very little advantage to adding a second unit.
Comment by kpcyrd (kpcyrd) - Friday, 22 December 2017, 04:40 GMT
The user unit already felt as a hack back then. The reason this wasn't a system unit in the first place is because the user for ipfs isn't a "true" application user. For laptops you usually want to run this as your regular user because this is how the application is designed. This unit was never intended for server use.

Having to spawn systemd user instances for individual daemons seems somewhat backwards. Aligning this with the solution other packages are using for this problem seems way more elegant.

Loading...