Summary: | net/librespeed-go: Update to 1.0.1 and simplify port | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Dries Michiels <driesm> | ||||||||||||
Component: | Individual Port(s) | Assignee: | Koichiro Iwao <meta> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Only Me | CC: | lcook, meta | ||||||||||||
Priority: | --- | Keywords: | buildisok, patch | ||||||||||||
Version: | Latest | ||||||||||||||
Hardware: | Any | ||||||||||||||
OS: | Any | ||||||||||||||
URL: | https://github.com/librespeed/speedtest-go/releases/tag/v1.0.1 | ||||||||||||||
Attachments: |
|
Description
Dries Michiels
2020-06-17 20:02:26 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/157368199 Overall, LGTM but I have some thoughts. /var/db/speedtest.db might not be unique. It reminds me of other speedtest server database than LibreSpeed. What about creating subdirectory /var/db/librespeed or name like librespeed.db? Yea good idea, I see two solutions, either make a seperate dir eg /var/db/librespeed-go/speedtest.db, or chose another name for the database. eg /var/db/librespeed-go.db. What do we prefer? Both are clean, so I'm not in strong favor of any solution. Woops you already stated both solution I see :-) looked over that. Typically we select a separate dir in /var/db/ when we need separate permissions on it (IIRC). Since this program is running as root, I think I'll go with renaming the database file to something more unique. Will attach a patch later this day. Good catch btw! (In reply to Dries Michiels from comment #4) Another thought, The librespeed-go daemon runs under root privilege so far however I don't think it's necessary as far as daemon doesn't listen on tcp port less than 1024. It can be run under user privilege such as 'librespeed' user. Some people including myself don't like giving unnecessary privileges to the daemon. So there's a chance that librespeed server is run in user privilege to be more secure. If users want to expose port 80 to librespeed server, the port can be forwarded by ipfw like this. > ipfw add 100 fwd 127.0.0.1,8989 tcp from any to me 80 in At this point, subdirectory is more flexible. I'm not enforcing you to run the daemon under user privilege but what do you think? This is a good improvement for the port in terms of security, I'll prepare a patch later today :-). Created attachment 215737 [details]
librespeedgo.diff
This adds the feature to run the daemon as non-root user; with a new user librespeed.
Created attachment 215738 [details]
librespeedgo.diff
Fix typo in rc script.
Created attachment 215739 [details]
librespeedgo.diff
Really fix the typo .... (I introduced another one LOL).
Created attachment 215740 [details]
librespeedgo.diff
I'm so sorry for the spam ... This hidden character didn't want to go away!
I can't believe it, its still there? # Default /var/run/%%PORTNAME%%/%%PĀ¹RTNAME%%.pid I give up. (In reply to Dries Michiels from comment #11) No problem, I can remove it. Committed with minor changes, thanks! https://svnweb.freebsd.org/changeset/ports/539808 Thanks Meta, I think we still need to commit UID, GID additions of the librespeed user/group. Thanks in advance! Dries Oops, indeed. A commit references this bug: Author: meta Date: Mon Jun 22 14:54:49 UTC 2020 New revision: 539810 URL: https://svnweb.freebsd.org/changeset/ports/539810 Log: net/librespeed-go: commit UIDs/GIDs missed in the previous commit r539808. PR: 247357 Changes: head/GIDs head/UIDs |