Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 828515

Summary: net-fs/ksmbd-tools - add service file for OpenRC service manager
Product: Gentoo Linux Reporter: Bogdan <bogdan.pylypenko107>
Component: Current packagesAssignee: Georgy Yakovlev <gyakovlev>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: /etc/init.d/ksmbd

Description Bogdan 2021-12-07 16:01:01 UTC
Currently, net-fs/ksmbd-tools-3.4.3_pre20212111 has file for systemd system.
I use OpenRC service manager.
Script to stgart ksmbd in OpenRC attached.

Reproducible: Always
Comment 1 Bogdan 2021-12-07 16:01:55 UTC
Created attachment 757623 [details]
/etc/init.d/ksmbd

example of ksmbd init script for OpenRC system
Comment 2 Georgy Yakovlev archtester gentoo-dev 2021-12-07 19:47:18 UTC
Hi, thanks.
Looks reasonable but I'd change couple of things.

lack of openrc service is the main reason for keyword absence btw.

unfortunately my openrc test system does not work with 5.15 yet, so I can't really test it properly soon.

let's keep it open for now, I'll try to spin up a vm with 5.15 kernel and openrc.
Comment 3 Bogdan 2021-12-08 11:54:55 UTC
My ksmbd init script tested only in my env (local notebook).
This script is an example - not final version.

Also, I have doubts, which user and password more reasonable in 'command_user' variable by default: root or nobody.
Comment 4 Larry the Git Cow gentoo-dev 2021-12-13 22:31:37 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=160c2caff897a88545e9f4e0d8ccd889ffa3fb85

commit 160c2caff897a88545e9f4e0d8ccd889ffa3fb85
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-12-13 22:28:18 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-12-13 22:30:57 +0000

    net-fs/ksmbd-tools: add initial version of openrc files
    
    Bug: https://bugs.gentoo.org/828515
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 net-fs/ksmbd-tools/files/confd                     |  5 ++++
 net-fs/ksmbd-tools/files/initd                     | 32 ++++++++++++++++++++++
 .../ksmbd-tools-3.4.3_pre20212111.ebuild           |  2 +-
 3 files changed, 38 insertions(+), 1 deletion(-)
Comment 5 Georgy Yakovlev archtester gentoo-dev 2021-12-13 22:33:04 UTC
I've added a version based on yours, replacing some stuff while at it.
still untested, unkeyworded.
but my NAS system finally able to run under 5.15 so I'll test soon.
Comment 6 Larry the Git Cow gentoo-dev 2021-12-13 22:38:31 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2be591af38151603e81fc03ea1d3188b1242bb79

commit 2be591af38151603e81fc03ea1d3188b1242bb79
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-12-13 22:38:00 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-12-13 22:38:00 +0000

    net-fs/ksmbd-tools: revbump, actually install openrc files
    
    Bug: https://bugs.gentoo.org/828515
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 ...4.3_pre20212111.ebuild => ksmbd-tools-3.4.3_pre20212111-r1.ebuild} | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 7 Bogdan 2021-12-14 07:21:02 UTC
I have an error:
  File or directory not found

> # rc-service ksmbd stop
> ksmbd                | * Stopping ksmbd ...
> ksmbd                |/etc/init.d/ksmbd: строка 26: /sbin/ksmbd.control -s: File or directory not found       [ !! ]
> ksmbd                | * ERROR: ksmbd failed to stop

Patch:
> --- a/ksmbd       2021-12-14 09:17:49.625363057 +0200
> +++ b/ksmbd       2021-12-14 09:19:45.316908617 +0200
> @@ -23,7 +23,7 @@
>  
>  stop() {
>         ebegin "Stopping ${RC_SVCNAME}"
> -       "${command_control} -s"
> +       "${command_control}" -s
>         eend $?
>  }
Comment 8 Larry the Git Cow gentoo-dev 2021-12-14 08:30:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26eb5090dc5262c345eedfe12babe86db587b7cc

commit 26eb5090dc5262c345eedfe12babe86db587b7cc
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-12-14 08:29:08 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-12-14 08:30:07 +0000

    net-fs/ksmbd-tools: fix openrc initd
    
    Thanks-to: Bogdan <bogdan.pylypenko107@gmail.com>
    Bug: https://bugs.gentoo.org/828515
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 net-fs/ksmbd-tools/files/initd                                          | 2 +-
 ....3_pre20212111-r2.ebuild => ksmbd-tools-3.4.3_pre20212111-r3.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)
Comment 9 Georgy Yakovlev archtester gentoo-dev 2021-12-14 08:33:00 UTC
thanks.

lmk if it works for you and I think it's finally ok to add unstable keywords to ebuild.

I was able to make it work on systemd host just fine.
Comment 10 Larry the Git Cow gentoo-dev 2021-12-20 12:17:22 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=729d38dd1c7ac3f5435cd264cc251c5f25c4c382

commit 729d38dd1c7ac3f5435cd264cc251c5f25c4c382
Author:     Georgy Yakovlev <gyakovlev@gentoo.org>
AuthorDate: 2021-12-20 12:12:33 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2021-12-20 12:17:12 +0000

    net-fs/ksmbd-tools: add 3.4.3, drop 3.4.3_pre20212111-r3
    
    Closes: https://bugs.gentoo.org/828515
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 net-fs/ksmbd-tools/Manifest                                   |  2 +-
 ...s-3.4.3_pre20212111-r3.ebuild => ksmbd-tools-3.4.3.ebuild} | 11 ++++-------
 2 files changed, 5 insertions(+), 8 deletions(-)