Bug 282501 - sysutils/kubo-go: Incorrect path and environment variables in rc.d script
Summary: sysutils/kubo-go: Incorrect path and environment variables in rc.d script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: John Hixson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-02 19:09 UTC by Emma M.
Modified: 2024-12-06 21:31 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (jhixson)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emma M. 2024-11-02 19:09:02 UTC
Component: Start up scripts
OS: stable/14

Steps to Reproduce:
```
service start kubo-go
```
- Actual results:
simply does not work, silently fails
- Expected results:
kubo/ipfs-go starting with the defined environment variables withing the start up script


# Additional Information
In the init script in /usr/local/etc/rc.d/kubo-go has incorrect paths and environment variables.

KUBO_PATH by its self seems to not work, using IPFS_PATH as well works as expected. 

Additionally currently /usr/local/bin/kubo-go is used within the rc script, but kubo is installed in the path /usr/local/bin/kubo

Before change (not working)
```
command_args="-S -m 3 -s ${kubo_syslog_priority} -l ${kubo_syslog_facility} -T ${kubo_syslog_tag} -p ${pidfile} /usr/bin/env KUBO_PATH=${kubo_path} ${kubo_env} /usr/local/bin/kubo-go daemon --init --init-profile=server --migrate=true ${kubo_args}"
procname="/usr/local/bin/kubo-go"
```

After change (working)
```
command_args="-S -m 3 -s ${kubo_syslog_priority} -l ${kubo_syslog_facility} -T ${kubo_syslog_tag} -p ${pidfile} /usr/bin/env IPFS_PATH=${kubo_path} KUBO_PATH=${kubo_path} ${kubo_env} /usr/local/bin/kubo daemon --init --init-profile=server --migrate=true ${kubo_args}"
procname="/usr/local/bin/kubo"
```
Comment 1 Emma M. 2024-11-02 19:15:20 UTC
Component: Start up scripts
OS: stable/14

Steps to Reproduce:
```
service kubo-go enable
service kubo-go start
```
- Actual results:
simply does not work, silently fails
- Expected results:
kubo/ipfs-go starting with the defined environment variables withing the start up script


# Additional Information
In the init script in /usr/local/etc/rc.d/kubo-go has incorrect paths and environment variables.

KUBO_PATH by its self seems to not work, using IPFS_PATH as well works as expected. 

Additionally currently /usr/local/bin/kubo-go is used within the rc script, but kubo is installed in the path /usr/local/bin/kubo

Before change (not working)
```
command_args="-S -m 3 -s ${kubo_syslog_priority} -l ${kubo_syslog_facility} -T ${kubo_syslog_tag} -p ${pidfile} /usr/bin/env KUBO_PATH=${kubo_path} ${kubo_env} /usr/local/bin/kubo-go daemon --init --init-profile=server --migrate=true ${kubo_args}"
procname="/usr/local/bin/kubo-go"
```

After change (working)
```
command_args="-S -m 3 -s ${kubo_syslog_priority} -l ${kubo_syslog_facility} -T ${kubo_syslog_tag} -p ${pidfile} /usr/bin/env IPFS_PATH=${kubo_path} KUBO_PATH=${kubo_path} ${kubo_env} /usr/local/bin/kubo daemon --init --init-profile=server --migrate=true ${kubo_args}"
procname="/usr/local/bin/kubo"
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-12-06 21:31:29 UTC
A commit in branch main references this bug:

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

commit eedba1bf9e2977bc5a689f0505c3f62252c454f2
Author:     John Hixson <jhixson@FreeBSD.org>
AuthorDate: 2024-12-06 21:28:56 +0000
Commit:     John Hixson <jhixson@FreeBSD.org>
CommitDate: 2024-12-06 21:29:28 +0000

    sysutils/kubo-go: use correct name for binary

    PR: 282501
    Reported by: Emma M <eemmaa@waifu.club>

 sysutils/kubo-go/Makefile  | 4 ++--
 sysutils/kubo-go/pkg-plist | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Comment 3 John Hixson freebsd_committer freebsd_triage 2024-12-06 21:31:57 UTC
Fixed. Thanks!