View | Details | Raw Unified | Return to bug 247357 | Differences between
and this patch

Collapse All | Expand All

(-)UIDs (-1 / +1 lines)
Lines 819-825 Link Here
819
archiva:*:871:871::0:0:Apache Archiva Daemon:/nonexistent:/usr/sbin/nologin
819
archiva:*:871:871::0:0:Apache Archiva Daemon:/nonexistent:/usr/sbin/nologin
820
bitmark:*:872:872::0:0:Bitmark Property System:/var/lib/bitmarkd:/usr/sbin/nologin
820
bitmark:*:872:872::0:0:Bitmark Property System:/var/lib/bitmarkd:/usr/sbin/nologin
821
bitmark-recorder:*:873:873::0:0:Bitmark Property Recorder:/var/lib/recorderd:/usr/sbin/nologin
821
bitmark-recorder:*:873:873::0:0:Bitmark Property Recorder:/var/lib/recorderd:/usr/sbin/nologin
822
# free: 874
822
librespeed:*:874:874::0:0:LibreSpeed user:/nonexistent:/usr/sbin/nologin
823
# free: 875
823
# free: 875
824
# free: 876
824
# free: 876
825
# free: 877
825
# free: 877
(-)GIDs (-1 / +1 lines)
Lines 814-820 Link Here
814
# free: 871
814
# free: 871
815
bitmark:*:872:
815
bitmark:*:872:
816
bitmark-recorder:*:873:
816
bitmark-recorder:*:873:
817
# free: 874
817
librespeed:*:874:
818
# free: 875
818
# free: 875
819
# free: 876
819
# free: 876
820
# free: 877
820
# free: 877
(-)net/librespeed-go/Makefile (-5 / +15 lines)
Lines 2-8 Link Here
2
2
3
PORTNAME=	librespeed-go
3
PORTNAME=	librespeed-go
4
DISTVERSIONPREFIX=	v
4
DISTVERSIONPREFIX=	v
5
DISTVERSION=	1.0.0
5
DISTVERSION=	1.0.1
6
CATEGORIES=	net www
6
CATEGORIES=	net www
7
7
8
MAINTAINER=	driesm.michiels@gmail.com
8
MAINTAINER=	driesm.michiels@gmail.com
Lines 43-63 Link Here
43
		spf13:viper:v1.6.2:spf13_viper/vendor/github.com/spf13/viper \
43
		spf13:viper:v1.6.2:spf13_viper/vendor/github.com/spf13/viper \
44
		subosito:gotenv:v1.2.0:subosito_gotenv/vendor/github.com/subosito/gotenv
44
		subosito:gotenv:v1.2.0:subosito_gotenv/vendor/github.com/subosito/gotenv
45
45
46
GO_TARGET=	./:${PREFIX}/libexec/librespeed-go/librespeed-go
46
USERS=		librespeed
47
GROUPS=		librespeed
47
48
48
SUB_FILES=	pkg-message
49
SUB_FILES=	pkg-message
50
PLIST_SUB=	LIBRESPEED_USER=${USERS} LIBRESPEED_GROUP=${GROUPS}
51
SUB_LIST=	LIBRESPEED_USER=${USERS} LIBRESPEED_GROUP=${GROUPS} PORTNAME=${PORTNAME}
49
52
50
OPTIONS_DEFINE=	EXAMPLES
53
OPTIONS_DEFINE=	EXAMPLES
51
54
52
post-patch:
55
post-patch:
53
	${REINPLACE_CMD} -e 's|"."|"${ETCDIR}"|g' ${WRKSRC}/config/config.go
56
	${REINPLACE_CMD} -e 's|"."|"${ETCDIR}"|g' ${WRKSRC}/config/config.go
57
	${REINPLACE_CMD} -e 's|"./assets"|"${WWWDIR}"|g' ${WRKSRC}/config/config.go
54
58
59
pre-install:
60
	${REINPLACE_CMD} -e 's|"./assets"|"${WWWDIR}"|g' ${WRKSRC}/settings.toml
61
	${REINPLACE_CMD} -e 's|"speedtest.db"|"/var/db/${PORTNAME}/speedtest.db"|g' ${WRKSRC}/settings.toml
62
55
post-install:
63
post-install:
56
	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/${PORTNAME}/assets
64
	${MKDIR} ${STAGEDIR}${WWWDIR}
57
	${CP} -a ${WRKSRC}/assets/*.js ${STAGEDIR}${PREFIX}/libexec/librespeed-go/assets
65
	${CP} -a ${WRKSRC}/assets/*.js ${STAGEDIR}${WWWDIR}
58
	${CP} -a ${WRKSRC}/assets/*.ttf ${STAGEDIR}${PREFIX}/libexec/librespeed-go/assets
66
	${CP} -a ${WRKSRC}/assets/*.ttf ${STAGEDIR}${WWWDIR}
59
	${MKDIR} ${STAGEDIR}${ETCDIR}
67
	${MKDIR} ${STAGEDIR}${ETCDIR}
60
	${INSTALL_DATA} ${WRKSRC}/settings.toml ${STAGEDIR}${ETCDIR}/settings.toml.sample
68
	${INSTALL_DATA} ${WRKSRC}/settings.toml ${STAGEDIR}${ETCDIR}/settings.toml.sample
69
	${MKDIR} ${STAGEDIR}/var/db/${PORTNAME}
70
	${MKDIR} ${STAGEDIR}/var/run/${PORTNAME}
61
71
62
post-install-EXAMPLES-on:
72
post-install-EXAMPLES-on:
63
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
73
	${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
(-)net/librespeed-go/distinfo (-3 / +3 lines)
Lines 1-6 Link Here
1
TIMESTAMP = 1591867495
1
TIMESTAMP = 1592422992
2
SHA256 (librespeed-speedtest-go-v1.0.0_GH0.tar.gz) = 8d9c572bc06d0994f01757496016b180e61ab422ecc9c03a13f1bdab9bbd766a
2
SHA256 (librespeed-speedtest-go-v1.0.1_GH0.tar.gz) = 1f8bfc80326af71e27f65716c35cc09c642f7424849f013dbe566826d3dfd31e
3
SIZE (librespeed-speedtest-go-v1.0.0_GH0.tar.gz) = 2232423
3
SIZE (librespeed-speedtest-go-v1.0.1_GH0.tar.gz) = 2233115
4
SHA256 (etcd-io-bbolt-v1.3.3_GH0.tar.gz) = 089ae9a1651531dcac069370212abfe16e83af1c6f331d59e0154fa64fe9b120
4
SHA256 (etcd-io-bbolt-v1.3.3_GH0.tar.gz) = 089ae9a1651531dcac069370212abfe16e83af1c6f331d59e0154fa64fe9b120
5
SIZE (etcd-io-bbolt-v1.3.3_GH0.tar.gz) = 94626
5
SIZE (etcd-io-bbolt-v1.3.3_GH0.tar.gz) = 94626
6
SHA256 (fsnotify-fsnotify-v1.4.7_GH0.tar.gz) = b7530d973d0ab0e58ad8ce1b9a4b963d6f57b3d72f2f9e13d49846976361b1cd
6
SHA256 (fsnotify-fsnotify-v1.4.7_GH0.tar.gz) = b7530d973d0ab0e58ad8ce1b9a4b963d6f57b3d72f2f9e13d49846976361b1cd
(-)net/librespeed-go/files/librespeed-go.in (-8 / +11 lines)
Lines 2-8 Link Here
2
2
3
# $FreeBSD$
3
# $FreeBSD$
4
#
4
#
5
# PROVIDE: librespeed-go
5
# PROVIDE: %%PORTNAME%%
6
# REQUIRE: SERVERS
6
# REQUIRE: SERVERS
7
# KEYWORD: shutdown
7
# KEYWORD: shutdown
8
#
8
#
Lines 10-22 Link Here
10
# to enable this service:
10
# to enable this service:
11
#
11
#
12
# librespeed_go_enable:		Set to NO by default.
12
# librespeed_go_enable:		Set to NO by default.
13
#				Set it to YES to enable librenms
13
#				Set it to YES to enable librespeed-go
14
# librespeed_go_pid:		Path of the pid file.
14
# librespeed_go_pid:		Path of the pid file.
15
#				Default /var/run/librenms/librenms.pid
15
#				Default /var/run/%%PORTNAME%%/%%PĀ¹RTNAME%%.pid
16
# librespeed_go_user:		The user account used to run the daemon.
17
#				Default: %%LIBRESPEED_USER%%
18
# librespeed_go_group:		The group used to run the daemon.
19
#				Default: %%LIBRESPEED_GROUP%%
16
# librespeed_go_daemonflags:	Flags passed to daemon(8)
20
# librespeed_go_daemonflags:	Flags passed to daemon(8)
17
#				Default -f which prevents any logging
21
#				Default -f which prevents any logging
18
# librespeed_go_chdir:		Dir to run the daemon in
19
# 				Default /usr/local/libexec/librespeed-go
20
22
21
. /etc/rc.subr
23
. /etc/rc.subr
22
24
Lines 27-38 Link Here
27
load_rc_config $name
29
load_rc_config $name
28
30
29
: ${librespeed_go_enable:="NO"}
31
: ${librespeed_go_enable:="NO"}
30
: ${librespeed_go_pid:="/var/run/librespeed-go.pid"}
32
: ${librespeed_go_pid:="/var/run/%%PORTNAME%%/%%PORTNAME%%.pid"}
33
: ${librespeed_go_user:="%%LIBRESPEED_USER%%"}
34
: ${librespeed_go_group:="%%LIBRESPEED_GROUP%%"}
31
: ${librespeed_go_daemonflags:="-f"}
35
: ${librespeed_go_daemonflags:="-f"}
32
: ${librespeed_go_chdir:="%%PREFIX%%/libexec/librespeed-go"}
33
36
34
pidfile="$librespeed_go_pid"
37
pidfile="$librespeed_go_pid"
35
procname="%%PREFIX%%/libexec/librespeed-go/librespeed-go"
38
procname="%%PREFIX%%/bin/%%PORTNAME%%"
36
command_args="$librespeed_go_daemonflags -p $pidfile $procname"
39
command_args="$librespeed_go_daemonflags -p $pidfile $procname"
37
40
38
run_rc_command "$1"
41
run_rc_command "$1"
(-)net/librespeed-go/files/patch-settings.toml (-8 lines)
Lines 1-8 Link Here
1
--- settings.toml.orig	2020-06-02 10:10:50 UTC
2
+++ settings.toml
3
@@ -21,4 +21,4 @@ database_username=""
4
 database_password=""
5
 
6
 # if you use `bolt` as database, set database_file to database file location
7
-database_file="speedtest.db"
8
+database_file="/var/db/speedtest.db"
(-)net/librespeed-go/files/pkg-message.in (-4 / +4 lines)
Lines 1-10 Link Here
1
[
1
[
2
{ type: install
2
{ type: install
3
  message: <<EOM
3
  message: <<EOM
4
Copy your preferred example from %%PREFIX%%/share/examples/librespeed-go to %%PREFIX%%/libexec/librespeed-go/assets/index.html.
4
Copy your preferred example from %%EXAMPLESDIR%% to %%WWWDIR%%/index.html.
5
To use the backend feature, be sure to copy a -full example.
5
To use the backend feature, be sure to copy a -full example.
6
	cd %%PREFIX%%/share/examples/librespeed-go
6
	cd %%EXAMPLESDIR%%
7
	cp -a example-singleServer-full.html %%PREFIX%%/libexec/librespeed-go/assets/index.html
7
	cp -a example-singleServer-full.html %%WWWDIR%%/index.html
8
8
9
To automatically start librespeed-go at boot time:
9
To automatically start librespeed-go at boot time:
10
# sysrc librespeed_go_enable="YES"
10
# sysrc librespeed_go_enable="YES"
Lines 17-23 Link Here
17
  message: <<EOM
17
  message: <<EOM
18
If you are uninstalling librespeed-go permanently,
18
If you are uninstalling librespeed-go permanently,
19
and you do *NOT* want to retain the speedtest database and other your configured landing page,
19
and you do *NOT* want to retain the speedtest database and other your configured landing page,
20
you should manually remove /var/db/speedtest.db, and %%PREFIX%%/libexec/librespeed-go.
20
you should manually remove /var/db/librespeed-go/speedtest.db, and %%WWWDIR%%.
21
EOM
21
EOM
22
}
22
}
23
]
23
]
(-)net/librespeed-go/pkg-plist (-5 / +10 lines)
Lines 1-9 Link Here
1
bin/librespeed-go
1
@sample %%ETCDIR%%/settings.toml.sample
2
@sample %%ETCDIR%%/settings.toml.sample
2
libexec/librespeed-go/assets/NotoSansDisplay-Light.ttf
3
libexec/librespeed-go/assets/NotoSansDisplay-Medium.ttf
4
libexec/librespeed-go/assets/speedtest.js
5
libexec/librespeed-go/assets/speedtest_worker.js
6
libexec/librespeed-go/librespeed-go
7
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-multipleServers-full.html
3
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-multipleServers-full.html
8
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-multipleServers-pretty.html
4
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-multipleServers-pretty.html
9
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-singleServer-basic.html
5
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-singleServer-basic.html
Lines 13-15 Link Here
13
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-singleServer-gauges.html
9
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-singleServer-gauges.html
14
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-singleServer-pretty.html
10
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-singleServer-pretty.html
15
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-singleServer-progressBar.html
11
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/example-singleServer-progressBar.html
12
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/index.html
13
%%WWWDIR%%/NotoSansDisplay-Light.ttf
14
%%WWWDIR%%/NotoSansDisplay-Medium.ttf
15
%%WWWDIR%%/speedtest.js
16
%%WWWDIR%%/speedtest_worker.js
17
@owner %%LIBRESPEED_USER%%
18
@group %%LIBRESPEED_GROUP%%
19
@dir /var/db/librespeed-go
20
@dir /var/run/librespeed-go

Return to bug 247357