Bug 242968

Summary: [NEW PORT] www/librespeed: Lightweight (self)hosted speedtest
Product: Ports & Packages Reporter: Dries Michiels <driesm.michiels>
Component: Individual Port(s)Assignee: freebsd-ports-bugs mailing list <ports-bugs>
Status: Open ---    
Severity: Affects Only Me CC: lwhsu, pi
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
librespeed.diff
none
librspeedv2.diff
none
librespeedv3.diff
none
librespeedv4.diff
none
librespeed.diff none

Description Dries Michiels 2019-12-29 20:17:29 UTC
Created attachment 210311 [details]
librespeed.diff

LibreSpeed is a very lightweight Speedtest.
LibreSpeed is implemented in Javascript, using XMLHttpRequest and Web Workers.
It can be self hosted with the option to store results in a backend database.

Happy to address feedback.

- runtime tested
- portlint -ac
Comment 1 Dries Michiels 2019-12-29 20:32:33 UTC
Created attachment 210312 [details]
librspeedv2.diff

- Do not include README.md
- Improve pkg-message
Comment 2 Dries Michiels 2019-12-29 21:06:38 UTC
Created attachment 210313 [details]
librespeedv3.diff

Use @sample for telemetry_settings.php.
Comment 3 Kurt Jaeger freebsd_committer 2019-12-30 19:09:07 UTC
Thanks. Testbuild has issues with the pkg-plist provided:

===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%WWWDIR%%/.github/ISSUE_TEMPLATE/bug_report.md
Error: Orphaned: %%WWWDIR%%/.github/ISSUE_TEMPLATE/feature_request.md
Error: Orphaned: %%WWWDIR%%/.logo/LibreSpeed.ai
Error: Orphaned: %%WWWDIR%%/.logo/LibreSpeed.svg
Error: Orphaned: %%WWWDIR%%/.logo/icon_huge.png
Error: Orphaned: %%WWWDIR%%/.logo/logo2.png
Error: Orphaned: %%WWWDIR%%/.logo/logo3.png
Error: Orphaned: %%WWWDIR%%/LICENSE
Error: Orphaned: %%WWWDIR%%/README.md
Error: Orphaned: %%WWWDIR%%/doc.md
Comment 4 Dries Michiels 2019-12-31 10:16:59 UTC
Thanks for the feedback, do you know if its possible to keep using copytree_share but without including the dot directories? Otherwise I'll do a more find grained control of copying to stagedir.
Comment 5 Dries Michiels 2019-12-31 12:07:33 UTC
Created attachment 210353 [details]
librespeedv4.diff

I went for a more specific installation in stagedir because its a web application in the end (avoid unneeded files in the webroot). Also, I changed the way to set it up. Instead of linking an example to index.html and keeping all examples in the webroot, I installed them in exampledir. From there one needs to make a copy instead of a link.

I'm still doubting if we should enable the DB back-end by default or not.
Comment 6 Li-Wen Hsu freebsd_committer 2020-01-28 21:53:36 UTC
(In reply to Dries Michiels from comment #4)
> Thanks for the feedback, do you know if its possible to keep using copytree_share but without including the dot directories? Otherwise I'll do a more find grained control of copying to stagedir.

There is no --exclude like parameter in COPYTREE_SHARE macro but you can remove the unwanted files in the WRKSRC before you start copying.
Comment 7 Dries Michiels 2020-02-03 14:19:12 UTC
Thanks for the feedback Li-Wen, that could be one way of doing it indeed. Although, then it becomes a bit more tricky to do the post-install-example/doc targets as the files used in there will be deleted before using the copytree-share in do-install. I just did a poudriere testport on 11.3 and 12.1 and the current patch is fine. Unless it is recommended to go for "less" lines in the makefile, testport and portlint is clean.
Comment 8 Dries Michiels 2020-04-08 17:27:26 UTC
Created attachment 213197 [details]
librespeed.diff

Update to 5.2

QA: Poudriere testport, portlint -AC