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
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-14 15:28 UTC by Pavel Timofeev
Modified: 2020-07-30 09:42 UTC (History)
0 users

See Also:
mat: maintainer-feedback+


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

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Timofeev 2020-01-14 15:28:45 UTC
- Add trivial rc script
- Fix portlint
Comment 1 Pavel Timofeev 2020-01-14 15:29:18 UTC
Created attachment 210735 [details]
port patch
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 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 Pavel Timofeev 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 freebsd_triage 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 Pavel Timofeev 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 Pavel Timofeev 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 freebsd_triage 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

Log:
  Add a rc startup script.

  Leave the user creation to the end-user.

  PR:		243352
  Submitted by:	timp87 gmail com

Changes:
  head/net-p2p/btpd/Makefile
  head/net-p2p/btpd/files/
  head/net-p2p/btpd/files/btpd.in
Comment 8 Pavel Timofeev 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'