Bug 243352 - net-p2p/btpd: add rc script
Summary: net-p2p/btpd: add rc script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Mathieu Arnold
Depends on:
Reported: 2020-01-14 15:28 UTC by timp87
Modified: 2020-07-30 09:42 UTC (History)
0 users

See Also:
mat: maintainer-feedback+

port patch (1.12 KB, patch)
2020-01-14 15:29 UTC, timp87
mat: maintainer-approval-
Details | Diff
new port patch (2.39 KB, patch)
2020-01-17 08:09 UTC, timp87
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description timp87 2020-01-14 15:28:45 UTC
- Add trivial rc script
- Fix portlint
Comment 1 timp87 2020-01-14 15:29:18 UTC
Created attachment 210735 [details]
port patch
Comment 2 Mathieu Arnold freebsd_committer 2020-01-15 20:26:35 UTC
I don't think having it run as root by default is anything like a good idea.
Comment 3 timp87 2020-01-17 08:09:47 UTC
Created attachment 210809 [details]
new port patch

ok, added separate user and group
Comment 4 Mathieu Arnold freebsd_committer 2020-02-03 13:23:08 UTC
user and group ids are finite resources, I am not sure eating one user and one group out of the limited pool we have is a great idea, it would probably be better to require a non root user, but let the user use an existing one or create one.
Comment 5 timp87 2020-02-03 13:31:28 UTC
(In reply to Mathieu Arnold from comment #4)
Well, you have just suggested what I had in the first patch.

btpd_user was set to root in rc script by default. But the user can redefine it.

Am I missing the idea?
Comment 6 timp87 2020-02-11 12:06:29 UTC
(In reply to Mathieu Arnold from comment #4)
Do you mean to set btpd_user to something like "changemeplease" in rc script by default?
This would leave it non-working state out of the box.
However we could have some user existence check in rc script. Isn't it too much for rc script?
Comment 7 commit-hook freebsd_committer 2020-02-11 14:17:09 UTC
A commit references this bug:

Author: mat
Date: Tue Feb 11 14:16:40 UTC 2020
New revision: 525825
URL: https://svnweb.freebsd.org/changeset/ports/525825

  Add a rc startup script.

  Leave the user creation to the end-user.

  PR:		243352
  Submitted by:	timp87 gmail com

Comment 8 timp87 2020-07-30 09:42:16 UTC
Hi, mat@!
I just realized that this https://svnweb.freebsd.org/ports/head/net-p2p/btpd/files/btpd.in?view=markup&pathrev=525825#l34 should be '-z' instead of '-n'