diff --git a/GIDs b/GIDs index bf70d72500782..211cfacdabcd2 100644 --- a/GIDs +++ b/GIDs @@ -303,9 +303,9 @@ prowlarr:*:359: v2ray:*:360: httptunnel:*:361: readarr:*:362: -victoria-logs:*:363: -# free: 364 -# free: 365 +hostd:*:363: +walletd:*:364: +renterd:*:365: # free: 366 # free: 367 # free: 368 diff --git a/UIDs b/UIDs index 8c8d7e5c1d158..eedf69c53a62d 100644 --- a/UIDs +++ b/UIDs @@ -308,9 +308,9 @@ prowlarr:*:359:359::0:0:Prowlarr Daemon:/nonexistent:/usr/sbin/nologin v2ray:*:360:360::0:0:V2Ray Daemon:/nonexistent:/usr/sbin/nologin httptunnel:*:361:361::0:0:httptunnel Daemon:/nonexistent:/usr/sbin/nologin readarr:*:362:362::0:0:Readarr Daemon:/nonexistent:/usr/sbin/nologin -victoria-logs:*:363:363::0:0:VictoriaLogs Daemon:/nonexistent:/usr/sbin/nologin -# free: 364 -# free: 365 +hostd:*:363:363::0:0:hostd Daemon:/nonexistent:/usr/sbin/nologin +walletd:*:364:364::0:0:walletd Daemon:/nonexistent:/usr/sbin/nologin +renterd:*:365:365::0:0:renterd Daemon:/nonexistent:/usr/sbin/nologin # free: 366 # free: 367 # free: 368 diff --git a/net-p2p/hostd/Makefile b/net-p2p/hostd/Makefile new file mode 100644 index 0000000000000..d1199da5f82b3 --- /dev/null +++ b/net-p2p/hostd/Makefile @@ -0,0 +1,41 @@ +PORTNAME= hostd +DISTVERSIONPREFIX= v +DISTVERSION= 1.1.2 +CATEGORIES= net-p2p + +MAINTAINER= bruno@tinkerbox.org +COMMENT= Offer your storage space on the Sia network +WWW= https://sia.tech/host + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= go:modules +USE_RC_SUBR= hostd + +GO_MODULE= go.sia.tech/hostd +GO_TARGET= ./cmd/hostd +GO_BUILDFLAGS+= -tags='netgo timetzdata' -trimpath + +PLIST_FILES= bin/hostd \ + "@sample ${PREFIX}/etc/hostd.yml.sample" \ + "@sample ${PREFIX}/etc/newsyslog.conf.d/hostd.conf.sample" \ + "@dir(${USERS},${GROUPS},750) /var/lib/${PORTNAME}" + +SUB_FILES= ${PORTNAME}.yml ${PORTNAME}.conf + +SUB_LIST= GROUPS=${GROUPS} \ + USERS=${USERS} + +USERS= ${PORTNAME} +GROUPS= ${PORTNAME} + +post-install: + ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.conf ${STAGEDIR}${PREFIX}/etc/newsyslog.conf.d/${PORTNAME}.conf.sample + ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.yml ${STAGEDIR}${PREFIX}/etc/${PORTNAME}.yml.sample + ${INSTALL} -d ${STAGEDIR}/var/lib/${PORTNAME} + +post-patch: + ${REINPLACE_CMD} -e "s|BUILDTIME|$$(date +%s)|g" ${WRKSRC}/build/meta.go + +.include diff --git a/net-p2p/hostd/distinfo b/net-p2p/hostd/distinfo new file mode 100644 index 0000000000000..83c5e3577b179 --- /dev/null +++ b/net-p2p/hostd/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1723108114 +SHA256 (go/net-p2p_hostd/hostd-v1.1.2/v1.1.2.mod) = 95799a6ba72849bce3927c537f01497995b8c80cf213a222cab884b82ef2fd33 +SIZE (go/net-p2p_hostd/hostd-v1.1.2/v1.1.2.mod) = 2858 +SHA256 (go/net-p2p_hostd/hostd-v1.1.2/v1.1.2.zip) = f3d10b5486cb68aef93d50887f3955f82a47034e3e8b4494581d58666afcdb2f +SIZE (go/net-p2p_hostd/hostd-v1.1.2/v1.1.2.zip) = 320194 diff --git a/net-p2p/hostd/files/hostd.conf.in b/net-p2p/hostd/files/hostd.conf.in new file mode 100644 index 0000000000000..4ca23bdb12272 --- /dev/null +++ b/net-p2p/hostd/files/hostd.conf.in @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/hostd.log 600 20 * @T00 J /var/run/hostd.pid diff --git a/net-p2p/hostd/files/hostd.in b/net-p2p/hostd/files/hostd.in new file mode 100644 index 0000000000000..e2cf08e5a730c --- /dev/null +++ b/net-p2p/hostd/files/hostd.in @@ -0,0 +1,35 @@ +#!/bin/sh + +# PROVIDE: hostd +# REQUIRE: LOGIN FILESYSTEMS netwait +# KEYWORD: SHUTDOWN +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# hostd_enable (bool): Set to NO by default. +# Set it to YES to enable doormand. +# hostd_config (path): Set to %%PREFIX%%/etc/hostd.yml +# by default. + +. /etc/rc.subr + +name=hostd +rcvar=${name}_enable + +load_rc_config $name + +: ${hostd_enable:=NO} +: ${hostd_executable:="%%PREFIX%%/bin/hostd"} +: ${hostd_config:="%%PREFIX%%/etc/hostd.yml"} + +hostd_env="HOSTD_CONFIG_FILE=${hostd_config}" +pidfile="/var/run/${name}.pid" +command="/usr/sbin/daemon" +command_args="-r -f -H \ + -o \"/var/log/${name}.log\" \ + -P \"${pidfile}\" \ + -u %%USERS%% \"${hostd_executable}\"" + + +run_rc_command "$1" diff --git a/net-p2p/hostd/files/hostd.yml.in b/net-p2p/hostd/files/hostd.yml.in new file mode 100644 index 0000000000000..16b1c31b692c3 --- /dev/null +++ b/net-p2p/hostd/files/hostd.yml.in @@ -0,0 +1,28 @@ +directory: /var/lib/hostd +recoveryPhrase: indicate nature buzz route rude embody engage confirm aspect potato weapon bid +autoOpenWebUI: true +http: + address: :9980 + password: sia is cool +consensus: + gatewayAddress: :9981 + bootstrap: true +explorer: + url: https://api.siascan.com +rhp2: + address: :9982 +rhp3: + tcp: :9983 + websocket: :9984 +log: + level: info # global log level + stdout: + enabled: true # enable logging to stdout + level: info # log level for console logger + format: human # log format (human, json) + enableANSI: false # enable ANSI color codes (disabled on Windows) + file: + enabled: false # enable logging to file + level: info # log level for file logger + path: /var/log/hostd.log # the path of the log file + format: json # log format (human, json) diff --git a/net-p2p/hostd/files/patch-build_meta.go b/net-p2p/hostd/files/patch-build_meta.go new file mode 100644 index 0000000000000..81f0c2fff0bbf --- /dev/null +++ b/net-p2p/hostd/files/patch-build_meta.go @@ -0,0 +1,15 @@ +--- build/meta.go.orig 2024-08-08 09:09:43 UTC ++++ build/meta.go +@@ -1,7 +1,9 @@ ++// Code generated by go generate; DO NOT EDIT. ++// This file was generated by go generate at 2024-08-08T11:10:58+02:00. + package build + + const ( +- commit = "?" +- version = "?" +- buildTime = 0 ++ commit = "2e36a48" ++ version = "v1.1.2" ++ buildTime = BUILDTIME + ) diff --git a/net-p2p/hostd/pkg-descr b/net-p2p/hostd/pkg-descr new file mode 100644 index 0000000000000..571348715619b --- /dev/null +++ b/net-p2p/hostd/pkg-descr @@ -0,0 +1,8 @@ +hostd is an advanced Sia host solution created by the Sia Foundation, +designed to enhance the experience for storage providers within the +Sia network. Tailored for both individual and large-scale storage +providers, hostd boasts a user-friendly interface and a robust API, +empowering providers to efficiently manage their storage resources and +revenue. hostd incorporates an embedded web-UI, simplifying deployment +and enabling remote management capabilities, ensuring a smooth user +experience across a diverse range of devices. diff --git a/net-p2p/hostd/pkg-message b/net-p2p/hostd/pkg-message new file mode 100644 index 0000000000000..3088bd6487a2f --- /dev/null +++ b/net-p2p/hostd/pkg-message @@ -0,0 +1,9 @@ +[ +{ type: install + message: < diff --git a/net-p2p/renterd/distinfo b/net-p2p/renterd/distinfo new file mode 100644 index 0000000000000..6d2ecc489a787 --- /dev/null +++ b/net-p2p/renterd/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1716548661 +SHA256 (go/net-p2p_renterd/renterd-v1.0.7/v1.0.7.mod) = cee887fd7a70ec8ba107fc5af90b45e27e79b3cbb302bad5d404b462fd76ddc4 +SIZE (go/net-p2p_renterd/renterd-v1.0.7/v1.0.7.mod) = 3969 +SHA256 (go/net-p2p_renterd/renterd-v1.0.7/v1.0.7.zip) = 125a016163a24f115280f64f75f161f4a9256a1a5cb101811b550673c5a13390 +SIZE (go/net-p2p_renterd/renterd-v1.0.7/v1.0.7.zip) = 566677 diff --git a/net-p2p/renterd/files/patch-build_meta.go b/net-p2p/renterd/files/patch-build_meta.go new file mode 100644 index 0000000000000..03fdb3ac00034 --- /dev/null +++ b/net-p2p/renterd/files/patch-build_meta.go @@ -0,0 +1,22 @@ +--- build/meta.go.orig 2024-05-24 11:05:03 UTC ++++ build/meta.go +@@ -1,5 +1,5 @@ + // Code generated by go generate; DO NOT EDIT. +-// This file was generated by go generate at 2023-08-11T11:44:04+02:00. ++// This file was generated by go generate at 2024-05-24T12:55:42+02:00. + package build + + import ( +@@ -7,9 +7,9 @@ const ( + ) + + const ( +- commit = "?" +- version = "?" +- buildTime = 0 ++ commit = "7e6dcd5c" ++ version = "v1.0.7" ++ buildTime = BUILDTIME + ) + + // Commit returns the commit hash of hostd diff --git a/net-p2p/renterd/files/renterd.conf.in b/net-p2p/renterd/files/renterd.conf.in new file mode 100644 index 0000000000000..4da9b08d3f576 --- /dev/null +++ b/net-p2p/renterd/files/renterd.conf.in @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/renterd.log 600 20 * @T00 J /var/run/renterd.pid diff --git a/net-p2p/renterd/files/renterd.in b/net-p2p/renterd/files/renterd.in new file mode 100644 index 0000000000000..40736409543f7 --- /dev/null +++ b/net-p2p/renterd/files/renterd.in @@ -0,0 +1,35 @@ +#!/bin/sh + +# PROVIDE: renterd +# REQUIRE: LOGIN FILESYSTEMS netwait +# KEYWORD: SHUTDOWN +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# renterd_enable (bool): Set to NO by default. +# Set it to YES to enable doormand. +# renterd_config (path): Set to %%PREFIX%%/etc/renterd.yml +# by default. + +. /etc/rc.subr + +name=renterd +rcvar=${name}_enable + +load_rc_config $name + +: ${renterd_enable:=NO} +: ${renterd_executable:="%%PREFIX%%/bin/renterd"} +: ${renterd_config:="%%PREFIX%%/etc/renterd.yml"} + +renterd_env="RENTERD_CONFIG_FILE=${renterd_config}" +pidfile="/var/run/${name}.pid" +command="/usr/sbin/daemon" +command_args="-r -f -H \ + -o \"/var/log/${name}.log\" \ + -P \"${pidfile}\" \ + -u %%USERS%% \"${renterd_executable}\"" + + +run_rc_command "$1" diff --git a/net-p2p/renterd/files/renterd.yml.in b/net-p2p/renterd/files/renterd.yml.in new file mode 100644 index 0000000000000..be1371946cd96 --- /dev/null +++ b/net-p2p/renterd/files/renterd.yml.in @@ -0,0 +1,54 @@ +seed: rotation dream build introduce memorandum sphere trouble title pedestrian get conclusion large +directory: /var/lib/renterd +shutdownTimeout: 5m0s +log: + level: warn + stdout: + enabled: true + format: human + enableANSI: false + file: + enabled: false +http: + address: localhost:9980 + password: sia is cool +bus: + announcementMaxAgeHours: 8736 + bootstrap: true + gatewayAddr: :9981 + persistInterval: 1m0s + usedUtxoExpiry: 24h0m0s + slabBufferCompleionThreshold: 4096 +worker: + enabled: true + id: worker + busFlushInterval: 5s + contractLockTimeout: 30s + downloadOverdriveTimeout: 3s + uploadOverdriveTimeout: 3s + downloadMaxOverdrive: 5 + downloadMaxMemory: 1073741824 + uploadMaxMemory: 1073741824 + uploadMaxOverdrive: 5 +s3: + address: localhost:8080 + enabled: true +autopilot: + enabled: true + accountsRefillInterval: 10s + heartbeat: 30m0s + migrationHealthCutoff: 0.75 + revisionBroadcastInterval: 168h0m0s + revisionSubmissionBuffer: 144 + scannerInterval: 24h0m0s + scannerBatchSize: 1000 + scannerNumThreads: 100 + migratorParallelSlabsPerWorker: 1 +database: + log: + ignoreRecordNotFoundError: true + slowThreshold: 100ms + mysql: + user: renterd + database: renterd + metricsDatabase: renterd_metrics diff --git a/net-p2p/renterd/pkg-descr b/net-p2p/renterd/pkg-descr new file mode 100644 index 0000000000000..89ca14935daad --- /dev/null +++ b/net-p2p/renterd/pkg-descr @@ -0,0 +1,4 @@ +renterd is an advanced Sia renter engineered by the Sia +Foundation. Designed to cater to both casual users seeking +straightforward data storage and developers requiring a robust API for +building apps on Sia. diff --git a/net-p2p/renterd/pkg-message b/net-p2p/renterd/pkg-message new file mode 100644 index 0000000000000..80b20056e6f92 --- /dev/null +++ b/net-p2p/renterd/pkg-message @@ -0,0 +1,9 @@ +[ +{ type: install + message: < diff --git a/net-p2p/walletd/distinfo b/net-p2p/walletd/distinfo new file mode 100644 index 0000000000000..7bdc57b684095 --- /dev/null +++ b/net-p2p/walletd/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1713720827 +SHA256 (go/net-p2p_walletd/walletd-v0.1.1-alpha/v0.1.1-alpha.mod) = e47ff5b69f8352c33f04fa61e45ef539daa983ba1235dadbd24827df398f440b +SIZE (go/net-p2p_walletd/walletd-v0.1.1-alpha/v0.1.1-alpha.mod) = 595 +SHA256 (go/net-p2p_walletd/walletd-v0.1.1-alpha/v0.1.1-alpha.zip) = 0f00770aaf220f41148678cb9b0b866ce2fba04235118e65cd3f9ae0de90bac6 +SIZE (go/net-p2p_walletd/walletd-v0.1.1-alpha/v0.1.1-alpha.zip) = 34909 diff --git a/net-p2p/walletd/files/walletd-syslog.conf.in b/net-p2p/walletd/files/walletd-syslog.conf.in new file mode 100644 index 0000000000000..51b1a930006f6 --- /dev/null +++ b/net-p2p/walletd/files/walletd-syslog.conf.in @@ -0,0 +1,2 @@ +# $FreeBSD$ +/var/log/walletd.log 600 20 * @T00 J /var/run/walletd.pid diff --git a/net-p2p/walletd/files/walletd.conf.in b/net-p2p/walletd/files/walletd.conf.in new file mode 100644 index 0000000000000..330e3cfb23c1c --- /dev/null +++ b/net-p2p/walletd/files/walletd.conf.in @@ -0,0 +1 @@ +WALLETD_API_PASSWORD='some password' diff --git a/net-p2p/walletd/files/walletd.in b/net-p2p/walletd/files/walletd.in new file mode 100644 index 0000000000000..b324b8458ba26 --- /dev/null +++ b/net-p2p/walletd/files/walletd.in @@ -0,0 +1,39 @@ +#!/bin/sh + +# PROVIDE: walletd +# REQUIRE: LOGIN FILESYSTEMS netwait +# KEYWORD: SHUTDOWN +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# walletd_enable (bool): Set to NO by default. +# Set it to YES to enable doormand. +# walletd_datadir (path): Set to /var/lib/walletd by default. +# +# walletd_passwordfile (filepath): set the UI password there. +# by default located in %%PREFIX%%/etc/walletd.conf + +. /etc/rc.subr + +name=walletd +rcvar=${name}_enable + +load_rc_config $name + +: ${walletd_enable:=NO} +: ${walletd_executable:="%%PREFIX%%/bin/walletd"} +: ${walletd_datadir:="/var/lib/walletd"} +: ${walletd_passwordfile:="%%PREFIX%%/etc/walletd.conf"} + +walletd_env=$(cat ${walletd_passwordfile}) +pidfile="/var/run/${name}.pid" +command="/usr/sbin/daemon" +command_args="-r -f -H \ + -o \"/var/log/${name}.log\" \ + -P \"${pidfile}\" \ + -u %%USERS%% \"${walletd_executable}\" \ + --dir \"${walletd_datadir}\"" + + +run_rc_command "$1" diff --git a/net-p2p/walletd/pkg-descr b/net-p2p/walletd/pkg-descr new file mode 100644 index 0000000000000..e5e3947db47a5 --- /dev/null +++ b/net-p2p/walletd/pkg-descr @@ -0,0 +1,10 @@ +walletd is the flagship Sia wallet, suitable for miners, exchanges, +and everyday hodlers. Its client-server architecture gives you the +flexibility to access your funds from anywhere, on any device, without +compromising the security of your private keys. The server is +agnostic, so you can derive those keys from a 12-word seed phrase, a +legacy (siad) 28-word phrase, a Ledger hardware wallet, or another +preferred method. Like other Foundation node software, walletd ships +with a slick embedded UI, but developers can easily build headless +integrations leveraging its powerful JSON API. Whether you're using a +single address or millions, walletd scales to your needs. diff --git a/net-p2p/walletd/pkg-message b/net-p2p/walletd/pkg-message new file mode 100644 index 0000000000000..147a7f0df6dac --- /dev/null +++ b/net-p2p/walletd/pkg-message @@ -0,0 +1,10 @@ +[ +{ type: install + message: <