Bug 280886 - mail/hydroxide: Fix rc.d script
Summary: mail/hydroxide: Fix rc.d script
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: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-17 15:43 UTC by Yusuf Yaman
Modified: 2024-08-18 12:57 UTC (History)
2 users (show)

See Also:


Attachments
mail/hydroxide (2.69 KB, patch)
2024-08-17 15:45 UTC, Yusuf Yaman
nxjoseph: maintainer-approval+
Details | Diff
rc.d script (1.20 KB, text/plain)
2024-08-17 15:46 UTC, Yusuf Yaman
no flags Details
pkg-message (262 bytes, text/plain)
2024-08-17 15:46 UTC, Yusuf Yaman
no flags Details
pkg-message (269 bytes, text/plain)
2024-08-17 15:47 UTC, Yusuf Yaman
no flags Details
rc.d script (1.17 KB, text/plain)
2024-08-18 10:19 UTC, Yusuf Yaman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuf Yaman 2024-08-17 15:43:56 UTC

    
Comment 1 Yusuf Yaman 2024-08-17 15:45:53 UTC
Created attachment 252850 [details]
mail/hydroxide

* rc.d script was not working properly because hydroxide
  does want to store some files and users were running
  "hydroxide auth" with normal user. Now, hydroxide user
  has a home directory, and it does store them there now.
  I forked upstream hydroxide and changed the path to
  where files will be stored on FreeBSD.
Comment 2 Yusuf Yaman 2024-08-17 15:46:40 UTC
Created attachment 252851 [details]
rc.d script
Comment 3 Yusuf Yaman 2024-08-17 15:46:52 UTC
Created attachment 252852 [details]
pkg-message
Comment 4 Yusuf Yaman 2024-08-17 15:47:51 UTC
Created attachment 252853 [details]
pkg-message
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-18 00:01:03 UTC
This work:
eval "${rcvar}=\${${rcvar}:-'NO'}"
eval "__args=\${${name}_args:-''}"
eval "__user=\${${name}_user:-'%%USER%%'}"
eval "__log=\${${name}_log:-/dev/null}"

pidfile="/var/run/${name}.pid"

command="/usr/sbin/daemon"
command_args="-P ${pidfile} -u ${__user} -f -H -o ${__log} -m 3 %%PREFIX%%/bin/hydroxide ${__args} serve"

hydroxide_init() {
        read -p "Enter mail account id: " id
        ${su_cmd} -m ${__user} -c "%%PREFIX%%/bin/hydroxide auth $id"
}

/etc/rc.subr run "unset _user".
Comment 6 Yusuf Yaman 2024-08-18 10:19:18 UTC
Created attachment 252870 [details]
rc.d script
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-08-18 12:56:57 UTC
A commit in branch main references this bug:

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

commit 138d30ed37c7eee5f1f616c74eac2d646b26ce0b
Author:     Yusuf Yaman <nxjoseph@protonmail.com>
AuthorDate: 2024-08-18 12:51:41 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-08-18 12:53:59 +0000

    mail/hydroxide: Fix rc.d script

    - hydroxide does want to store some files and users were running
    "hydroxide auth" with normal user. Now, hydroxide user has a home
    directory, and it does store them there now.
    - Change upstream.

    PR:     280886

 UIDs                              |  2 +-
 mail/hydroxide/Makefile           |  4 ++--
 mail/hydroxide/distinfo           |  6 +++---
 mail/hydroxide/files/hydroxide.in | 17 +++++++++++++----
 mail/hydroxide/pkg-message (new)  | 13 +++++++++++++
 5 files changed, 32 insertions(+), 10 deletions(-)
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2024-08-18 12:57:35 UTC
Thanks.