Bug 282646 - net/syncthing: 1.28 fails to start syncthing-discosrv
Summary: net/syncthing: 1.28 fails to start syncthing-discosrv
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Dan Langille
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-09 12:51 UTC by Simeon Simeonov
Modified: 2024-11-23 23:32 UTC (History)
2 users (show)

See Also:
dvl: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simeon Simeonov 2024-11-09 12:51:59 UTC
syncthing-discosrv fails to start with:
stdiscosrv: error: unknown flag -k, did you mean one of "-h", "-d", "-v"?

In net/syncthing/files/syncthing-discosrv.in in the current port

command_args is defined as:
command_args="-p ${pidfile} ${procname} -key ${syncthingdiscosrv_key} -cert ${syncthingdiscosrv_cert} ${syncthingdiscosrv_args} >> ${syncthingdiscosrv_log_file}"

while the arguments should be:

command_args="-p ${pidfile} ${procname} --key ${syncthingdiscosrv_key} --cert ${syncthingdiscosrv_cert} ${syncthingdiscosrv_args} >> ${syncthingdiscosrv_log_file}"

This also fixes the issue for me.

Kind regards

Simeon Simeonov
Comment 1 Dan Langille freebsd_committer freebsd_triage 2024-11-11 18:48:28 UTC
This is interesting in that the file has been unchanged since being added to the tree in 2018:

https://cgit.freebsd.org/ports/commit/net/syncthing/files/syncthing-discosrv.in?id=e381a7a0e82a0d55d352806e5a5bda9279169077

Either you're the first one to try running this (and report the issue), or the code has changed. I spent 2 minutes trying to track down the upstream code and failed.
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-11-11 18:55:22 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3a6131c7f73637519d4e304bef17ccfd2c2b01a2

commit 3a6131c7f73637519d4e304bef17ccfd2c2b01a2
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2024-11-11 18:49:02 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2024-11-11 18:53:52 +0000

    net/syncthing: Adjust parameters to syncthing-discosrv

    The rc.d/syncthing-discosrv script was using -key and -cert
    The correct parameters are --key and --cert

    PR:             282646

 net/syncthing/files/syncthing-discosrv.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 3 Dan Langille freebsd_committer freebsd_triage 2024-11-11 18:58:55 UTC
Thank you, hope this works for you. I don't use that service.
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-11-11 19:03:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d1827339bc8122ec49ea1d248b53351b4e8302bf

commit d1827339bc8122ec49ea1d248b53351b4e8302bf
Author:     Dan Langille <dvl@FreeBSD.org>
AuthorDate: 2024-11-11 19:00:16 +0000
Commit:     Dan Langille <dvl@FreeBSD.org>
CommitDate: 2024-11-11 19:02:15 +0000

    net/syncthing: bump PORTREVISION, missing from previous commit

    PR:             282646
    Fixes:          3a6131c7 net/syncthing: Adjust parameters to syncthing-discosrv

 net/syncthing/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 5 Simeon Simeonov 2024-11-11 20:11:28 UTC
Thank you so much!

Most people use the global discovery server instead of running their own.

The port (the parameters) used to work fine until 1.28. Perhaps hidden legacy / backward compatibility.