Summary: | net-fs/samba: add systemd unit | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | RedEyedMan <kegalym2> |
Component: | [OLD] Server | Assignee: | Gentoo's SAMBA Team <samba> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexander, nikoli, pacho |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 448882, 468898 | ||
Attachments: |
samba.service
nmbd.service samba.service samba-3.6.9.ebuild.patch samba.confd.patch windbd.service smbd.service nmbd.service samba-3.6.12.ebuild.patch samba.tmpfilesd samba-3.6.12.ebuild.patch net-fs/samba-3.6.12.ebuild samba.confd smbd.service nmbd.service winbind.service samba-3.6.14-r1.ebuild.patch |
Description
RedEyedMan
2012-08-28 16:20:31 UTC
Created attachment 327298 [details]
samba.service
samba.service for systemd created by me.
Created attachment 327300 [details]
nmbd.service
nmbd.service for systemd created by me.
Created attachment 327302 [details]
samba.service
samba.service for systemd created by me.
Another way to do it is to create smbd.service, nmbd.service, winbind.service, and samba.target. samba.target can Require smbd.service and nmbd.service. If the user wants winbind, they can copy their samba target to /etc/systemd/system and add that to Require from there. I don't know which way is better and I'm not sure what the systemd policy is on creating new targets. Created attachment 338852 [details, diff]
samba-3.6.9.ebuild.patch
systemd units already included in release tarball, so only ebuild and conf.d file modifications are needed.
Created attachment 338854 [details, diff]
samba.confd.patch
(In reply to comment #6) > Created attachment 338854 [details, diff] [details, diff] > samba.confd.patch This variables taken from "packaging/systemd/samba.sysconfig" Created attachment 339002 [details]
windbd.service
Created attachment 339004 [details]
smbd.service
Created attachment 339006 [details]
nmbd.service
Created attachment 339696 [details, diff]
samba-3.6.12.ebuild.patch
Updated patch:
- also change location of PID files, otherwise services won't start
- install winbind.service only if USE=winbind
There is still an issue:
"/var/run/samba" should be created by tmpfiles.d. Another way is to migrate to "/run".
And maybe variables names should be unified between initscripts and units?
Created attachment 339748 [details]
samba.tmpfilesd
Created attachment 339752 [details, diff]
samba-3.6.12.ebuild.patch
- install tmpfiles.d config
Created attachment 339980 [details]
net-fs/samba-3.6.12.ebuild
Patched with above samba-3.6.12.ebuild.patch
Created attachment 339982 [details]
samba.confd
Patched with above samba.confd.patch
Created attachment 340122 [details]
smbd.service
smbd.service with PIDFile=/var/run/samba due to ebuild
Created attachment 340124 [details]
nmbd.service
nmbd.service with PIDFile=/var/run/samba due to ebuild
Created attachment 340126 [details]
winbind.service
winbind.service with PIDFile=/var/run/samba due to ebuild
Created attachment 348164 [details, diff] samba-3.6.14-r1.ebuild.patch Drop EnvironmentFile option from units. Using distro-cpecific env files is not recommended [1] [2]. Use /etc/systemd/system/{smb,nmb,winbind}.service.d/*.conf files for that purpose. [1]: https://bugs.gentoo.org/show_bug.cgi?id=459372#c3 [2]: https://fedoraproject.org/wiki/Features/Systemd-unit-cleanup I would take changes from: https://github.com/Sabayon/systemd-love/tree/master/net-fs/samba I will commit in a week if nobody disagrees. Thanks + 13 Jul 2013; Pacho Ramos <pacho@gentoo.org> +files/nmbd.service, + +files/samba.conf, +files/smbd.service, +files/smbd.socket, + +files/smbd_at.service, +files/winbindd.service, samba-3.6.16.ebuild, + samba-4.0.7.ebuild: + Install unit file (#433074) + |